Mercurial > parpg-source
diff components/fifeagent.py @ 28:bcabbffc88e6
Move setup_behaviour method of the Character entity to a function in fifeagent.py
author | KarstenBock@gmx.net |
---|---|
date | Sun, 04 Sep 2011 16:25:23 +0200 |
parents | def430d59281 |
children | a236fff5feea |
line wrap: on
line diff
--- a/components/fifeagent.py Sun Sep 04 15:19:47 2011 +0200 +++ b/components/fifeagent.py Sun Sep 04 16:25:23 2011 +0200 @@ -19,3 +19,9 @@ def __init__(self): """Constructor""" Component.__init__(self, identifier=int, layer=object, behaviour=object, gfx=str) + + +def setup_behaviour(agent): + """Attach the behaviour to the layer""" + if agent.behaviour: + agent.behaviour.attachToLayer(agent.identifier) \ No newline at end of file