Ejemplo n.º 1
0
    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");
    }
Ejemplo n.º 2
0
    //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();
    }
Ejemplo n.º 3
0
 public void CycleDifficulty()
 {
     difficulty          = NextFromArray <GameDifficulty.DifficultyLevel>(difficulty, difficulties);
     difficultyText.text = difficulty.ToString();
 }
Ejemplo n.º 4
0
 void LoadDifficulty()
 {
     difficulty     = GameDifficulty.ParseGameDifficulty(PlayerPrefManager.GetString("game_difficulty"));
     playerMaxLives = GameDifficulty.GetPlayerLives(difficulty);
     Debug.Log(difficulty);
 }