comparison components/fifeagent.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 ff3e395abf91
children ba85e5aff370
comparison
equal deleted inserted replaced
45:b8f421f74280 46:bf506f739322
22 Component.__init__(self, identifier=str, layer=object, behaviour=object, gfx=str, pos=Vec2d) 22 Component.__init__(self, identifier=str, layer=object, behaviour=object, gfx=str, pos=Vec2d)
23 23
24 24
25 def setup_behaviour(agent): 25 def setup_behaviour(agent):
26 """Attach the behaviour to the layer""" 26 """Attach the behaviour to the layer"""
27 if agent.behaviour: 27 if agent.behaviour:
28 agent.behaviour.attachToLayer(agent.identifier) 28 agent.behaviour.attachToLayer(agent.identifier, agent.layer)