27
|
1
|
|
2 from grease.mode import *
|
|
3 from fife.extensions.basicapplication import ApplicationBase
|
|
4 import abc
|
|
5
|
|
6 class FifeManager(BaseManager, ApplicationBase):
|
|
7
|
|
8 def __init__(self, TDS):
|
|
9 ApplicationBase.__init__(self, TDS)
|
|
10 self.modes = []
|
|
11 self._settings = TDS
|
|
12
|
|
13 def _pump(self):
|
|
14 if self.current_mode:
|
|
15 self.current_mode.pump(self.engine.getTimeManager().getTimeDelta() / 1000)
|
|
16
|
|
17 class FifeMode(BaseMode):
|
|
18
|
|
19 @abc.abstractmethod
|
|
20 def pump(self, dt):
|
|
21 """Performs actions every frame""" |