Mercurial > parpg-core
comparison src/parpg/components/fifeagent.py @ 73:58661f5b2f6b
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 | 96af64cf3b81 |
children | 1e7465a785c4 |
comparison
equal
deleted
inserted
replaced
72:9aebbf4e02f7 | 73:58661f5b2f6b |
---|---|
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) |