comparison components/fifeagent.py @ 86:a9cc5559ec2a

Move the identifier field from the FifeAgent component to the new General component. Added General Entity.
author KarstenBock@gmx.net
date Sat, 24 Sep 2011 15:48:24 +0200
parents e856b604b650
children 939984cff702
comparison
equal deleted inserted replaced
85:04af237dde10 86:a9cc5559ec2a
16 class FifeAgent(Component): 16 class FifeAgent(Component):
17 """Component that stores the values for a fife agent""" 17 """Component that stores the values for a fife agent"""
18 18
19 def __init__(self): 19 def __init__(self):
20 """Constructor""" 20 """Constructor"""
21 Component.__init__(self, identifier=str, layer=object, behaviour=object, gfx=str) 21 Component.__init__(self, layer=object, behaviour=object, gfx=str)
22 22
23 23
24 def setup_behaviour(agent): 24 def setup_behaviour(agent):
25 """Attach the behaviour to the layer""" 25 """Attach the behaviour to the layer"""
26 if agent.behaviour: 26 if agent.behaviour:
27 agent.behaviour.attachToLayer(agent.identifier, agent.layer) 27 agent.behaviour.attachToLayer(agent.entity.getID(), agent.layer)