annotate src/parpg/world.py @ 53:7c6e2e39b545

Move setup_behaviour method of the Character entity to a function in fifeagent.py
author KarstenBock@gmx.net
date Sun, 04 Sep 2011 16:25:23 +0200
parents 94cb5843dcbb
children b15cf999216a
rev   line source
30
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
1 from parpg.grease.world import *
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
2 from parpg.mode import FifeMode
27
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
3
30
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
4 class World(FifeMode, BaseWorld):
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
5
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
6 def __init__(self):
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
7 FifeMode.__init__(self)
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
8 BaseWorld.__init__(self)
27
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
9
09b581087d68 Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
10 def pump(self, dt):
30
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
11 for component in self.components:
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
12 if hasattr(component, "step"):
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
13 component.step(dt)
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
14 for system in self.systems:
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
15 if hasattr(system, "step"):
94cb5843dcbb Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 27
diff changeset
16 system.step(dt)