Mercurial > fife-parpg
comparison demos/rpg/scripts/scene.py @ 519:14f777be6b94
Added a rudimentary Action class.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 27 May 2010 04:36:09 +0000 |
parents | e4cd18a179af |
children | b6bd314df28a |
comparison
equal
deleted
inserted
replaced
518:e4cd18a179af | 519:14f777be6b94 |
---|---|
85 self._player = None | 85 self._player = None |
86 self._npclist = [] | 86 self._npclist = [] |
87 | 87 |
88 def getInstancesAt(self, clickpoint): | 88 def getInstancesAt(self, clickpoint): |
89 """ | 89 """ |
90 Query the main camera for instances on our actor layer. | 90 Query the main camera for instances on the actor layer. |
91 """ | 91 """ |
92 return self.cameras[self._maincameraname].getMatchingInstances(clickpoint, self._actorlayer) | 92 return self.cameras[self._maincameraname].getMatchingInstances(clickpoint, self._actorlayer) |
93 | 93 |
94 def getLocationAt(self, clickpoint): | 94 def getLocationAt(self, clickpoint): |
95 """ | 95 """ |
96 Query the main camera for the Map location (on the agent layer) | 96 Query the main camera for the Map location (on the actor layer) |
97 that a screen point refers to. | 97 that a screen point refers to. |
98 """ | 98 """ |
99 target_mapcoord = self._cameras[self._maincameraname].toMapCoordinates(clickpoint, False) | 99 target_mapcoord = self._cameras[self._maincameraname].toMapCoordinates(clickpoint, False) |
100 target_mapcoord.z = 0 | 100 target_mapcoord.z = 0 |
101 location = fife.Location(self._actorlayer) | 101 location = fife.Location(self._actorlayer) |