Exemplo n.º 1
0
    private void StartGameManager()
    {
        try
        {
            ResourcesLoaderManager = transform.GetComponentInChildren <ResourcesLoaderManager>();
            ResourcesLoaderManager.Init();
            EventsManager.Init();

            StatesEvents  = new StatesEvents();
            StatesManager = new StatesManager();

            StatesManager.ChangeCurrentState(new Begin());
            StatesManager.ChangeCurrentState(new Run());
            PlayerEvents       = new PlayerEvents();
            TimerManager       = new TimerManager();
            PauseManager       = new PauseManager();
            DefeatUIManager    = new DefeatUIManager();
            LevelsManager      = new LevelsManager();
            LeaderBoardManager = new LeaderBoardManager();
            //test
            LeaderBoardManager.GetRequestAndInstantiateIntoCanvas();
        }
        catch (Exception e)
        {
            Debug.LogException(e);
        }
    }