annotate world.py @ 15:9ffcb493a0f4

Changes for the container system
author KarstenBock@gmx.net
date Sun, 31 Jul 2011 23:48:54 +0200
parents 708a6f651c31
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)