//--------------------------------------------------------------------------- #endregion //--------------------------------------------------------------------------- #region Public Member Functions //--------------------------------------------------------------------------- // This is where states get registered... public static void RegisterState(UnityEngine.GameObject go, UnityEngine.Behaviour bh, string stateName) { System.Diagnostics.Debug.Assert((go != null) && (bh != null) && (stateName != null)); StateInfo aInfo = new StateInfo(); aInfo.gameObject = go; aInfo.behaviour = bh; aInfo.stateName = stateName; _stateList.Add(aInfo); OCPerceptionCollector.Instance.AddNewState(aInfo); // // I'm guessing the perception collector is owned by the AI controlled agent. So we're telling it here that is has perceived a state change... // // ...so that it can tell OpenCog...i.e. the agent in the cogserver... // UnityEngine.GameObject[] OCAs = UnityEngine.GameObject.FindGameObjectsWithTag("OCA"); // // foreach(UnityEngine.GameObject OCA in OCAs) // { // OCPerceptionCollector pCollector = OCA.GetComponent<OCPerceptionCollector>() as OCPerceptionCollector; // if(pCollector != null) // { // pCollector.AddNewState(aInfo); // } // } }
int UnityEngineBehaviour_g_get_isActiveAndEnabled(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.Behaviour gen_to_be_invoked = (UnityEngine.Behaviour)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isActiveAndEnabled); return(1); }
static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *__ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = new UnityEngine.Behaviour(); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
int UnityEngineBehaviour_s_set_enabled(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; UnityEngine.Behaviour gen_to_be_invoked = (UnityEngine.Behaviour)translator.FastGetCSObj(L, 1); gen_to_be_invoked.enabled = LuaAPI.lua_toboolean(L, 2); return(0); }
public override void ReadFrom(object obj) { base.ReadFrom(obj); if (obj == null) { return; } UnityEngine.Behaviour o = (UnityEngine.Behaviour)obj; enabled = o.enabled; }
public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects) { obj = base.WriteTo(obj, objects); if (obj == null) { return(null); } UnityEngine.Behaviour o = (UnityEngine.Behaviour)obj; o.enabled = enabled; return(o); }
public static int set_enabled(System.IntPtr L) { if (true && LuaAPI.IsObject(L, 1) && LuaAPI.IsBool(L, 3)) { UnityEngine.Behaviour arg0 = (UnityEngine.Behaviour)LuaCallback.ToObject(L, 1); System.Boolean arg1 = (System.Boolean)LuaCallback.ToBool(L, 3); arg0.enabled = arg1; return(0); } return(0); }
public static int get_isActiveAndEnabled(System.IntPtr L) { if (true && LuaAPI.IsObject(L, 1)) { UnityEngine.Behaviour arg0 = (UnityEngine.Behaviour)LuaCallback.ToObject(L, 1); System.Boolean res = arg0.isActiveAndEnabled; LuaCallback.PushBool(L, res); return(1); } return(0); }
static int _s_set_enabled(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.Behaviour __cl_gen_to_be_invoked = (UnityEngine.Behaviour)translator.FastGetCSObj(L, 1); __cl_gen_to_be_invoked.enabled = LuaAPI.lua_toboolean(L, 2); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(0); }
static int _g_get_isActiveAndEnabled(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.Behaviour __cl_gen_to_be_invoked = (UnityEngine.Behaviour)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushboolean(L, __cl_gen_to_be_invoked.isActiveAndEnabled); } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(1); }
int __CreateInstanceUnityEngineBehaviour(RealStatePtr L, int gen_param_count) { ObjectTranslator translator = this; if (gen_param_count == 1) { UnityEngine.Behaviour gen_ret = new UnityEngine.Behaviour(); translator.Push(L, gen_ret); return(1); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Behaviour constructor!")); }
static StackObject *get_isActiveAndEnabled_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Behaviour instance_of_this_method = (UnityEngine.Behaviour) typeof(UnityEngine.Behaviour).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = instance_of_this_method.isActiveAndEnabled; __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return(__ret + 1); }
static StackObject *set_enabled_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.Boolean @value = ptr_of_this_method->Value == 1; ptr_of_this_method = ILIntepreter.Minus(__esp, 2); UnityEngine.Behaviour instance_of_this_method = (UnityEngine.Behaviour) typeof(UnityEngine.Behaviour).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0); __intp.Free(ptr_of_this_method); instance_of_this_method.enabled = value; return(__ret); }
static int __CreateInstance(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { if (LuaAPI.lua_gettop(L) == 1) { UnityEngine.Behaviour __cl_gen_ret = new UnityEngine.Behaviour(); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Behaviour constructor!")); }
static StackObject *GetActive_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); UnityEngine.Behaviour @mb = (UnityEngine.Behaviour) typeof(UnityEngine.Behaviour).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); var result_of_this_method = global::NGUITools.GetActive(@mb); __ret->ObjectType = ObjectTypes.Integer; __ret->Value = result_of_this_method ? 1 : 0; return(__ret + 1); }
private static IntPtr Constructor(IntPtr isolate, IntPtr info, int paramLen, long data) { try { { { var result = new UnityEngine.Behaviour(); return(Puerts.Utils.GetObjectPtr((int)data, typeof(UnityEngine.Behaviour), result)); } } } catch (Exception e) { Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace); } return(IntPtr.Zero); }