Пример #1
0
    public void IncreaseScore(int amount)
    {
        // increase score by the amount
        score += amount;

        // Update HUD
        if (hudManager != null)
        {
            hudManager.ResetHud();
        }

        // have we surpassed out high score
        if (score > highScore)
        {
            // set a new highscore
            highScore = score;

            print("New Record! " + score);
        }
        else
        {
            // show the new score
            print("New Score: " + score);
        }
    }
Пример #2
0
 public void IncreaseScore(int amount)
 {
     Score += amount;
     if (Score > HighScore)
     {
         HighScore = Score;
     }
     if (HudManager != null)
     {
         HudManager.ResetHud();
     }
 }
    public void IncreaseScore(int amount)
    {
        score += amount;
        if (hudManager != null)
        {
            hudManager.ResetHud();
        }
        print("new score: " + score);

        if (score > highScore)
        {
            highScore = score;
            print("new high score: " + highScore);
        }
    }
    //increase the score
    public void IncreaseScore(int amount)
    {
        Score += amount;

        //show new score
        //print("new score: " + Score);
        //Update Hud
        Debug.Assert(_hudManager != null, "hudManager = null");
        _hudManager.ResetHud();

        if (Score > HighScore)
        {
            HighScore = Score;
            //print("new High score: "+ HighScore);
        }
    }
Пример #5
0
    public void IncreaseScore(int amount)
    {
        score += amount;

        if (score > highScore)
        {
            highScore = score;
        }

        if (hudManager != null)
        {
            hudManager.ResetHud();
        }
        else
        {
            hudManager = FindObjectOfType <HudManager>();
            hudManager.ResetHud();
        }
    }
Пример #6
0
    // increase the player score
    public void IncreaseScore(int amount)
    {
        // increase score by the amount
        score += amount;

        // update the HUD
        if (hudManager != null)
        {
            hudManager.ResetHud();
        }

        // show the new score
        //   print("new score: " + score);

        // have we surpassed our high score?
        if (score > highScore)
        {
            // save a new high score
            highScore = score;

            //  print("new record! " + highScore);
        }
    }
Пример #7
0
    public void ResetGame()
    {
        score        = 0;
        currentLevel = 1;

        if (hudManager != null)
        {
            hudManager.ResetHud();
        }
        else
        {
            hudManager = FindObjectOfType <HudManager>();
            hudManager.ResetHud();
        }


        SceneManager.LoadScene("Level1");
    }
Пример #8
0
 /// <summary>
 /// Reset a player's HUD back to the pre-game state
 /// </summary>
 /// <param name="playerId">
 /// A <see cref="UUID"/>
 /// </param>
 public void ResetHud(UUID playerId)
 {
     HudManager.ResetHud(playerId);
 }