public void SetDifficultyForLevel(int level) { LevelDifficulty diff = diffManager.GetDifficulty(level); if (diff != null) { moveSpeed = diff.pacManSpeed; } }
// Update is called once per frame void Update() { DiffcultyDisplayer.text = difficulty.GetDifficulty().ToString(); if (Input.GetKeyDown(KeyCode.U)) { score.SetScore(980); } if (Input.GetKeyDown(KeyCode.Y)) { score.SetScore(1980); } }
public void SetDifficultyForLevel(int level) { LevelDifficulty diff = diffManager.GetDifficulty(level); if (diff != null) { scatterModeTimes = diff.scatterModeTimes; chaseModeTimes = diff.chaseModeTimes; frightenedDuration = diff.frightenedDuration; startingBlinkingAt = diff.startingBlinkingAt; switch (ghostType) { case GhostType.Red: break; case GhostType.Pink: releaseTime = diff.pinkReleaseTime; break; case GhostType.Blue: releaseTime = diff.blueReleaseTime; break; case GhostType.Orange: releaseTime = diff.orangeReleaseTime; break; default: break; } if (currentMode == Mode.Consumed) { levelSpeedIncrement = diff.consumedSpeedIncrement; } else { levelSpeedIncrement = diff.speedIncrement; } } }