comparison components/fifeagent.py @ 160:75c0b728ccf3

Further work on the scripting system.
author KarstenBock@gmx.net
date Sun, 13 Nov 2011 17:19:14 +0100
parents f94d4577ca5e
children
comparison
equal deleted inserted replaced
159:1b66e1ce226b 160:75c0b728ccf3
33 33
34 def setup_behaviour(agent): 34 def setup_behaviour(agent):
35 """Attach the behaviour to the layer""" 35 """Attach the behaviour to the layer"""
36 if agent.behaviour: 36 if agent.behaviour:
37 agent.behaviour.attachToLayer(agent.entity.getID(), agent.layer) 37 agent.behaviour.attachToLayer(agent.entity.getID(), agent.layer)
38
39 def approach(agent, target_or_location, action):
40 if agent.behaviour:
41 agent.behaviour.approach(target_or_location, action)
42
43 commands = {"approach":approach}