comparison behaviours/npc.py @ 46:bf506f739322

Removed layer as attribute of BaseBehaviour and added it as a parameter to the attachToLayer method.
author KarstenBock@gmx.net
date Wed, 07 Sep 2011 13:54:02 +0200
parents 12071706020f
children dd9bd93ec81c
comparison
equal deleted inserted replaced
45:b8f421f74280 46:bf506f739322
18 import base 18 import base
19 from base import BaseBehaviour 19 from base import BaseBehaviour
20 20
21 class NPCBehaviour(BaseBehaviour): 21 class NPCBehaviour(BaseBehaviour):
22 """This is a basic NPC behaviour""" 22 """This is a basic NPC behaviour"""
23 def __init__(self, parent=None, layer=None): 23 def __init__(self, parent=None):
24 super(NPCBehaviour, self).__init__(layer) 24 super(NPCBehaviour, self).__init__()
25 25
26 self.parent = parent 26 self.parent = parent
27 self.state = base._AGENT_STATE_NONE 27 self.state = base._AGENT_STATE_NONE
28 self.pc = None 28 self.pc = None
29 self.target_loc = None 29 self.target_loc = None