Mercurial > parpg-source
comparison mode.py @ 5:bc88f7d5ca8b
Added base files for grease
author | KarstenBock@gmx.net |
---|---|
date | Tue, 12 Jul 2011 10:16:48 +0200 |
parents | |
children | 708a6f651c31 |
comparison
equal
deleted
inserted
replaced
4:bf1dd9c24a7e | 5:bc88f7d5ca8b |
---|---|
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""" |