# HG changeset patch # User KarstenBock@gmx.net # Date 1315146323 -7200 # Node ID 7c6e2e39b545fc3fa8770bf23fb0418ff2e9a2fc # Parent 872e9ca29969833bdc11531c8bcb002afe1e5baf Move setup_behaviour method of the Character entity to a function in fifeagent.py diff -r 872e9ca29969 -r 7c6e2e39b545 src/parpg/components/fifeagent.py --- a/src/parpg/components/fifeagent.py Sun Sep 04 15:19:47 2011 +0200 +++ b/src/parpg/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 diff -r 872e9ca29969 -r 7c6e2e39b545 src/parpg/entities/character.py --- a/src/parpg/entities/character.py Sun Sep 04 15:19:47 2011 +0200 +++ b/src/parpg/entities/character.py Sun Sep 04 16:25:23 2011 +0200 @@ -30,8 +30,3 @@ self.fifeagent.layer = layer self.fifeagent.behaviour = behaviour self.fifeagent.gfx = gfx - - def setup_behaviour(self): - """Attach the behaviour to the layer""" - if self.fifeagent.behaviour: - self.fifeagent.behaviour.attachToLayer(self.fifeagent.identifier)