comparison src/parpg/behaviours/base.py @ 79:62cff91a19cb

Modifications to make the player agent move around by clicking with the mouse.
author KarstenBock@gmx.net
date Thu, 08 Sep 2011 18:23:06 +0200
parents 8a7bb62f9f5d
children 9f8faf6e974d
comparison
equal deleted inserted replaced
78:c25c734bd2a7 79:62cff91a19cb
108 """Makes the agent ready to talk to the PC 108 """Makes the agent ready to talk to the PC
109 @return: None""" 109 @return: None"""
110 self.state = _AGENT_STATE_TALK 110 self.state = _AGENT_STATE_TALK
111 self.pc = pc.behaviour.agent 111 self.pc = pc.behaviour.agent
112 self.idle() 112 self.idle()
113
114 def run(self, location):
115 """Makes the PC run to a certain location
116 @type location: fife.ScreenPoint
117 @param location: Screen position to run to.
118 @return: None"""
119 self.state = _AGENT_STATE_RUN
120 self.nextAction = None
121 self.agent.move('run', location, self.speed + 1)
122
123 def walk(self, location):
124 """Makes the PC walk to a certain location.
125 @type location: fife.ScreenPoint
126 @param location: Screen position to walk to.
127 @return: None"""
128 self.state = _AGENT_STATE_RUN
129 self.nextAction = None
130 self.agent.move('walk', location, self.speed - 1)
131