Mercurial > parpg-source
comparison behaviours/base.py @ 50:b4a525456c99
Added talk method to the base behaviour.
author | KarstenBock@gmx.net |
---|---|
date | Thu, 08 Sep 2011 15:17:28 +0200 |
parents | 1bdadb768bcf |
children | 3dfd26b1c7ef |
comparison
equal
deleted
inserted
replaced
49:4f9747116061 | 50:b4a525456c99 |
---|---|
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() |