comparison src/parpg/mode.py @ 30:94cb5843dcbb

Modifications to use the grease manager and modes
author KarstenBock@gmx.net
date Tue, 12 Jul 2011 12:31:53 +0200
parents 09b581087d68
children ff198b1168af
comparison
equal deleted inserted replaced
29:ad18c3f912c5 30:94cb5843dcbb
1 1
2 from grease.mode import * 2 from parpg.grease.mode import *
3 from fife.extensions.basicapplication import ApplicationBase 3 from fife.extensions.basicapplication import ApplicationBase
4 import abc 4 import abc
5 5
6 class FifeManager(BaseManager, ApplicationBase): 6 class FifeManager(BaseManager, ApplicationBase):
7 7
8 def __init__(self, TDS): 8 def __init__(self, TDS):
9 ApplicationBase.__init__(self, TDS) 9 ApplicationBase.__init__(self, TDS)
10 self.modes = [] 10 self.modes = []
11 self._settings = TDS
12 11
13 def _pump(self): 12 def _pump(self):
14 if self.current_mode: 13 if self.current_mode:
15 self.current_mode.pump(self.engine.getTimeManager().getTimeDelta() / 1000) 14 self.current_mode.pump(self.engine.getTimeManager().getTimeDelta() / 1000)
16 15
17 class FifeMode(BaseMode): 16 class FifeMode(BaseMode):
18 17
18 def __init__(self):
19 BaseMode.__init__(self)
20
19 @abc.abstractmethod 21 @abc.abstractmethod
20 def pump(self, dt): 22 def pump(self, dt):
21 """Performs actions every frame""" 23 """Performs actions every frame"""