comparison src/parpg/behaviours/npc.py @ 59:2915dbb60940

Fixed error in setting the initial state of the NPC behaviour
author KarstenBock@gmx.net
date Mon, 05 Sep 2011 14:14:42 +0200
parents d5491eb9e3e4
children 58661f5b2f6b
comparison
equal deleted inserted replaced
58:d5491eb9e3e4 59:2915dbb60940
13 # You should have received a copy of the GNU General Public License 13 # You should have received a copy of the GNU General Public License
14 # along with PARPG. If not, see <http://www.gnu.org/licenses/>. 14 # along with PARPG. If not, see <http://www.gnu.org/licenses/>.
15 15
16 from random import randrange 16 from random import randrange
17 17
18 from base import * 18 import base
19 from base import BaseBehaviour
19 20
20 class NPCBehaviour(BaseBehaviour): 21 class NPCBehaviour(BaseBehaviour):
21 """This is a basic NPC behaviour""" 22 """This is a basic NPC behaviour"""
22 def __init__(self, parent=None, layer=None): 23 def __init__(self, parent=None, layer=None):
23 super(NPCBehaviour, self).__init__(layer) 24 super(NPCBehaviour, self).__init__(layer)
24 25
25 self.parent = parent 26 self.parent = parent
26 self.state = _AGENT_STATE_NONE 27 self.state = base._AGENT_STATE_NONE
27 self.pc = None 28 self.pc = None
28 self.target_loc = None 29 self.target_loc = None
29 self.nextAction = None 30 self.nextAction = None
30 31
31 # hard code these for now 32 # hard code these for now