annotate src/parpg/mode.py @ 31:ff198b1168af

TimeDelta parameter is now correct
author KarstenBock@gmx.net
date Thu, 14 Jul 2011 10:44:51 +0200
parents 94cb5843dcbb
children 70738c470ad7
rev   line source
27
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
1
30
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
2 from parpg.grease.mode import *
27
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
3 from fife.extensions.basicapplication import ApplicationBase
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
4 import abc
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
5
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
6 class FifeManager(BaseManager, ApplicationBase):
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
7
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
8 def __init__(self, TDS):
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
9 ApplicationBase.__init__(self, TDS)
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
10 self.modes = []
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
11
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
12 def _pump(self):
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
13 if self.current_mode:
31
ff198b1168af TimeDelta parameter is now correct
KarstenBock@gmx.net
parents: 30
diff changeset
14 self.current_mode.pump(self.engine.getTimeManager().getTimeDelta())
27
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
15
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
16 class FifeMode(BaseMode):
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
17
30
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
18 def __init__(self):
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
19 BaseMode.__init__(self)
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
20
27
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
21 @abc.abstractmethod
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
22 def pump(self, dt):
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
23 """Performs actions every frame"""