Mercurial > fife-parpg
comparison demos/rpg/scripts/gamecontroller.py @ 521:494c60cf61cf
Player can now receive a quest, accept it, and complete it. Quests do not have any requirements (i.e. bring me back an item.. etc etc) to be completed at this time.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 27 May 2010 17:31:28 +0000 |
parents | b6bd314df28a |
children | d01eb65b2726 |
comparison
equal
deleted
inserted
replaced
520:b6bd314df28a | 521:494c60cf61cf |
---|---|
88 if (event.getButton() == fife.MouseEvent.LEFT): | 88 if (event.getButton() == fife.MouseEvent.LEFT): |
89 self._gamecontroller.scene.player.walk( self._gamecontroller.scene.getLocationAt(clickpoint) ) | 89 self._gamecontroller.scene.player.walk( self._gamecontroller.scene.getLocationAt(clickpoint) ) |
90 instances = self._gamecontroller.scene.getInstancesAt(clickpoint) | 90 instances = self._gamecontroller.scene.getInstancesAt(clickpoint) |
91 if instances: | 91 if instances: |
92 obj = self._gamecontroller.scene.objectlist[instances[0].getId()] | 92 obj = self._gamecontroller.scene.objectlist[instances[0].getId()] |
93 print obj.type | |
94 if obj.type == GameObjectTypes["QUESTGIVER"]: | 93 if obj.type == GameObjectTypes["QUESTGIVER"]: |
95 action = TalkAction(self._gamecontroller.scene.player, obj) | 94 action = TalkAction(self._gamecontroller.scene.player, obj) |
96 self._gamecontroller.scene.player.nextaction = action | 95 self._gamecontroller.scene.player.nextaction = action |
97 | 96 |
98 if (event.getButton() == fife.MouseEvent.RIGHT): | 97 if (event.getButton() == fife.MouseEvent.RIGHT): |