Пример #1
0
    private void Start()
    {
        MainMenuStateManager.UpdateReferences();

        GetMainObjects();
        GetGameSelectionObjects();
        GetLevelSelectionObjects();
        GetOptionsObjects();
        GetCreditsObjects();
        GetNewGameWarningObjects();

        Time.timeScale = 1.0F;

        if (PlayerPrefs.HasKey("TargetState"))
        {
            SwitchTo((MainMenuState)Enum.Parse(typeof(MainMenuState), PlayerPrefs.GetString("TargetState")));
            PlayerPrefs.DeleteKey("TargetState");
        }
        else
        {
            SwitchTo(MainMenuState.Main);
        }
    }