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