static int CallLater(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2) { FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.CheckObject <FairyGUI.Timers>(L, 1); FairyGUI.TimerCallback arg0 = (FairyGUI.TimerCallback)ToLua.CheckDelegate <FairyGUI.TimerCallback>(L, 2); obj.CallLater(arg0); return(0); } else if (count == 3) { FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.CheckObject <FairyGUI.Timers>(L, 1); FairyGUI.TimerCallback arg0 = (FairyGUI.TimerCallback)ToLua.CheckDelegate <FairyGUI.TimerCallback>(L, 2); object arg1 = ToLua.ToVarObject(L, 3); obj.CallLater(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.Timers.CallLater")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Remove(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.CheckObject(L, 1, typeof(FairyGUI.Timers)); FairyGUI.TimerCallback arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (FairyGUI.TimerCallback)ToLua.CheckObject(L, 2, typeof(FairyGUI.TimerCallback)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(FairyGUI.TimerCallback), func) as FairyGUI.TimerCallback; } obj.Remove(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Add(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 4) { FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.CheckObject <FairyGUI.Timers>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); int arg1 = (int)LuaDLL.luaL_checknumber(L, 3); FairyGUI.TimerCallback arg2 = (FairyGUI.TimerCallback)ToLua.CheckDelegate <FairyGUI.TimerCallback>(L, 4); obj.Add(arg0, arg1, arg2); return(0); } else if (count == 5) { FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.CheckObject <FairyGUI.Timers>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); int arg1 = (int)LuaDLL.luaL_checknumber(L, 3); FairyGUI.TimerCallback arg2 = (FairyGUI.TimerCallback)ToLua.CheckDelegate <FairyGUI.TimerCallback>(L, 4); object arg3 = ToLua.ToVarObject(L, 5); obj.Add(arg0, arg1, arg2, arg3); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.Timers.Add")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int AddUpdate(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 2) { FairyGUI.Timers self = (FairyGUI.Timers)checkSelf(l); FairyGUI.TimerCallback a1; LuaDelegation.checkDelegate(l, 2, out a1); self.AddUpdate(a1); pushValue(l, true); return(1); } else if (argc == 3) { FairyGUI.Timers self = (FairyGUI.Timers)checkSelf(l); FairyGUI.TimerCallback a1; LuaDelegation.checkDelegate(l, 2, out a1); System.Object a2; checkType(l, 3, out a2); self.AddUpdate(a1, a2); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
static int Add(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.Timers), typeof(float), typeof(int), typeof(FairyGUI.TimerCallback))) { FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.ToObject(L, 1); float arg0 = (float)LuaDLL.lua_tonumber(L, 2); int arg1 = (int)LuaDLL.lua_tonumber(L, 3); FairyGUI.TimerCallback arg2 = null; LuaTypes funcType4 = LuaDLL.lua_type(L, 4); if (funcType4 != LuaTypes.LUA_TFUNCTION) { arg2 = (FairyGUI.TimerCallback)ToLua.ToObject(L, 4); } else { LuaFunction func = ToLua.ToLuaFunction(L, 4); arg2 = DelegateFactory.CreateDelegate(typeof(FairyGUI.TimerCallback), func) as FairyGUI.TimerCallback; } obj.Add(arg0, arg1, arg2); return(0); } else if (count == 5 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.Timers), typeof(float), typeof(int), typeof(FairyGUI.TimerCallback), typeof(object))) { FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.ToObject(L, 1); float arg0 = (float)LuaDLL.lua_tonumber(L, 2); int arg1 = (int)LuaDLL.lua_tonumber(L, 3); FairyGUI.TimerCallback arg2 = null; LuaTypes funcType4 = LuaDLL.lua_type(L, 4); if (funcType4 != LuaTypes.LUA_TFUNCTION) { arg2 = (FairyGUI.TimerCallback)ToLua.ToObject(L, 4); } else { LuaFunction func = ToLua.ToLuaFunction(L, 4); arg2 = DelegateFactory.CreateDelegate(typeof(FairyGUI.TimerCallback), func) as FairyGUI.TimerCallback; } object arg3 = ToLua.ToVarObject(L, 5); obj.Add(arg0, arg1, arg2, arg3); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.Timers.Add")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int CallLater(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.Timers), typeof(FairyGUI.TimerCallback))) { FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.ToObject(L, 1); FairyGUI.TimerCallback arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (FairyGUI.TimerCallback)ToLua.ToObject(L, 2); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(FairyGUI.TimerCallback), func) as FairyGUI.TimerCallback; } obj.CallLater(arg0); return(0); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.Timers), typeof(FairyGUI.TimerCallback), typeof(object))) { FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.ToObject(L, 1); FairyGUI.TimerCallback arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (FairyGUI.TimerCallback)ToLua.ToObject(L, 2); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(FairyGUI.TimerCallback), func) as FairyGUI.TimerCallback; } object arg1 = ToLua.ToVarObject(L, 3); obj.CallLater(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.Timers.CallLater")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int Update(IntPtr l) { try { FairyGUI.Timers self = (FairyGUI.Timers)checkSelf(l); self.Update(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int constructor(IntPtr l) { try { FairyGUI.Timers o; o = new FairyGUI.Timers(); pushValue(l, true); pushValue(l, o); return(2); } catch (Exception e) { return(error(l, e)); } }
static int Update(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.CheckObject(L, 1, typeof(FairyGUI.Timers)); obj.Update(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int Remove(IntPtr l) { try { FairyGUI.Timers self = (FairyGUI.Timers)checkSelf(l); FairyGUI.TimerCallback a1; LuaDelegation.checkDelegate(l, 2, out a1); self.Remove(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
public Timers() { inst = this; gameObject = new GameObject(); gameObject.hideFlags = HideFlags.HideInHierarchy; gameObject.SetActive(true); gameObject.AddComponent<TimersEngine>(); Object.DontDestroyOnLoad(gameObject); _items = new Dictionary<TimerCallback, Anymous_T>(); _toAdd = new Dictionary<TimerCallback, Anymous_T>(); _toRemove = new List<Anymous_T>(); _pool = new List<Anymous_T>(100); _lastTime = Time.time; }
static int StartCoroutine(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.CheckObject(L, 1, typeof(FairyGUI.Timers)); System.Collections.IEnumerator arg0 = (System.Collections.IEnumerator)ToLua.CheckObject(L, 2, typeof(System.Collections.IEnumerator)); obj.StartCoroutine(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int Remove(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.CheckObject <FairyGUI.Timers>(L, 1); FairyGUI.TimerCallback arg0 = (FairyGUI.TimerCallback)ToLua.CheckDelegate <FairyGUI.TimerCallback>(L, 2); obj.Remove(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static public int Exists(IntPtr l) { try { FairyGUI.Timers self = (FairyGUI.Timers)checkSelf(l); FairyGUI.TimerCallback a1; LuaDelegation.checkDelegate(l, 2, out a1); var ret = self.Exists(a1); pushValue(l, true); pushValue(l, ret); return(2); } catch (Exception e) { return(error(l, e)); } }
static int Exists(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); FairyGUI.Timers obj = (FairyGUI.Timers)ToLua.CheckObject <FairyGUI.Timers>(L, 1); FairyGUI.TimerCallback arg0 = (FairyGUI.TimerCallback)ToLua.CheckDelegate <FairyGUI.TimerCallback>(L, 2); bool o = obj.Exists(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int _CreateFairyGUI_Timers(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 0) { FairyGUI.Timers obj = new FairyGUI.Timers(); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FairyGUI.Timers.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static void ClearStatic() { _inst = null; }