diff gamemodel.py @ 46:bf506f739322

Removed layer as attribute of BaseBehaviour and added it as a parameter to the attachToLayer method.
author KarstenBock@gmx.net
date Wed, 07 Sep 2011 13:54:02 +0200
parents 98f26f7636d8
children 3dfd26b1c7ef
line wrap: on
line diff
--- a/gamemodel.py	Wed Sep 07 13:24:02 2011 +0200
+++ b/gamemodel.py	Wed Sep 07 13:54:02 2011 +0200
@@ -31,6 +31,7 @@
 from parpg.dialogueparsers import YamlDialogueParser, DialogueFormatError
 from parpg.entities import createEntity
 from parpg import behaviours
+from parpg.components import fifeagent
 
 try:
     import xml.etree.cElementTree as ElementTree
@@ -677,6 +678,10 @@
              
         if obj_type == "Character":
             obj.fifeagent.behaviour.parent = obj
+            fifeagent.setup_behaviour(obj.fifeagent)
+            obj.fifeagent.behaviour.speed = self.settings.parpg.PCSpeed
+            #Start the behaviour            
+            obj.fifeagent.behaviour.idle()
             # create the agent
             #obj.setup()
             #obj.behaviour.speed = self.settings.parpg.PCSpeed