Ejemplo n.º 1
0
 public RayAttack(Vector2D position) : base(position)
 {
     gridStartPosition = new Vector2D(position.X, Level.Current.Size.Height);
     gridExitPosition  = new Vector2D(position.X, 0.0f);
     timeToPassGrid    = gridExitPosition.DistanceTo(gridStartPosition) / AuraCannonSpeed;
     AddChild(EffectLoader.GetAvatarSkillEffect(AvatarAttack.DragonAuraCannon));
     Orientation = Quaternion.CreateLookAt(gridExitPosition, gridStartPosition, -Vector3D.UnitZ);
 }
Ejemplo n.º 2
0
 public Fireball(Vector2D gridPosition) : base(Vector3D.Zero)
 {
     targetPosition = new Vector3D(gridPosition);
     startPosition  = new Vector3D(Randomizer.Current.Get(-1.0f, 1.0f),
                                   Randomizer.Current.Get(-1.0f, 1.0f), 5.0f);
     Position = startPosition;
     AddChild(EffectLoader.GetAvatarSkillEffect(AvatarAttack.DragonBreathOfFire));
 }
Ejemplo n.º 3
0
 private void GetAndAttachAttackEffect()
 {
     if (AttackType == AttackType.DirectShot)
     {
         return;
     }
     attackEffect = EffectLoader.GetAttackEffect(Type, AttackType);
     AddChild(attackEffect);
 }
Ejemplo n.º 4
0
 private void VisualizeAttackDependingOnType(Creep targetCreep)
 {
     if (attackEffect != null)
     {
         attackEffect.FireBurstOfAllEmitters();                 //ncrunch: no coverage
     }
     if (AttackType == AttackType.DirectShot || Type == TowerType.Slice)
     {
         new InterpolatingProjectile(this, targetCreep,
                                     EffectLoader.GetProjectileEffect(Type, AttackType.DirectShot));
     }
 }
Ejemplo n.º 5
0
            private void ExplodeOnImpact()
            {
                EffectLoader.GetAvatarSkillHitEffect(AvatarAttack.DragonBreathOfFire).
                FireBurstAtRelativePosition(targetPosition);
                var creepsWithinRange = GetCreepsWithinRange(Position.GetVector2D(), BreathOfFireRange);

                foreach (var creep in creepsWithinRange)
                {
                    creep.ReceiveAttack(TowerType.Fire, BreathOfFireDamage);
                }
                Dispose();
            }
Ejemplo n.º 6
0
        private static void PerformAuraCannonAttack(Vector2D position)
        {
            new RayAttack(position);
            Vector2D     positionUp = position - Vector2D.UnitY;
            List <Creep> creeps     = EntitiesRunner.Current.GetEntitiesOfType <Creep>();

            foreach (var creep in creeps)
            {
                if (DistanceToLineSquared(creep, position, positionUp) <= AuraCannonRangeSquared)
                {
                    creep.ReceiveAttack(TowerType.Fire, AuraCannonDamage);
                    EffectLoader.GetAvatarSkillHitEffect(AvatarAttack.DragonAuraCannon).
                    FireBurstAtRelativePosition(creep.Position);
                }
            }
        }
Ejemplo n.º 7
0
        public virtual void SpawnHitSparks(TowerType damageType)
        {
            var hitEffect = EffectLoader.GetHitEffect(damageType);

            hitEffect.FireBurstAtRelativePosition(Position);
        }
Ejemplo n.º 8
0
        public virtual void DisplayDieEffect()
        {
            var deathParticles = EffectLoader.GetCreepDeathEffect();

            deathParticles.FireBurstAtRelativePosition(Position);
        }
Ejemplo n.º 9
0
 public PathMarker(ReturnedPath path)
 {
     Path   = path;
     effect = EffectLoader.GetTrailMarkerEffect();
 }