static int _CreateLit_Unity_LuaTimerEvent(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 5) { Lit.Unity.LitLua arg0 = (Lit.Unity.LitLua)ToLua.CheckUnityObject(L, 1, typeof(Lit.Unity.LitLua)); string arg1 = ToLua.CheckString(L, 2); float arg2 = (float)LuaDLL.luaL_checknumber(L, 3); int arg3 = (int)LuaDLL.luaL_checknumber(L, 4); float arg4 = (float)LuaDLL.luaL_checknumber(L, 5); Lit.Unity.LuaTimerEvent obj = new Lit.Unity.LuaTimerEvent(arg0, arg1, arg2, arg3, arg4); ToLua.PushObject(L, obj); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Lit.Unity.LuaTimerEvent.New")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int RepeatedCall(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitLua), typeof(string), typeof(float))) { Lit.Unity.LitLua arg0 = (Lit.Unity.LitLua)ToLua.ToObject(L, 1); string arg1 = ToLua.ToString(L, 2); float arg2 = (float)LuaDLL.lua_tonumber(L, 3); Lit.Unity.LuaTimerEvent o = Lit.Unity.UI.UIUtils.RepeatedCall(arg0, arg1, arg2); ToLua.PushObject(L, o); return(1); } else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitLua), typeof(string), typeof(float), typeof(float))) { Lit.Unity.LitLua arg0 = (Lit.Unity.LitLua)ToLua.ToObject(L, 1); string arg1 = ToLua.ToString(L, 2); float arg2 = (float)LuaDLL.lua_tonumber(L, 3); float arg3 = (float)LuaDLL.lua_tonumber(L, 4); Lit.Unity.LuaTimerEvent o = Lit.Unity.UI.UIUtils.RepeatedCall(arg0, arg1, arg2, arg3); ToLua.PushObject(L, o); return(1); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: Lit.Unity.UI.UIUtils.RepeatedCall")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int CallLuaFunc(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitLua), typeof(string))) { Lit.Unity.LitLua obj = (Lit.Unity.LitLua)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); obj.CallLuaFunc(arg0); return(0); } else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(Lit.Unity.LitLua), typeof(string), typeof(object))) { Lit.Unity.LitLua obj = (Lit.Unity.LitLua)ToLua.ToObject(L, 1); string arg0 = ToLua.ToString(L, 2); object arg1 = ToLua.ToVarObject(L, 3); obj.CallLuaFunc(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: Lit.Unity.LitLua.CallLuaFunc")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static LitLua UID_Get(string uid) { LitLua ret = null; UIDMap.TryGetValue(uid, out ret); return(ret); }
public LuaTimerEvent(LitLua target, string func_name, float interval, int execTimes, float delay) { this.target = target; this.func_name = func_name; base.handler = DoHandler; base.interval = interval; base.execTimes = execTimes; base.lastTrrigerTime = Time.time - interval + delay; }
static int OnEnable(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Lit.Unity.LitLua obj = (Lit.Unity.LitLua)ToLua.CheckObject(L, 1, typeof(Lit.Unity.LitLua)); obj.OnEnable(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetLit(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); string arg0 = ToLua.CheckString(L, 1); Lit.Unity.LitLua o = Lit.Unity.UI.UIUtils.GetLit(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int RegisterLifeEvent(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Lit.Unity.LitLua obj = (Lit.Unity.LitLua)ToLua.CheckObject(L, 1, typeof(Lit.Unity.LitLua)); Lit.Unity.EventEntity arg0 = (Lit.Unity.EventEntity)ToLua.CheckObject(L, 2, typeof(Lit.Unity.EventEntity)); obj.RegisterLifeEvent(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GetParent(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); Lit.Unity.LitLua obj = (Lit.Unity.LitLua)ToLua.CheckObject(L, 1, typeof(Lit.Unity.LitLua)); Lit.Unity.LitLua o = obj.GetParent(); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int UID_Register(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); string arg0 = ToLua.CheckString(L, 1); Lit.Unity.LitLua arg1 = (Lit.Unity.LitLua)ToLua.CheckUnityObject(L, 2, typeof(Lit.Unity.LitLua)); Lit.Unity.LitLua.UID_Register(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int LoadLuafile(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Lit.Unity.LitLua obj = (Lit.Unity.LitLua)ToLua.CheckObject(L, 1, typeof(Lit.Unity.LitLua)); string arg0 = ToLua.CheckString(L, 2); obj.LoadLuafile(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int WaitFor(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); Lit.Unity.LitLua arg0 = (Lit.Unity.LitLua)ToLua.CheckUnityObject(L, 1, typeof(Lit.Unity.LitLua)); string arg1 = ToLua.CheckString(L, 2); float arg2 = (float)LuaDLL.luaL_checknumber(L, 3); Lit.Unity.UI.UIUtils.WaitFor(arg0, arg1, arg2); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GenerateEvent(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); Lit.Unity.LitLua obj = (Lit.Unity.LitLua)ToLua.CheckObject(L, 1, typeof(Lit.Unity.LitLua)); Lit.Unity.LitEventType arg0 = (Lit.Unity.LitEventType)ToLua.CheckObject(L, 2, typeof(Lit.Unity.LitEventType)); object arg1 = ToLua.ToVarObject(L, 3); obj.GenerateEvent(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int isRegisterEvent(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Lit.Unity.LitLua obj = (Lit.Unity.LitLua)ToLua.CheckObject(L, 1, typeof(Lit.Unity.LitLua)); Lit.Unity.LitEventType arg0 = (Lit.Unity.LitEventType)ToLua.CheckObject(L, 2, typeof(Lit.Unity.LitEventType)); bool o = obj.isRegisterEvent(arg0); LuaDLL.lua_pushboolean(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
public static void UID_Register(string uid, LitLua obj) { if (uid.isEmpty() || obj == null) { LitLogger.ErrorFormat("Register Invalid UID : <{0}> , <{1}>", uid, obj); } else if (UID_Contains(uid)) { LitLogger.WarningFormat("UID <{0}> repeated !! => {1} will replace by {2}", uid, UID_Get(uid), obj); UIDMap[uid] = obj; } else { UIDMap.Add(uid, obj); } }
static int GetEventEntity(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Lit.Unity.LitLua obj = (Lit.Unity.LitLua)ToLua.CheckObject(L, 1, typeof(Lit.Unity.LitLua)); Lit.Unity.LitEventType arg0 = (Lit.Unity.LitEventType)ToLua.CheckObject(L, 2, typeof(Lit.Unity.LitEventType)); Lit.Unity.EventEntity o = obj.GetEventEntity(arg0); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int RegistTimer(IntPtr L) { try { ToLua.CheckArgsCount(L, 5); Lit.Unity.LitLua arg0 = (Lit.Unity.LitLua)ToLua.CheckUnityObject(L, 1, typeof(Lit.Unity.LitLua)); string arg1 = ToLua.CheckString(L, 2); float arg2 = (float)LuaDLL.luaL_checknumber(L, 3); int arg3 = (int)LuaDLL.luaL_checknumber(L, 4); float arg4 = (float)LuaDLL.luaL_checknumber(L, 5); Lit.Unity.LuaTimerEvent o = Lit.Unity.UI.UIUtils.RegistTimer(arg0, arg1, arg2, arg3, arg4); ToLua.PushObject(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }