Exemple #1
0
    public void SetDifficulty(int difficulty)
    {
        switch (difficulty)
        {
        case 0:
            this.difficulty = GameHandler.Difficulty.Easy;
            break;

        case 1:
            this.difficulty = GameHandler.Difficulty.Normal;
            break;

        case 2:
            this.difficulty = GameHandler.Difficulty.Hard;
            break;
        }
    }
Exemple #2
0
    private float difficultyAdjust(GameHandler.Difficulty difficulty)
    {
        switch (difficulty)
        {
        case GameHandler.Difficulty.Easy:
            return(-1f);

        case GameHandler.Difficulty.Normal:
            return(0f);

        case GameHandler.Difficulty.Hard:
            return(2.5f);

        default:
            return(0f);
        }
    }
Exemple #3
0
    private void Start()
    {
        difficulty = GameHandler.Difficulty.Normal;

        DontDestroyOnLoad(transform.gameObject);
    }