Esempio n. 1
0
        public override void AI()
        {
            Vector2 endPos = BaseWhip.WhipAI(projectile, whipLength);

            //Dust effect at the end
            if (BaseWhip.IsCrit(projectile, doubleCritWindow))
            {
                for (int i = 0; i < 2; i++)
                {
                    Dust dust = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, 6, 0f, 0f, 0, Color.Transparent, 2.6f)];
                    dust.noGravity = true;
                    dust.velocity += projectile.localAI[0].ToRotationVector2();
                }
            }

            //Dust along projectile
            for (int i = 0; i < 18; i++)
            {
                if (Main.rand.Next(16) == 0)
                {
                    Vector2 position = projectile.position + projectile.velocity + projectile.velocity * ((float)i / 18);
                    Dust    dust2    = Main.dust[Dust.NewDust(position, projectile.width, projectile.height, 6, 0f, 0f, 0, Color.Transparent, 1.4f)];
                    dust2.noGravity = true;
                    dust2.velocity += projectile.localAI[0].ToRotationVector2();
                }
            }
        }
Esempio n. 2
0
        public override void AI()
        {
            Vector2 endPos = BaseWhip.WhipAI(projectile, whipLength);

            //Dust effect at the end
            if (BaseWhip.IsCrit(projectile, doubleCritWindow))
            {
                for (int i = 0; i < 2; i++)
                {
                    Dust dust = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, 50, 0f, 0f, 0, Color.Transparent, 1.2f)];
                    dust.noGravity = true;
                }
            }
            else
            {
                if (Main.rand.Next(2) == 0)
                {
                    Dust dust = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, 40, 0f, 0f, 0, Color.Transparent, 1.5f)];
                    dust.noGravity = true;
                }
            }
        }
        public override void AI()
        {
            Vector2 endPos = BaseWhip.WhipAI(projectile, whipLength);

            //Dust effect at the end
            if (BaseWhip.IsCrit(projectile, doubleCritWindow))
            {
                for (int i = 0; i < 3; i++)
                {
                    Dust dust = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, 68 + i, 0f, 0f, 240, default(Color), 1.5f)];
                    dust.noGravity = true;
                }
            }

            //Dust along projectile
            Dust dust2 = Main.dust[Dust.NewDust(endPos, projectile.width, projectile.height, Main.rand.Next(68, 71), 0f, 0f, 200, default(Color), 1.3f)];

            dust2.noGravity = true;
            dust2.velocity += projectile.localAI[0].ToRotationVector2();

            Lighting.AddLight(endPos, projectile.light, projectile.light * 0.3f, projectile.light);
        }