comparison world.py @ 188:2a12e2843984

Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
author Beliar <KarstenBock@gmx.net>
date Tue, 27 Mar 2012 13:41:20 +0200
parents 75c0b728ccf3
children 4381be70e1bb
comparison
equal deleted inserted replaced
187:ab6a0fd1668a 188:2a12e2843984
1 from parpg.bGrease.world import * 1 from bGrease.grease_fife.world import World
2 from parpg.bGrease.component import Component 2 from bGrease.component import Component
3 3
4 from parpg.mode import FifeMode 4 from bGrease.grease_fife.mode import Mode
5 from parpg import components 5 from parpg import components
6 from parpg.components.fifeagent import commands 6 from parpg.components.fifeagent import commands
7 from parpg.systems import ScriptingSystem 7 from parpg.systems import ScriptingSystem
8 from parpg.entities.action import ACTIONS 8 from parpg.entities.action import ACTIONS
9 9
10 class World(FifeMode, BaseWorld): 10 class PARPGWorld(World):
11 11
12 def __init__(self): 12 def __init__(self):
13 FifeMode.__init__(self) 13 World.__init__(self)
14 BaseWorld.__init__(self)
15 14
16 def configure(self): 15 def configure(self):
17 """Configure the game world's components, systems and renderers""" 16 """Configure the game world's components, systems and renderers"""
18 for name, component in components.components.iteritems(): 17 for name, component in components.components.iteritems():
19 setattr(self.components, name, component) 18 setattr(self.components, name, component)
20 self.systems.scripting = ScriptingSystem(commands, ACTIONS) 19 self.systems.scripting = ScriptingSystem(commands, ACTIONS)
21
22 def pump(self, dt):
23 for component in self.components:
24 if hasattr(component, "step"):
25 component.step(dt)
26 for system in self.systems:
27 if hasattr(system, "step"):
28 system.step(dt)