void lavaAttack()                                                   //adds damage
    {
        if (nextDamage <= Time.time)
        {
            thePlayerHealth.addDamage(damage);
            thePlayerHealth.fireFX();

            nextDamage = Time.time + damageRate;
        }
    }
Exemple #2
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;
     }
 }