Esempio n. 1
0
    /* When a button is clicked, call the StartGame() method
     * and pass it the difficulty value (1, 2, 3) from the button
     */
    void SetDifficulty()
    {
        Debug.Log(button.gameObject.name + " was clicked");

        //set difficulty in the manager based on the difficulty variable.
        gameManagerX.SetNewDifficulty(difficulty);
        gameManagerX.StartGame();
    }
 /* When a button is clicked, call the StartGame() method
  * and pass it the difficulty value (1, 2, 3) from the button
  */
 void SetDifficulty()
 {
     Debug.Log(button.gameObject.name + " was clicked");
     if (difficulty == 1)
     {
         gameManagerX.spawnRate = 4;
     }
     if (difficulty == 2)
     {
         gameManagerX.spawnRate = 3;
     }
     if (difficulty == 3)
     {
         gameManagerX.spawnRate = 2;
     }
     gameManagerX.StartGame();
 }
Esempio n. 3
0
    /* When a button is clicked, call the StartGame() method
     * and pass it the difficulty value (1, 2, 3) from the button
     */
    void SetDifficulty()
    {
        int index = 0;

        switch (gameObject.name)
        {
        case "Easy Button":
            index = 0;
            break;

        case "Medium Button":
            index = 1;
            break;

        case "Hard Button":
            index = 2;
            break;
        }
        Debug.Log(button.gameObject.name + " was clicked =" + _difficulty[index]);
        gameManagerX.StartGame(_difficulty[index]);
    }
Esempio n. 4
0
    /* When a button is clicked, call the StartGame() method
     * and pass it the difficulty value (1, 2, 3) from the button
     */
    void SetDifficulty()
    {
        Debug.Log(button.gameObject.name + " was clicked");
        switch (button.gameObject.name)
        {
        case "Easy":
            difficulty = 1;
            break;

        case "Medium":
            difficulty = 2;
            break;

        case "Hard":
            difficulty = 3;
            break;

        default:
            break;
        }
        gameManagerX.StartGame(difficulty);
    }
 /* When a button is clicked, call the StartGame() method
  * and pass it the difficulty value (1, 2, 3) from the button
  */
 void SetDifficulty()
 {
     Debug.Log(button.gameObject.name + " was clicked" + difficulty);
     gameManagerX.StartGame(difficulty);
 }
Esempio n. 6
0
 /* When a button is clicked, call the StartGame() method
  * and pass it the difficulty value (1, 2, 3) from the button
  */
 void SetDifficulty()
 {
     Debug.Log(button.gameObject.name + " was clicked");
     gameManagerX.StartGame(difficulty);
     countDown.StartTimer();
 }
Esempio n. 7
0
 /* When a button is clicked, call the StartGame() method
  * and pass it the difficulty value (1, 2, 3) from the button
  */
 void SetDifficulty()
 {
     Debug.Log(button.gameObject.name + " was clicked");
     gameManagerX.StartGame(difficulty); //inserting difficulty here
 }
Esempio n. 8
0
 /* When a button is clicked, call the StartGame() method
  * and pass it the difficulty value (1, 2, 3) from the button
  */
 void SetDifficulty()
 {
     gameManagerX.StartGame(difficulty);
 }