annotate src/parpg/mode.py @ 164:ede6f6b31bf8

Changed BrewBeerAction to work with components.
author KarstenBock@gmx.net
date Sat, 08 Oct 2011 14:19:35 +0200
parents 0f659c7675f6
children
rev   line source
92
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
1
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
2 from parpg.bGrease.mode import *
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
3 import abc
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
4
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
5 class FifeManager(BaseManager):
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
6
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
7 def __init__(self):
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
8 self.modes = []
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
9
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
10 def _pump(self):
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
11 if self.current_mode:
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
12 self.current_mode.pump(self.current_mode.engine.getTimeManager().getTimeDelta() / 1000.0)
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
13
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
14 class FifeMode(BaseMode):
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
15
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
16 def __init__(self):
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
17 BaseMode.__init__(self)
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
18
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
19 @abc.abstractmethod
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
20 def pump(self, dt):
0f659c7675f6 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 66
diff changeset
21 """Performs actions every frame"""