Exemplo n.º 1
0
 public void TakeDamage(int damage)
 {
     health -= damage;
     if ((id == 1) == LoginScreen._Instance.game.iAmRed)
     {
         GameObject.Find("health").GetComponent <Text>().text = "Health: " + health + "/" + maxHealth;
         if (health < 1)
         {
             LoginScreen.Die();
         }
     }
 }