示例#1
0
    private void LevelComplete()
    {
        // Display GameOver screen with score based on ammo left
        int score = Pistol.GetAmmoCount() + Cannon.GetAmmoCount() * 5 + Shotgun.GetAmmoCount() / 5;

        timer.gameOver    = true;
        gameOverText.text = "Good job!";
        scoreText.text    = "Score: " + score;
    }
示例#2
0
 private bool OutOfAmmo()
 {
     return(Pistol.GetAmmoCount() == 0 && Cannon.GetAmmoCount() == 0 && Shotgun.GetAmmoCount() == 0);
 }