Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
    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);
 }