Esempio n. 1
0
    private void Init()
    {
#if Release
        Logger.Open();
#endif
        CommandManager.GetInstance().Init();
        DataManager.GetInstance().Init();
        ResourceManager.GetInstance().Init();
        SoundManager.GetInstance().Init(GameObject.Find("Sound").transform);
        TimerManager.GetInstance().Init();
        TweenManager.GetInstance().Init();
        UIManager.GetInstance().Init();

        _fsm = new GameStateMachine();
        _fsm.Init();
        _fsm.AddState((int)eGameState.Preload, new StatePreload());
        _fsm.AddState((int)eGameState.STG, new StateSTGMain());
        _fsm.AddState((int)eGameState.Title, new StateTitle());

        _fsm.SetNextStateId((int)eGameState.Preload);
        //Application.targetFrameRate = 60;
    }