comparison behaviours/base.py @ 151:4c11d9d8b19d

Added onInstanceActionFrame to BaseBehaviour. This fixes the "blinking Objects" problem.
author KarstenBock@gmx.net
date Fri, 21 Oct 2011 13:39:40 +0200
parents 57f1cff9a75d
children
comparison
equal deleted inserted replaced
150:80672955ab70 151:4c11d9d8b19d
81 animtion = self.animation_queue.popleft() 81 animtion = self.animation_queue.popleft()
82 self.animate(**animtion) 82 self.animate(**animtion)
83 except IndexError: 83 except IndexError:
84 self.idle() 84 self.idle()
85 85
86 86 def onInstanceActionFrame(self, instance, action, frame):
87 pass
88
87 def getLocation(self): 89 def getLocation(self):
88 """Get the agents position as a fife.Location object. 90 """Get the agents position as a fife.Location object.
89 @rtype: fife.Location 91 @rtype: fife.Location
90 @return: the location of the agent""" 92 @return: the location of the agent"""
91 return self.agent.getLocation() 93 return self.agent.getLocation()