source: nagslang/screens/base.py@ 18:9ecb1d222ee0

Last change on this file since 18:9ecb1d222ee0 was 18:9ecb1d222ee0, checked in by Simon Cross <hodgestar@…>, 8 years ago

Screens.

File size: 420 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 post_event(self, ev):
13 event.post(ev)
14
15 def handle_event(self, ev):
16 pass
17
18 def render(self, surface):
19 pass
20
21 def tick(self, step):
22 """Step the given amount of time."""
23 self.space.step(step)
Note: See TracBrowser for help on using the repository browser.