Beispiel #1
0
        public override void Update()
        {
            currentMove.Execute();

            if (this.GetWorld().GetActors()
                .Exists(a => this.IntersectsWithActor(a) && a != this.caster && a is ICharacter))
            {
                ICharacter hit = (ICharacter)this.GetWorld().GetActors()
                                 .Find(a => this.IntersectsWithActor(a) && a != this && a is ICharacter);
                effects.ForEach(e => hit.AddEffect(e));
                animation.Stop();
                this.RemoveFromWorld();
            }

            if (this.GetWorld().IntersectWithWall(this))
            {
                animation.Stop();
                this.RemoveFromWorld();
            }
        }
 public void ApplyEffect(ICharacter character)
 {
     SetTime();
     character.AddEffect(this);
 }