Mercurial > parpg-source
comparison mode.py @ 8:708a6f651c31
Modifications to use the grease manager and modes
author | KarstenBock@gmx.net |
---|---|
date | Tue, 12 Jul 2011 12:31:53 +0200 |
parents | bc88f7d5ca8b |
children | 3a9c97a75c5b |
comparison
equal
deleted
inserted
replaced
7:710f299ed275 | 8:708a6f651c31 |
---|---|
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""" |