Ejemplo n.º 1
0
        private void EditorInit()
        {
            NBsn.C_Platform.Info();

            m_Log = new NBsn.C_Log();
            Log.Init();
            NBsn.C_PathConfig.Debug();

            m_EventMgr = new NBsn.C_EventMgr();
            EventMgr.Init();

            m_Lua = new NBsn.C_Lua();
            Lua.Init();
        }
Ejemplo n.º 2
0
        // 游戏逻辑初始化
        public void Init(GameObject goMain, NBsn.M_Main Main)
        {
            NBsn.C_Platform.Info();

            m_goMain = goMain;
            m_Main   = Main;
            m_tfMain = m_goMain.transform;

            m_Log = new NBsn.C_Log();
            Log.Init();
            NBsn.C_PathConfig.Debug();

            m_EventMgr = new NBsn.C_EventMgr();
            EventMgr.Init();

            m_Lua = new NBsn.C_Lua();
            Lua.Init();

            m_Coroutine = new NBsn.C_Coroutine();
            Coroutine.Init(m_Main);

            m_ABMgr = new NBsn.C_ABMgr();
            ABMgr.Init(null);

            m_ResMgr = new NBsn.C_ResMgr();
            ResMgr.Init();

            m_AtlasMgr = new NBsn.C_AtlasMgr();
            AtlasMgr.Init();

            m_UIMgr = new NBsn.C_UIMgr();
            UIMgr.Init(m_tfMain);

            m_LuaConsoleGesture = new NBsn.C_Gesture();
            LuaConsoleGesture.Init(
                () => {
                var pView = UIMgr.GetView("UILuaConsole") as NBsn.NMVVM.LuaConsoleV;
                pView.Show();
            }
                , EasyTouch.SwipeDirection.Right
                , EasyTouch.SwipeDirection.Down
                , EasyTouch.SwipeDirection.Left
                , EasyTouch.SwipeDirection.Up
                );

            ABMgr.LoadABManifest();
            ABMgr.LoadRes2ABId();

            Coroutine.Start(StartApp());
            // var pView = UIMgr.GetView("UIUpdate") as NBsn.NMVVM.UpdateV;
            // pView.Show();
            // //var pVM = pView.VM;
            // //pVM.TextCenter.Value = "";

            // var pUpdateRes = new NBsn.NUpdateRes.C_UpdateRes();
            // pUpdateRes.GetVerInfo();
            //Lua.DoString("require('main')");


            // C_ResLoadParam pResLoadParam = new C_ResLoadParam();
            // pResLoadParam.strPath = @"atlas\red";
            // pResLoadParam.strSuffix = "prefab";
            // var a = ResMgr.Load<Sprite>(pResLoadParam);
            // Log.Info(a);
        }