Beispiel #1
0
 static int Do(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Util.TimerManager obj = (Util.TimerManager)ToLua.CheckObject(L, 1, typeof(Util.TimerManager));
         obj.Do();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #2
0
 static int RemoveTimer(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         Util.TimerManager obj  = (Util.TimerManager)ToLua.CheckObject(L, 1, typeof(Util.TimerManager));
         Util.Timer        arg0 = (Util.Timer)ToLua.CheckObject(L, 2, typeof(Util.Timer));
         obj.RemoveTimer(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #3
0
 static int IsEnd(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Util.TimerManager obj = (Util.TimerManager)ToLua.CheckObject(L, 1, typeof(Util.TimerManager));
         bool o = obj.IsEnd();
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #4
0
 static int DoOnce(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         Util.TimerManager obj  = (Util.TimerManager)ToLua.CheckObject(L, 1, typeof(Util.TimerManager));
         double            arg0 = (double)LuaDLL.luaL_checknumber(L, 2);
         bool o = obj.DoOnce(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #5
0
    static int get_StartTimerTick(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Util.TimerManager obj = (Util.TimerManager)o;
            double            ret = obj.StartTimerTick;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index StartTimerTick on a nil value" : e.Message));
        }
    }
Beispiel #6
0
    static int _CreateUtil_TimerManager(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                Util.TimerManager obj = new Util.TimerManager();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Util.TimerManager.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }