Exemplo n.º 1
0
 public void dealDamage(float damage)
 {
     health -= damage;
     checkDeath();
     if (!bleeding)
     {
         bleeding = true;
         StartCoroutine(bleed());
         ai.changeState(FishAI.states.fleeing);
     }
 }
Exemplo n.º 2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Spear")
     {
         ai.changeState(FishAI.states.scared);
     }
 }