public void AttachScript(string scriptPath) { this.script = true; Scripting.ScriptingLua luaScript; Scripting.ScriptFunctions scriptFunctions; luaScript = new WiccanRede.AI.Scripting.ScriptingLua(); scriptFunctions = new ScriptFunctions(this); luaScript.RegisterFunctions(scriptFunctions); Logger.AddImportant("Nacitani a spousteni lua skriptu " + scriptPath); luaScript.LoadScript(scriptPath); luaScript.RunFunction("Init", new object[] { }); this.controlMechanism = luaScript; }
/// <summary> /// will attach finite state machine loaded as plug-in /// </summary> /// <remarks>this should be called after ctor, and has to be called before first Update function</remarks> /// <param name="fsm">Finite state machine to attach</param> public void AttachFSM(FSM fsm) { //this.fsm = fsm; //this.state = fsm.ActualState; this.controlMechanism = fsm; }