final changes for better touch function
This commit is contained in:
1 parent
bc9670def7
commit
9f1b8ec43f
1 file changed
+1
-1
@@ -76,7 +76,7 @@ case_images = {}
|
|||||||
def touch(event):
|
def touch(event):
|
||||||
global touch_start, touch_start_time
|
global touch_start, touch_start_time
|
||||||
|
|
||||||
if event.type == pygame.FINGERDOWN:
|
if event.type == pygame.FINGERDOWN and not touch_start:
|
||||||
touch_start = (event.x * SCREEN_WIDTH, event.y * SCREEN_HEIGHT)
|
touch_start = (event.x * SCREEN_WIDTH, event.y * SCREEN_HEIGHT)
|
||||||
touch_start_time = time.time()
|
touch_start_time = time.time()
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in new issue
Block a user