Пример #1
0
 static int StopTimer(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         LuaFramework.TimerManager obj = (LuaFramework.TimerManager)ToLua.CheckObject <LuaFramework.TimerManager>(L, 1);
         obj.StopTimer();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #2
0
 static int GetTimerManager(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         LuaFramework.TimerManager o = LuaFramework.LuaHelper.GetTimerManager();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #3
0
 static int RemoveTimerEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.TimerManager obj  = (LuaFramework.TimerManager)ToLua.CheckObject <LuaFramework.TimerManager>(L, 1);
         LuaFramework.TimerInfo    arg0 = (LuaFramework.TimerInfo)ToLua.CheckObject <LuaFramework.TimerInfo>(L, 2);
         obj.RemoveTimerEvent(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #4
0
 static int StartTimer(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.TimerManager obj = (LuaFramework.TimerManager)ToLua.CheckObject <LuaFramework.TimerManager>(L, 1);
         float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         obj.StartTimer(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #5
0
 static int StopTimerEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.TimerManager obj  = (LuaFramework.TimerManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.TimerManager));
         LuaFramework.TimerInfo    arg0 = (LuaFramework.TimerInfo)ToLua.CheckObject(L, 2, typeof(LuaFramework.TimerInfo));
         obj.StopTimerEvent(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int RemoveTimer(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.TimerManager obj = (LuaFramework.TimerManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.TimerManager));
         string arg0 = ToLua.CheckString(L, 2);
         obj.RemoveTimer(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #7
0
    static int set_Interval(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerManager obj = (LuaFramework.TimerManager)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.Interval = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index Interval on a nil value"));
        }
    }
Пример #8
0
    static int get_Interval(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerManager obj = (LuaFramework.TimerManager)o;
            float ret = obj.Interval;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index Interval on a nil value"));
        }
    }
Пример #9
0
    static int get_GameTime(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerManager obj = (LuaFramework.TimerManager)o;
            int ret = obj.GameTime;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index GameTime on a nil value"));
        }
    }
Пример #10
0
    static int get_TimerManager(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.GameManager  obj = (LuaFramework.GameManager)o;
            LuaFramework.TimerManager ret = obj.TimerManager;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index TimerManager on a nil value"));
        }
    }
 static int AddTimer(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 5);
         LuaFramework.TimerManager obj  = (LuaFramework.TimerManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.TimerManager));
         UnityEngine.GameObject    arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
         string arg1 = ToLua.CheckString(L, 3);
         float  arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
         LuaFramework.TimerManager.UpdateFunc arg3 = (LuaFramework.TimerManager.UpdateFunc)ToLua.CheckDelegate <LuaFramework.TimerManager.UpdateFunc>(L, 5);
         obj.AddTimer(arg0, arg1, arg2, arg3);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }