void TakeDamage() { health -= damage; if (health <= 50) { LifeAtual = DanoSofrido.HALF_HEALTH; Debug.Log("Chegou na metade da vida"); } if (health <= 20) { LifeAtual = DanoSofrido.LOW_HEALTH; Debug.Log("Está com a vida muito baixa"); } }
void Start() { Drone = GetComponent <Rigidbody>(); LifeAtual = DanoSofrido.FULL_HEALTH; health = maxhealth; }