annotate src/parpg/world.py @ 47:5a0b7b1f0230

Modified run_tests.py to use the parpg folder in "src"
author KarstenBock@gmx.net
date Fri, 02 Sep 2011 15:54:56 +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)