comparison src/parpg/world.py @ 30:94cb5843dcbb

Modifications to use the grease manager and modes
author KarstenBock@gmx.net
date Tue, 12 Jul 2011 12:31:53 +0200
parents 09b581087d68
children b15cf999216a
comparison
equal deleted inserted replaced
29:ad18c3f912c5 30:94cb5843dcbb
1 from grease.world import * 1 from parpg.grease.world import *
2 from mode import FifeMode 2 from parpg.mode import FifeMode
3 3
4 class World(FifeModeMode, BaseWorld): 4 class World(FifeMode, BaseWorld):
5
6 def __init__(self):
7 FifeMode.__init__(self)
8 BaseWorld.__init__(self)
5 9
6 def pump(self, dt): 10 def pump(self, dt):
7 for component in self.components: 11 for component in self.components:
8 if hasattr(component, "step"): 12 if hasattr(component, "step"):
9 component.step(dt) 13 component.step(dt)
10 for system in self.systems: 14 for system in self.systems:
11 if hasattr(system, "step"): 15 if hasattr(system, "step"):
12 system.step(dt) 16 system.step(dt)