コード例 #1
0
 static int RemoveTimerEvent(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.RemoveTimerEvent(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #2
0
 static int StopTimerEvent(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.StopTimerEvent(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #3
0
    static int get_tick(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo obj = (LuaFramework.TimerInfo)o;
            long ret = obj.tick;
            LuaDLL.tolua_pushint64(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index tick on a nil value"));
        }
    }
コード例 #4
0
    static int get_className(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo obj = (LuaFramework.TimerInfo)o;
            string ret = obj.className;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index className on a nil value"));
        }
    }
コード例 #5
0
    static int set_className(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo obj = (LuaFramework.TimerInfo)o;
            string arg0 = ToLua.CheckString(L, 2);
            obj.className = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index className on a nil value"));
        }
    }
コード例 #6
0
    static int set_target(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo obj  = (LuaFramework.TimerInfo)o;
            UnityEngine.Object     arg0 = (UnityEngine.Object)ToLua.CheckObject <UnityEngine.Object>(L, 2);
            obj.target = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index target on a nil value"));
        }
    }
コード例 #7
0
    static int set_delete(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo obj = (LuaFramework.TimerInfo)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.delete = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index delete on a nil value"));
        }
    }
コード例 #8
0
    static int set_tick(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo obj = (LuaFramework.TimerInfo)o;
            long arg0 = LuaDLL.tolua_checkint64(L, 2);
            obj.tick = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index tick on a nil value"));
        }
    }
コード例 #9
0
    static int get_luafunc(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo   obj = (LuaFramework.TimerInfo)o;
            LuaInterface.LuaFunction ret = obj.luafunc;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index luafunc on a nil value"));
        }
    }
コード例 #10
0
    static int get_delete(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo obj = (LuaFramework.TimerInfo)o;
            bool ret = obj.delete;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index delete on a nil value"));
        }
    }
コード例 #11
0
    static int set_luafunc(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo obj  = (LuaFramework.TimerInfo)o;
            LuaFunction            arg0 = ToLua.CheckLuaFunction(L, 2);
            obj.luafunc = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index luafunc on a nil value"));
        }
    }
コード例 #12
0
    static int get_target(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LuaFramework.TimerInfo obj = (LuaFramework.TimerInfo)o;
            UnityEngine.Object     ret = obj.target;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index target on a nil value"));
        }
    }
コード例 #13
0
    static int _CreateLuaFramework_TimerInfo(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                LuaTable               arg0 = ToLua.CheckLuaTable(L, 1);
                LuaFunction            arg1 = ToLua.CheckLuaFunction(L, 2);
                LuaFramework.TimerInfo obj  = new LuaFramework.TimerInfo(arg0, arg1);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: LuaFramework.TimerInfo.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #14
0
 /// <summary>
 /// 继续计时器事件
 /// </summary>
 /// <param name="info"></param>
 public void ResumeTimerEvent(TimerInfo info) {
     if (objects.Contains(info) && info != null) {
         info.delete = false;
     }
 }
コード例 #15
0
 /// <summary>
 /// 停止计时器事件
 /// </summary>
 /// <param name="info"></param>
 public void StopTimerEvent(TimerInfo info) {
     if (objects.Contains(info) && info != null) {
         info.stop = true;
     }
 }
コード例 #16
0
 /// <summary>
 /// 删除计时器事件
 /// </summary>
 /// <param name="name"></param>
 public void RemoveTimerEvent(TimerInfo info) {
     if (objects.Contains(info) && info != null) {
         info.delete = true;
     }
 }
コード例 #17
0
 /// <summary>
 /// 添加计时器事件
 /// </summary>
 /// <param name="name"></param>
 /// <param name="o"></param>
 public void AddTimerEvent(TimerInfo info) {
     if (!objects.Contains(info)) {
         objects.Add(info);
     }
 }