comparison behaviours/npc.py @ 158:04854cf6e1ac

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 90ad38b00f13
children ff4f9b387cac
comparison
equal deleted inserted replaced
157:79d6b17b80a3 158:04854cf6e1ac
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()