private void OnDifficultyChange(EventData data) { GameDifficulty.DifficultyLevel recievedDifficulty = (GameDifficulty.DifficultyLevel)data.GetInt("DifficultyValue"); float spawnRateIncrease = GameManager.gameManager.gameDifficulty.GetDifficultySpawnValue(); spawnTimer.ModifyDuration(-spawnRateIncrease); Debug.Log(spawnTimer.Duration + " is the new Spawn Interval"); }
//TODO //instead of the current style of menu do this //- void Awake() { p1Plane = Player.PlaneType.GRIFFON; p2Plane = Player.PlaneType.WASP; p1Input = PlayerInput.InputType.KEYBOARD; p2Input = PlayerInput.InputType.GAMEPAD1; difficulty = GameDifficulty.DifficultyLevel.NORMAL; stage = LevelLoader.Stage.DEBUG; SetVariablesToTextFields(); planes = GetPlanes(); inputs = GetInputs(); stages = GetStages(); difficulties = GetDifficulties(); }
public void CycleDifficulty() { difficulty = NextFromArray <GameDifficulty.DifficultyLevel>(difficulty, difficulties); difficultyText.text = difficulty.ToString(); }
void LoadDifficulty() { difficulty = GameDifficulty.ParseGameDifficulty(PlayerPrefManager.GetString("game_difficulty")); playerMaxLives = GameDifficulty.GetPlayerLives(difficulty); Debug.Log(difficulty); }