projects
/
naja.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
At skeletal menu scene.
[naja.git]
/
naja
/
engine.py
1
import pygame
2
import pygame.locals as pgl
3
4
5
class Engine(object):
6
def __init__(self, surface, scene):
7
self._surface = surface
8
self._scene = scene
9
10
def run(self):
11
while True:
12
for ev in pygame.event.get():
13
if ev.type == pgl.QUIT:
14
return
15
self._scene.handle_event()
16
# TODO: work
17
pygame.display.flip()