source: nagslang/screens/base.py@ 34:2995723e8ccf

Last change on this file since 34:2995723e8ccf was 34:2995723e8ccf, checked in by Simon Cross <hodgestar@…>, 8 years ago

Move and hold.

File size: 560 bytes
Line 
1"""A screen or area in which action happens."""
2
3from pygame import event
4import pymunk
5
6
7class Screen(object):
8
9 def __init__(self):
10 self.space = pymunk.Space()
11
12 def setup(self, world):
13 """Perform setup based on the world state."""
14 pass
15
16 def teardown(self):
17 pass
18
19 def post_event(self, ev):
20 event.post(ev)
21
22 def handle_event(self, ev):
23 pass
24
25 def render(self, surface):
26 pass
27
28 def tick(self, seconds):
29 """Step the given amount of time."""
30 self.space.step(seconds)
Note: See TracBrowser for help on using the repository browser.