comparison src/parpg/behaviours/npc.py @ 82:7cb53edfb95f

Renamed BaseBehaviour to MovingAgentBehaviour
author KarstenBock@gmx.net
date Fri, 09 Sep 2011 15:05:23 +0200
parents c3350fc9cd45
children 9f8faf6e974d
comparison
equal deleted inserted replaced
81:5508000aceaf 82:7cb53edfb95f
15 15
16 from random import randrange 16 from random import randrange
17 17
18 from fife import fife 18 from fife import fife
19 19
20 import base 20 import moving
21 from base import BaseBehaviour 21 from moving import MovingAgentBehaviour
22 22
23 class NPCBehaviour(BaseBehaviour): 23 class NPCBehaviour(MovingAgentBehaviour):
24 """This is a basic NPC behaviour""" 24 """This is a basic NPC behaviour"""
25 def __init__(self, parent=None): 25 def __init__(self, parent=None):
26 super(NPCBehaviour, self).__init__() 26 super(NPCBehaviour, self).__init__()
27 27
28 self.parent = parent 28 self.parent = parent
70 @type action: ??? 70 @type action: ???
71 @param action: ??? 71 @param action: ???
72 @return: None""" 72 @return: None"""
73 if self.state == base._AGENT_STATE_WANDER: 73 if self.state == base._AGENT_STATE_WANDER:
74 self.target_loc = self.getTargetLocation() 74 self.target_loc = self.getTargetLocation()
75 BaseBehaviour.onInstanceActionFinished(self, instance, action) 75 MovingAgentBehaviour.onInstanceActionFinished(self, instance, action)
76 76
77 77
78 def idle(self): 78 def idle(self):
79 """Controls the NPC when it is idling. Different actions 79 """Controls the NPC when it is idling. Different actions
80 based on the NPC's state. 80 based on the NPC's state.