Пример #1
0
    /// <summary>
    /// Figure out what game mode we are playing and activate/deactivate whatever is needed
    /// </summary>
    private void ActivateGameMode()
    {
        // Check the game mode using player prefs
        cardioMode = PlayerPrefs.GetInt(Constants.cardioMode) == 1 ? true : false;

        // We take care of this in the arcade section
        if (PlayerPrefs.GetInt(Constants.gameMode) == Constants.gameModeArcade)
        {
            cardioMode = false;
        }

        if (cardioMode == true)
        {
            wallSpawner.gameObject.SetActive(false);
            this.EnableDisableHandGaurdStuff(false);
            playerHitBox.EnableDisableHands(false);
        }
        else
        {
            wallSpawnerCardio.gameObject.SetActive(false);
        }

        playerHitBox.SetGameMode(cardioMode);
    }