Bump engine submodule and quit with a click or by pressing q.
This commit is contained in:
parent
7ed23a5d5f
commit
119cd76156
2
engine
2
engine
@ -1 +1 @@
|
||||
Subproject commit 61cfdbccf3230b73d42eb90f6eec934dbe1ddfdb
|
||||
Subproject commit 65b25c8be37aff5ab94c1c0b5a1410afa8a87f2b
|
13
game/game.py
13
game/game.py
@ -153,8 +153,7 @@ def main():
|
||||
cube_orientation = tests_batch.params[cube_id].orientation
|
||||
clouds_orientation = tests_batch.params[clouds_id].orientation
|
||||
|
||||
print("Running...")
|
||||
events = buffer(Event, 16)
|
||||
print("Running... Click or press q to quit")
|
||||
start_time = time.monotonic()
|
||||
current_time = 0.0
|
||||
frame_min = 10000.0
|
||||
@ -164,6 +163,7 @@ def main():
|
||||
draw_max = 0.0
|
||||
draw_avg = 0.0
|
||||
perf_count = 0
|
||||
events = buffer(Event, 16)
|
||||
try:
|
||||
for frame in range(10000):
|
||||
current_time = time.monotonic() - start_time
|
||||
@ -244,8 +244,13 @@ def main():
|
||||
if not nevents:
|
||||
break
|
||||
for event in events[:nevents]:
|
||||
if event.type == EVENT_KEY_RELEASE:
|
||||
print("EVENT_KEY_RELEASE:", event.data.key.keycode)
|
||||
if event.type == EVENT_FOCUS_IN:
|
||||
print("EVENT_FOCUS_IN")
|
||||
elif event.type == EVENT_FOCUS_OUT:
|
||||
print("EVENT_FOCUS_OUT")
|
||||
elif event.type == EVENT_KEY_PRESS and event.data.key.character == 'q':
|
||||
stop = True
|
||||
elif event.type == EVENT_BUTTON_RELEASE:
|
||||
stop = True
|
||||
if stop:
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user