Пример #1
0
    void Start()
    {
        Cursor.SetCursor(lobbyCursor, Vector2.zero, CursorMode.ForceSoftware);

        difficultyScroll.StartingScreen = PlayerPrefs.HasKey("DIFFICULTY") ? (int)Enum.Parse(typeof(Difficulty), PlayerPrefs.GetString("DIFFICULTY")) : 0;
        characterScroll.StartingScreen  = PlayerPrefs.HasKey("CHARACTER") ? (int)Enum.Parse(typeof(CharacterName), PlayerPrefs.GetString("CHARACTER")) : 0;

        currentDifficulty = difficultyScroll.StartingScreen < Enum.GetValues(typeof(Difficulty)).Length ? (Difficulty)difficultyScroll.StartingScreen : Difficulty.Easy;
        playerCharacter   = characterScroll.StartingScreen < Enum.GetValues(typeof(CharacterName)).Length ? (CharacterName)characterScroll.StartingScreen : CharacterName.Character1;

        StartCoroutine(overlayController.FadeColor(1f, new Color(0, 0, 0, 0)));
        StartCoroutine(overlayController.FadeValue(1f, 0));
    }