Mercurial > fife-parpg
diff demos/rpg/scripts/gamecontroller.py @ 523:d01eb65b2726
Enabling the FloatingTextRenderer for the RPG demo. The NPC now complains at you if he doesn't have a quest to give you.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 27 May 2010 18:29:20 +0000 |
parents | 494c60cf61cf |
children | 6037f79b0dcf |
line wrap: on
line diff
--- a/demos/rpg/scripts/gamecontroller.py Thu May 27 18:26:11 2010 +0000 +++ b/demos/rpg/scripts/gamecontroller.py Thu May 27 18:29:20 2010 +0000 @@ -167,7 +167,8 @@ self._scene = None self._instancerenderer = None - + self._floatingtextrenderer = None + def onConsoleCommand(self, command): """ Might be useful if you want to have the game parse a command. @@ -191,6 +192,8 @@ self._scene.createScene(self._settings.get("RPG", "TownMapFile", "maps/town.xml")) self._instancerenderer = fife.InstanceRenderer.getInstance(self._scene.cameras[self._settings.get("RPG", "DefaultCameraName", "camera1")]) + self._floatingtextrenderer = fife.FloatingTextRenderer.getInstance(self._scene.cameras[self._settings.get("RPG", "DefaultCameraName", "camera1")]) + self._floatingtextrenderer.addActiveLayer(self._scene.actorlayer) #start listening to events self._listener.attach() @@ -200,6 +203,7 @@ self._scene.destroyScene() self._scene = None self._instancerenderer = None + self._floatingtextrenderer = None def quit(self): self.endGame()