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); } } }
protected abstract void UpdateAffectedTargets(AttackingGameObject thisObject);
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); } }
public virtual void Update(GameTime gameTime, AttackingGameObject objectUsingAbility) { this.Animation.Position = objectUsingAbility.Position; }