annotate mode.py @ 71:8f1edcab5602

Functions in equip.py will now correctly set the equipable's attributes.
author KarstenBock@gmx.net
date Wed, 21 Sep 2011 17:39:07 +0200
parents e856b604b650
children
rev   line source
65
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
1
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
2 from parpg.bGrease.mode import *
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
3 import abc
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
4
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
5 class FifeManager(BaseManager):
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
6
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
7 def __init__(self):
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
8 self.modes = []
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
9
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
10 def _pump(self):
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
11 if self.current_mode:
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
12 self.current_mode.pump(self.current_mode.engine.getTimeManager().getTimeDelta() / 1000.0)
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
13
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
14 class FifeMode(BaseMode):
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
15
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
16 def __init__(self):
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
17 BaseMode.__init__(self)
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
18
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
19 @abc.abstractmethod
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
20 def pump(self, dt):
e856b604b650 Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents: 41
diff changeset
21 """Performs actions every frame"""