Exemplo n.º 1
0
        /// <summary>
        /// 初始化游戏核心
        /// </summary>
        public void InitGameCore(GameObject gameObject)
        {
            //初始化各种管理器
            resourceMgr = ResourcesMgr.GetInstance();

            gameLauncherObj = gameObject;
            sceneMgr        = gameObject.AddComponent <SceneMgr>();
            audioManager    = AudioManager.Instance;
            inputMgr        = gameLauncherObj.AddComponent <InputMgr>();

            GameStart();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 初始化游戏核心
        /// </summary>
        public void InitGameCore(GameObject gameObject)
        {
            init = false;

            AssetLoader.Initialize(() =>
            {
                gameLauncherObj  = gameObject;
                sceneMgr         = gameObject.AddComponent <SceneMgr>();
                audioManager     = AudioManager.Instance;
                timerManager     = TimerManager.Instance;
                inputMgr         = gameLauncherObj.AddComponent <InputMgr>();
                netMessageCenter = NetMessageCenter.Instance;

                GameStart();
            }, (error) => { Debug.Log(error); });
        }