Пример #1
0
        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);
 }
Пример #5
0
 public FireProjectile(IProjectileComponent iProjectileComponent) : base(iProjectileComponent)
 {
 }
 public BaseProjectileDecorator(IProjectileComponent iProjectileComponent)
 {
     this.iProjectileComponent = iProjectileComponent;
 }
Пример #7
0
 public void Exec(IProjectileComponent iProjectileComponent, Creature.Vector sourcePosition, Creature.Vector targetPosition)
 {
     ThrowProjectile(iProjectileComponent, sourcePosition, targetPosition);
 }
Пример #8
0
 public void ThrowProjectile(IProjectileComponent iProjectileComponent, Creature.Vector sourcePosition, Creature.Vector targetPosition)
 {
     iProjectileComponent.DoDamage();
 }