//----------------------------------------------------------------- protected void OnDestroy() { PeriodCallBackManager.GetInstance().Destroy(gameObject); ClearClick(); #if ASYNC_MODE string abName = name.ToLower().Replace("panel", ""); ResManager.UnloadAssetBundle(abName + AppConst.ExtName); #endif Util.ClearMemory(); Debug.Log("~" + name + " was destroy!"); }
static int GetInstance(IntPtr L) { try { ToLua.CheckArgsCount(L, 0); LuaFramework.PeriodCallBackManager o = SingletonManager<LuaFramework.PeriodCallBackManager>.GetInstance(); ToLua.PushObject(L, o); return 1; } catch (Exception e) { return LuaDLL.toluaL_exception(L, e); } }
static int RemoveAll(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); LuaFramework.PeriodCallBackManager obj = (LuaFramework.PeriodCallBackManager)ToLua.CheckObject <LuaFramework.PeriodCallBackManager>(L, 1); obj.RemoveAll(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Destroy(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.PeriodCallBackManager obj = (LuaFramework.PeriodCallBackManager)ToLua.CheckObject <LuaFramework.PeriodCallBackManager>(L, 1); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject)); obj.Destroy(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int RemoveCallBack(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.PeriodCallBackManager obj = (LuaFramework.PeriodCallBackManager)ToLua.CheckObject <LuaFramework.PeriodCallBackManager>(L, 1); LuaFramework.PeriodCallBackManager.CallBackEnum arg0 = (LuaFramework.PeriodCallBackManager.CallBackEnum)ToLua.CheckObject(L, 2, typeof(LuaFramework.PeriodCallBackManager.CallBackEnum)); UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.CheckObject(L, 3, typeof(UnityEngine.GameObject)); obj.RemoveCallBack(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetObjAllCallBack(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); LuaFramework.PeriodCallBackManager obj = (LuaFramework.PeriodCallBackManager)ToLua.CheckObject <LuaFramework.PeriodCallBackManager>(L, 1); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject)); System.Collections.Generic.Dictionary <string, LuaInterface.LuaFunction> o = obj.GetObjAllCallBack(arg0); ToLua.PushSealed(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int CallBack(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); LuaFramework.PeriodCallBackManager obj = (LuaFramework.PeriodCallBackManager)ToLua.CheckObject <LuaFramework.PeriodCallBackManager>(L, 1); LuaFramework.PeriodCallBackManager.CallBackEnum arg0 = (LuaFramework.PeriodCallBackManager.CallBackEnum)ToLua.CheckObject(L, 2, typeof(LuaFramework.PeriodCallBackManager.CallBackEnum)); UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.CheckObject(L, 3, typeof(UnityEngine.GameObject)); object[] arg2 = ToLua.ToParamsObject(L, 4, count - 3); obj.CallBack(arg0, arg1, arg2); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetObjCallBack(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); LuaFramework.PeriodCallBackManager obj = (LuaFramework.PeriodCallBackManager)ToLua.CheckObject <LuaFramework.PeriodCallBackManager>(L, 1); LuaFramework.PeriodCallBackManager.CallBackEnum arg0 = (LuaFramework.PeriodCallBackManager.CallBackEnum)ToLua.CheckObject(L, 2, typeof(LuaFramework.PeriodCallBackManager.CallBackEnum)); UnityEngine.GameObject arg1 = (UnityEngine.GameObject)ToLua.CheckObject(L, 3, typeof(UnityEngine.GameObject)); LuaInterface.LuaFunction o = obj.GetObjCallBack(arg0, arg1); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int _CreateLuaFramework_PeriodCallBackManager(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { LuaFramework.PeriodCallBackManager obj = new LuaFramework.PeriodCallBackManager(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: LuaFramework.PeriodCallBackManager.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
protected void OnCollisionExit(Collision collision) { //离开碰撞回调 //Util.CallMethod("EventManager", "CshapPeriodCallBack", "OnCollisionExit", gameObject, collision.gameObject); PeriodCallBackManager.GetInstance().CallBack(PeriodCallBackManager.CallBackEnum.CollisionExit, gameObject, gameObject, collision.gameObject); }
protected void OnTriggerExit(Collider other) { //离开触发器回调 //Util.CallMethod("EventManager", "CshapPeriodCallBack", "OnTriggerExit", gameObject, other.gameObject); PeriodCallBackManager.GetInstance().CallBack(PeriodCallBackManager.CallBackEnum.TriggerExit, gameObject, gameObject, other.gameObject); }
protected void Start() { // Util.CallMethod(name, "Start"); PeriodCallBackManager.GetInstance().CallBack(PeriodCallBackManager.CallBackEnum.Start, gameObject, null); }
protected void Awake() { //Util.CallMethod(name, "Awake", gameObject); //Util.CallMethod(gameObject.GetInstanceID().ToString(), "Awake", gameObject); PeriodCallBackManager.GetInstance().CallBack(PeriodCallBackManager.CallBackEnum.Awake, gameObject, null); }