//This function is called to reduce player HP and handle death
 public void DamagePlayer(int dmg)
 {
     if (mPlayerCharacter.InflictDamage(dmg))
     {
         mCurrentDifficulty.Stop();
         mGameOverTime = Time.timeSinceLevelLoad;
         mGameStatus   = State.GameOver;
         GameText.text = string.Format("You Died!");
     }
 }
Пример #2
0
 // End the game.
 public void GameOver()
 {
     ShowNewHighScore();
     mCurrentDifficulty.Stop();
     mGameStatus = State.GameOver;
 }