Пример #1
0
 void Attack()                                       //what happens when enemy attacks
 {
     if (nextDamage <= Time.time)                    //rate of fire stuff, also particle triggers
     {
         thePlayerHealth.addDamage(damage);
         if (springFX)
         {
             thePlayerHealth.springFX();
         }
         if (fireFX)
         {
             thePlayerHealth.fireFX();
         }
         nextDamage = Time.time + damageRate;
     }
 }