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