comparison src/parpg/behaviours/base.py @ 77:8a7bb62f9f5d

Added talk method to the base behaviour.
author KarstenBock@gmx.net
date Thu, 08 Sep 2011 15:17:28 +0200
parents c3350fc9cd45
children 62cff91a19cb
comparison
equal deleted inserted replaced
76:4934b62e0e48 77:8a7bb62f9f5d
94 94
95 if(action.getId() != 'stand'): 95 if(action.getId() != 'stand'):
96 self.idle_counter = 1 96 self.idle_counter = 1
97 else: 97 else:
98 self.idle_counter += 1 98 self.idle_counter += 1
99
100 def getLocation(self):
101 """Get the agents position as a fife.Location object.
102 @rtype: fife.Location
103 @return: the location of the agent"""
104 return self.agent.getLocation()
105
106
107 def talk(self, pc):
108 """Makes the agent ready to talk to the PC
109 @return: None"""
110 self.state = _AGENT_STATE_TALK
111 self.pc = pc.behaviour.agent
112 self.idle()