Example #1
0
 protected override void UpdateAffectedTargets(AttackingGameObject thisObject)
 {
     foreach (var enemy in OrusTheGame.Instance.GameInformation.Levels[OrusTheGame.Instance.GameInformation.CurrentLevelIndex].Enemies)
     {
         if (thisObject.CollidesForAttack(enemy,
             !thisObject.IddleAnimation.SpriteEffect.HasFlag(SpriteEffects.FlipHorizontally)))
         {
             this.AffectedTargets.Add(enemy);
         }
     }
 }
Example #2
0
 protected abstract void UpdateAffectedTargets(AttackingGameObject thisObject);
Example #3
0
 public override void Update(GameTime gameTime, AttackingGameObject objectUsingAbility)
 {
     base.Update(gameTime, objectUsingAbility);
     if (this.IsOnCooldown)
     {
         if (!this.Animation.IsActive)
         {
             if (!this.AbilityFinished)
             {
                 BattleEngine.DamageResolution(this);
                 this.AbilityFinished = true;
             }
             objectUsingAbility.IsUsingAbility = false;
         }
         this.TimeSinceUse += gameTime.ElapsedGameTime.Milliseconds / 1000;
         if (this.TimeSinceUse >= this.CooldownTime)
         {
             this.AbilityFinished = false;
             this.IsOnCooldown = false;
         }
         this.Animation.Animate(gameTime, objectUsingAbility);
     }
 }
Example #4
0
 public virtual void Update(GameTime gameTime, AttackingGameObject objectUsingAbility)
 {
     this.Animation.Position = objectUsingAbility.Position;
 }