Mercurial > parpg-source
annotate 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 |
rev | line source |
---|---|
188
2a12e2843984
Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
Beliar <KarstenBock@gmx.net>
parents:
160
diff
changeset
|
1 from bGrease.grease_fife.world import World |
2a12e2843984
Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
Beliar <KarstenBock@gmx.net>
parents:
160
diff
changeset
|
2 from bGrease.component import Component |
65
e856b604b650
Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents:
63
diff
changeset
|
3 |
188
2a12e2843984
Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
Beliar <KarstenBock@gmx.net>
parents:
160
diff
changeset
|
4 from bGrease.grease_fife.mode import Mode |
65
e856b604b650
Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents:
63
diff
changeset
|
5 from parpg import components |
160 | 6 from parpg.components.fifeagent import commands |
157 | 7 from parpg.systems import ScriptingSystem |
160 | 8 from parpg.entities.action import ACTIONS |
65
e856b604b650
Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents:
63
diff
changeset
|
9 |
188
2a12e2843984
Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
Beliar <KarstenBock@gmx.net>
parents:
160
diff
changeset
|
10 class PARPGWorld(World): |
65
e856b604b650
Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents:
63
diff
changeset
|
11 |
e856b604b650
Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents:
63
diff
changeset
|
12 def __init__(self): |
188
2a12e2843984
Removed bGrease, which is in a seperate repository, here: https://github.com/Beliaar/bGrease
Beliar <KarstenBock@gmx.net>
parents:
160
diff
changeset
|
13 World.__init__(self) |
65
e856b604b650
Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents:
63
diff
changeset
|
14 |
e856b604b650
Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents:
63
diff
changeset
|
15 def configure(self): |
e856b604b650
Changed "import bGrease" to "import parpg.bGrease".
KarstenBock@gmx.net
parents:
63
diff
changeset
|
16 """Configure the game world's components, systems and renderers""" |
87
aed2e094e0c7
Changed way of setting the possible components of the world.
KarstenBock@gmx.net
parents:
86
diff
changeset
|
17 for name, component in components.components.iteritems(): |
aed2e094e0c7
Changed way of setting the possible components of the world.
KarstenBock@gmx.net
parents:
86
diff
changeset
|
18 setattr(self.components, name, component) |
160 | 19 self.systems.scripting = ScriptingSystem(commands, ACTIONS) |