final changes for better touch function
This commit is contained in:
4
main.py
4
main.py
@@ -715,7 +715,7 @@ async def main():
|
||||
result = await touch(event)
|
||||
elif event.type == pygame.FINGERDOWN and not touch_start:
|
||||
await touch(event)
|
||||
|
||||
print(result)
|
||||
if await is_LEFT_event(event) or (result == "ontop"):
|
||||
can_tip = current_case.length_units * UNIT_HEIGHT <= TRAILER_HEIGHT
|
||||
if current_case and current_case.allow_snap and can_use_tilt and can_tip:
|
||||
@@ -739,7 +739,7 @@ async def main():
|
||||
spawn_case_in_game()
|
||||
shake_timer = 10
|
||||
elif await is_SPACE_event(event) or (result == "snap"):
|
||||
print(result)
|
||||
|
||||
if current_case and current_case.allow_snap:
|
||||
await current_case.animate_snap()
|
||||
can_use_tilt = True
|
||||
|
||||
Reference in New Issue
Block a user