예제 #1
0
파일: GameMain.cs 프로젝트: inspoy/Instech
        protected override void Init()
        {
            // Framework
            FastYield.CreateSingleton();
            LogToFile.CreateSingleton();
            GameStateMachine.CreateSingleton();
            ConfigManager.CreateSingleton();
            RegisterAllConfig();
            ConfigManager.Instance.FinishInit();
            AssetBundleManagerInitOption.CreateSingleton();
            // 需要在编辑器使用AssetBundle的把下面改成true
            AssetBundleManagerInitOption.Instance.UseAssetBundle = false;
            AssetBundleManager.CreateSingleton();
            UiManager.CreateSingleton();
            RegisterAllCanvases();
            Scheduler.CreateSingleton();

            GameStateMachine.Instance.RegisterGameState(new TestState());
            GameStateMachine.Instance.ChangeState(typeof(TestState));
        }