private bool CheckDeath()
 {
     //Check death or lose
     if ((Player.getHealth() <= 0) && !check)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #2
0
 // Update is called once per frame
 void Update()
 {
     //Updates the text based on player info
     mainText.text = "Health: " + carAttr.getHealth().ToString();
 }
 private void HandleHealthBar()
 {
     content.fillAmount = Map(player.getHealth(), 100.0f);
 }