comparison src/parpg/behaviours/npc.py @ 190:a22e92090018

The approach method of MovingAgentBehaviour now accepts a locatior or another instance, and uses the follow method to move to the instance position.
author KarstenBock@gmx.net
date Sat, 12 Nov 2011 20:54:25 +0100
parents 704145b96171
children
comparison
equal deleted inserted replaced
189:61d158ce6bc3 190:a22e92090018
38 # or thrown out altogether. 38 # or thrown out altogether.
39 # HACK: 09.Oct.2011 Beliar 39 # HACK: 09.Oct.2011 Beliar
40 # I increased the wander rate to 900 since the idle method 40 # I increased the wander rate to 900 since the idle method
41 # gets called way more often now. 41 # gets called way more often now.
42 self.wanderCounter = 0 42 self.wanderCounter = 0
43 self.wanderRate = 900 43 self.wanderRate = 9
44 44
45 def getTargetLocation(self): 45 def getTargetLocation(self):
46 """@rtype: fife.Location 46 """@rtype: fife.Location
47 @return: NPC's position""" 47 @return: NPC's position"""
48 x = self.getX() 48 x = self.getX()