Esempio n. 1
0
 public VolleyProjectile(Game game, Creature attacker, FrostShot frostShot, float damage, float duration, AreaOfEffectTracker data)
     : base(game, attacker, null)
 {
     this.frostShot = frostShot;
     this.damage = damage;
     this.duration = TimeSpan.FromSeconds(duration);
     this.data = data;
     onHit = volleyOnHit;
 }
Esempio n. 2
0
        protected override void activateAbility()
        {
            player.creature.direction = LocationAnalysis.GetInputDirection(player);
            AreaOfEffectTracker data = new AreaOfEffectTracker(player.game, duration, null);
            for (int x = 0; x < 7; ++x)
            {
                int direction = 1;
                if(Convert.ToBoolean(player.creature.direction))
                    direction = -1;
                double deviation = 0.1413;
                float adjustedAngle = (float)(player.userInput.InputAngle + ((x- 3) * deviation));
                Vector2 positionAdjustment = Vector2.Normalize(new Vector2(((float)Math.Cos(adjustedAngle)), ((float)Math.Sin(adjustedAngle)))) * 100;

                VolleyProjectile projectile = new VolleyProjectile(player.game, player.creature, frostShot, (float)damage + player.creature.getDamage(), duration, data);
                projectile.LoadContent(player.creature.world, "AsheFrostArrow", player.creature.DisplayPosition + Vector2.UnitX * player.creature.Center.X / 4 * -direction + positionAdjustment, 1f, adjustedAngle);
                projectile.Initialize();
            }
        }