Esempio n. 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));
        }
    }
 static int GetGameSceneManager(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 0);
         pg.GameSceneMgr o = LuaFramework.LuaHelper.GetGameSceneManager();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 3
0
 static int Update(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         pg.GameSceneMgr obj = (pg.GameSceneMgr)ToLua.CheckObject <pg.GameSceneMgr>(L, 1);
         obj.Update();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 4
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));
     }
 }
Esempio n. 5
0
 static int OnReceiveLuaTable(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         pg.GameSceneMgr obj  = (pg.GameSceneMgr)ToLua.CheckObject <pg.GameSceneMgr>(L, 1);
         int             arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         object          arg1 = ToLua.ToVarObject(L, 3);
         obj.OnReceiveLuaTable(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 6
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));
     }
 }
Esempio n. 7
0
    static int set_LuaEventHandle(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            pg.GameSceneMgr obj  = (pg.GameSceneMgr)o;
            LuaFunction     arg0 = ToLua.CheckLuaFunction(L, 2);
            obj.LuaEventHandle = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index LuaEventHandle on a nil value"));
        }
    }
Esempio n. 8
0
    static int get_LuaEventHandle(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            pg.GameSceneMgr          obj = (pg.GameSceneMgr)o;
            LuaInterface.LuaFunction ret = obj.LuaEventHandle;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index LuaEventHandle on a nil value"));
        }
    }