public StaticArcher(IAttackComponent iAtackComponent, IProjectileComponent iProjectileComponent, int maxLife, double agressionRadius, int attackSpeed, int speed, Vector position, double size) : base(agressionRadius, attackSpeed, maxLife, speed, position, size) { this.iAtackComponent = iAtackComponent; this.iProjectileComponent = iProjectileComponent; StartAtackTask(ExecuteAtack); }
public override void Exec(IProjectileComponent iProjectileComponent, Creature.Vector sourcePosition, Creature.Vector targetPosition) { base.Exec(iProjectileComponent, sourcePosition, targetPosition); Thread.Sleep(100); base.ThrowProjectile(iProjectileComponent, sourcePosition, targetPosition); }
public virtual void Exec(IProjectileComponent iProjectileComponent, Creature.Vector sourcePosition, Creature.Vector targetPosition) { iAttackComponent.Exec(iProjectileComponent, sourcePosition, targetPosition); }
public void ThrowProjectile(IProjectileComponent iProjectileComponent, Creature.Vector sourcePosition, Creature.Vector targetPosition) { (iAttackComponent as IRangeAttack)?.ThrowProjectile(iProjectileComponent, sourcePosition, targetPosition); }
public FireProjectile(IProjectileComponent iProjectileComponent) : base(iProjectileComponent) { }
public BaseProjectileDecorator(IProjectileComponent iProjectileComponent) { this.iProjectileComponent = iProjectileComponent; }
public void Exec(IProjectileComponent iProjectileComponent, Creature.Vector sourcePosition, Creature.Vector targetPosition) { ThrowProjectile(iProjectileComponent, sourcePosition, targetPosition); }
public void ThrowProjectile(IProjectileComponent iProjectileComponent, Creature.Vector sourcePosition, Creature.Vector targetPosition) { iProjectileComponent.DoDamage(); }