void lavaAttack() //adds damage { if (nextDamage <= Time.time) { thePlayerHealth.addDamage(damage); thePlayerHealth.fireFX(); nextDamage = Time.time + damageRate; } }
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; } }