Mercurial > parpg-core
comparison src/parpg/components/fifeagent.py @ 192:191f89a22303
Further work on the scripting system.
author | KarstenBock@gmx.net |
---|---|
date | Sun, 13 Nov 2011 17:19:14 +0100 |
parents | 90b49fda0340 |
children |
comparison
equal
deleted
inserted
replaced
191:c97e48257f51 | 192:191f89a22303 |
---|---|
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} |