# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1274984960 0 # Node ID d01eb65b2726b952dbb74c66472835d6727eacdf # Parent 7b451e3b24399e15c58f9e758ca1290f1a96ab82 Enabling the FloatingTextRenderer for the RPG demo. The NPC now complains at you if he doesn't have a quest to give you. diff -r 7b451e3b2439 -r d01eb65b2726 demos/rpg/scripts/actors/baseactor.py --- a/demos/rpg/scripts/actors/baseactor.py Thu May 27 18:26:11 2010 +0000 +++ b/demos/rpg/scripts/actors/baseactor.py Thu May 27 18:29:20 2010 +0000 @@ -59,6 +59,8 @@ self._dest.offerNextQuest() else: self._dest.completeQuest() + else: + self._dest.instance.say("I've got nothing for you... leave me alone.", 2500) ActorStates = {'STAND':0, 'WALK':1, diff -r 7b451e3b2439 -r d01eb65b2726 demos/rpg/scripts/gamecontroller.py --- 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() diff -r 7b451e3b2439 -r d01eb65b2726 demos/rpg/scripts/scene.py --- a/demos/rpg/scripts/scene.py Thu May 27 18:26:11 2010 +0000 +++ b/demos/rpg/scripts/scene.py Thu May 27 18:29:20 2010 +0000 @@ -133,8 +133,12 @@ def _getObjectList(self): return self._objectlist + def _getMap(self): + return self._map + actorlayer = property(_getActorLayer) cameras = property(_getCameras) player = property(_getPlayer) objectlist = property(_getObjectList) + map = property(_getMap)