Beispiel #1
0
 public override void takeDamage()
 {
     if (isDead)
     {
         return;
     }
     hp--;
     if (hp <= 0)
     {
         isDead = true;
         anim.SetTrigger(StaticStrings.death);
         if (EffectDirector.instance != null)
         {
             EffectDirector.instance.generatePopUp(scorepoints);
         }
         currentAction = becameProjectile;
     }
 }
Beispiel #2
0
 public override void init()
 {
     anim          = GetComponent <Animator>();
     currentAction = takeDamage;
 }