Beispiel #1
0
    static int DoEvent(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                pg.GameSceneMgr obj  = (pg.GameSceneMgr)ToLua.CheckObject <pg.GameSceneMgr>(L, 1);
                pg.EventEnum    arg0 = (pg.EventEnum)ToLua.CheckObject(L, 2, typeof(pg.EventEnum));
                obj.DoEvent(arg0);
                return(0);
            }
            else if (count == 3)
            {
                pg.GameSceneMgr obj  = (pg.GameSceneMgr)ToLua.CheckObject <pg.GameSceneMgr>(L, 1);
                pg.EventEnum    arg0 = (pg.EventEnum)ToLua.CheckObject(L, 2, typeof(pg.EventEnum));
                object          arg1 = ToLua.ToVarObject(L, 3);
                obj.DoEvent(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: pg.GameSceneMgr.DoEvent"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #2
0
 static int RegisterCallback(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         pg.GameSceneMgr obj  = (pg.GameSceneMgr)ToLua.CheckObject <pg.GameSceneMgr>(L, 1);
         pg.EventEnum    arg0 = (pg.EventEnum)ToLua.CheckObject(L, 2, typeof(pg.EventEnum));
         pg.GameSceneMgr.PgEventHandler arg1 = (pg.GameSceneMgr.PgEventHandler)ToLua.CheckDelegate <pg.GameSceneMgr.PgEventHandler>(L, 3);
         obj.RegisterCallback(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #3
0
 static int CallLuaFunc(IntPtr L)
 {
     try
     {
         int             count = LuaDLL.lua_gettop(L);
         pg.GameSceneMgr obj   = (pg.GameSceneMgr)ToLua.CheckObject <pg.GameSceneMgr>(L, 1);
         pg.EventEnum    arg0  = (pg.EventEnum)ToLua.CheckObject(L, 2, typeof(pg.EventEnum));
         object[]        arg1  = ToLua.ToParamsObject(L, 3, count - 2);
         obj.CallLuaFunc(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }