annotate world.py @ 8:708a6f651c31

Modifications to use the grease manager and modes
author KarstenBock@gmx.net
date Tue, 12 Jul 2011 12:31:53 +0200
parents bc88f7d5ca8b
children b30a72c41f90
rev   line source
8
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
1 from parpg.grease.world import *
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
2 from parpg.mode import FifeMode
5
bc88f7d5ca8b Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
3
8
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
4 class World(FifeMode, BaseWorld):
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
5
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
6 def __init__(self):
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
7 FifeMode.__init__(self)
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
8 BaseWorld.__init__(self)
5
bc88f7d5ca8b Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
9
bc88f7d5ca8b Added base files for grease
KarstenBock@gmx.net
parents:
diff changeset
10 def pump(self, dt):
8
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
11 for component in self.components:
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
12 if hasattr(component, "step"):
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
13 component.step(dt)
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
14 for system in self.systems:
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
15 if hasattr(system, "step"):
708a6f651c31 Modifications to use the grease manager and modes
KarstenBock@gmx.net
parents: 5
diff changeset
16 system.step(dt)