Beispiel #1
0
 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");
     }
 }
Beispiel #2
0
 void Start()
 {
     Drone     = GetComponent <Rigidbody>();
     LifeAtual = DanoSofrido.FULL_HEALTH;
     health    = maxhealth;
 }