void Start()
        {
            float a = Profile.ProfileBegin();

            ms_luaMgr      = LuaScriptMgr.Instance;
            ms_resourceMgr = ResourceMgr.Instance;
            ms_sceneMgr    = SceneMgr.Instance;
            ms_uiMgr       = UIMgr.Instance;
            ms_resourceMgr.Init();
            Profile.ProfileEnd("Mgr To Instance", a);

            a = Profile.ProfileBegin();
            ms_sceneMgr.Init();
            Profile.ProfileEnd("sceneMgr.Init", a);

            a = Profile.ProfileBegin();
            ms_uiMgr.Init();
            Profile.ProfileEnd("ms_uiMgr.Init", a);

            a = Profile.ProfileBegin();
            ms_luaMgr.Init();
            Profile.ProfileEnd("luaMgr.Init", a);
            ms_luaMgr.PrintLuaUsedMem();

            InitSDKEntry();
        }
    static int AddCacheAsset(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3)
            {
                WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
                string       arg0 = ToLua.CheckString(L, 2);
                int          arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
                obj.AddCacheAsset(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
                string       arg0 = ToLua.CheckString(L, 2);
                int          arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
                bool         arg2 = LuaDLL.luaL_checkboolean(L, 4);
                obj.AddCacheAsset(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: WCG.SceneMgr.AddCacheAsset"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #3
0
 static int set_ms_sceneMgr(IntPtr L)
 {
     try
     {
         WCG.SceneMgr arg0 = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 2);
         WCG.GameMgr.ms_sceneMgr = arg0;
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int InitSceneCallBack(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         WCG.SceneMgr obj = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         obj.InitSceneCallBack();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SetSceneBlockLoadOK(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         WCG.SceneMgr obj = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         obj.SetSceneBlockLoadOK();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int OnObjAutoDestroy(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         WCG.SceneMgr           obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
         obj.OnObjAutoDestroy(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SetSceneLightObjState(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         bool         arg0 = LuaDLL.luaL_checkboolean(L, 2);
         obj.SetSceneLightObjState(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetMainCamera(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         WCG.SceneMgr       obj = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         UnityEngine.Camera o   = obj.GetMainCamera();
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetRootRotAxis(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         WCG.SceneMgr        obj = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         UnityEngine.Vector3 o   = obj.GetRootRotAxis();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SetRootNodeHeight(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         float        arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         obj.SetRootNodeHeight(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetGraphicsPosZ(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         float        arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         float        o    = obj.GetGraphicsPosZ(arg0);
         LuaDLL.lua_pushnumber(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int ChangeSceneEx(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         int          arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         string       arg1 = ToLua.CheckString(L, 3);
         bool         arg2 = LuaDLL.luaL_checkboolean(L, 4);
         obj.ChangeSceneEx(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GenerateMap(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 5);
         WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         int          arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         int          arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         string       arg2 = ToLua.CheckString(L, 4);
         string       arg3 = ToLua.CheckString(L, 5);
         obj.GenerateMap(arg0, arg1, arg2, arg3);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SyncShderPos(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 5);
         WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         float        arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         float        arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         float        arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
         float        arg3 = (float)LuaDLL.luaL_checknumber(L, 5);
         obj.SyncShderPos(arg0, arg1, arg2, arg3);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int ChangeScene(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3)
            {
                WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
                string       arg0 = ToLua.CheckString(L, 2);
                bool         arg1 = LuaDLL.luaL_checkboolean(L, 3);
                obj.ChangeScene(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
                string       arg0 = ToLua.CheckString(L, 2);
                bool         arg1 = LuaDLL.luaL_checkboolean(L, 3);
                UnityEngine.Events.UnityAction <string> arg2 = (UnityEngine.Events.UnityAction <string>)ToLua.CheckDelegate <UnityEngine.Events.UnityAction <string> >(L, 4);
                obj.ChangeScene(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 5)
            {
                WCG.SceneMgr obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
                string       arg0 = ToLua.CheckString(L, 2);
                bool         arg1 = LuaDLL.luaL_checkboolean(L, 3);
                UnityEngine.Events.UnityAction <string> arg2 = (UnityEngine.Events.UnityAction <string>)ToLua.CheckDelegate <UnityEngine.Events.UnityAction <string> >(L, 4);
                UnityEngine.Events.UnityAction <string> arg3 = (UnityEngine.Events.UnityAction <string>)ToLua.CheckDelegate <UnityEngine.Events.UnityAction <string> >(L, 5);
                obj.ChangeScene(arg0, arg1, arg2, arg3);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: WCG.SceneMgr.ChangeScene"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int GenerateBlockInfo(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 7);
         WCG.SceneMgr           obj  = (WCG.SceneMgr)ToLua.CheckObject <WCG.SceneMgr>(L, 1);
         float                  arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         float                  arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         int                    arg2 = (int)LuaDLL.luaL_checknumber(L, 4);
         int                    arg3 = (int)LuaDLL.luaL_checknumber(L, 5);
         string                 arg4 = ToLua.CheckString(L, 6);
         float                  arg5 = (float)LuaDLL.luaL_checknumber(L, 7);
         UnityEngine.GameObject o    = obj.GenerateBlockInfo(arg0, arg1, arg2, arg3, arg4, arg5);
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }