public void ActivateTrap(PlayerScript player) { //if the trap is active if (IsActive) { //apply the damage to the player player.ApplyDamage(1.0f * player.Skills.GetPlayerHealthMax() * Time.deltaTime); } }
public void ActivateTrap(PlayerScript player) { //apply the damage to the character if (!wasActivated) { player.ApplyDamage(0.25f * player.Skills.GetPlayerHealthMax()); //turn on the explosion exploding = true; explosionTimer = ExplosionDuration; this.GetComponentInChildren<ParticleSystem>().enableEmission = true; audio.Play(); } wasActivated = true; }
public override void Effect(PlayerScript player) { player.ApplyDamage(player.damage.Value()); player.RemoveBuff(this); }