public override void OnSpawnAttempt()
        {
            HyperSpaceParticle hyperSpaceParticle = new HyperSpaceParticle();
            Vector2            screenCenter       = Main.screenPosition + new Vector2(Main.screenWidth / 2, Main.screenHeight / 2);
            Vector2            startingPosition   = new Vector2(Main.rand.NextFloat(screenCenter.X - Main.screenWidth * 2, screenCenter.X + Main.screenWidth * 2), Main.screenPosition.Y + Main.screenHeight);

            hyperSpaceParticle.Position = startingPosition;
            hyperSpaceParticle.OriginalScreenPosition = Main.screenPosition;
            hyperSpaceParticle.Velocity         = Main.rand.NextFloat(-1, -0.5f) * Vector2.UnitY;
            hyperSpaceParticle.Scale            = Main.rand.NextFloat(0.04f, 0.08f);
            hyperSpaceParticle.ParallaxStrength = hyperSpaceParticle.Scale * 5;

            ParticleHandler.SpawnParticle(hyperSpaceParticle);
        }
        public override void OnSpawnAttempt()
        {
            LanternParticle lanternParticle  = new LanternParticle();
            Vector2         screenCenter     = Main.screenPosition + new Vector2(Main.screenWidth / 2, Main.screenHeight / 2);
            Vector2         startingPosition = new Vector2(Main.rand.NextFloat(screenCenter.X - Main.screenWidth * 2, screenCenter.X + Main.screenWidth * 2), Main.screenPosition.Y + Main.screenHeight);

            lanternParticle.Position = startingPosition;
            lanternParticle.OriginalScreenPosition = Main.screenPosition;
            lanternParticle.Velocity = Main.rand.NextFloat(-1, -.3f) * Vector2.UnitY;
            lanternParticle.Scale    = Main.rand.NextFloat(0.5f, 1f);
            lanternParticle.Color    = Color.White;

            ParticleHandler.SpawnParticle(lanternParticle);
        }
Beispiel #3
0
        public override void OnSpawnAttempt()
        {
            SpiritParticle spiritParticle = new SpiritParticle();

            Vector2 screenCenter     = Main.screenPosition + new Vector2(Main.screenWidth / 2, Main.screenHeight / 2);
            Vector2 startingPosition = new Vector2(Main.rand.NextFloat(screenCenter.X - Main.screenWidth * 2, screenCenter.X + Main.screenWidth * 2), Main.screenPosition.Y + Main.screenHeight);

            spiritParticle.Position = startingPosition;
            spiritParticle.OriginalScreenPosition = Main.screenPosition;
            spiritParticle.Velocity         = Main.rand.NextFloat(-1.2f, -0.8f) * Vector2.UnitY;
            spiritParticle.Scale            = Main.rand.NextFloat(0.4f, 0.6f);
            spiritParticle.ParallaxStrength = spiritParticle.Scale;

            ParticleHandler.SpawnParticle(spiritParticle);
        }
Beispiel #4
0
        public override void OnSpawnAttempt()
        {
            AshParticle ashParticle      = new AshParticle();
            Vector2     screenCenter     = Main.screenPosition + new Vector2(Main.screenWidth / 2, Main.screenHeight / 2);
            Vector2     startingPosition = new Vector2(Main.rand.NextFloat(screenCenter.X - Main.screenWidth * 2, screenCenter.X + Main.screenWidth * 2), Main.screenPosition.Y);

            ashParticle.Position = startingPosition;
            ashParticle.OriginalScreenPosition = Main.screenPosition;
            ashParticle.Velocity = new Vector2(Main.windSpeed * 12f, Main.rand.NextFloat(1, 3f));
            ashParticle.Rotation = Main.rand.NextFloat(MathHelper.TwoPi);
            ashParticle.Scale    = Main.rand.NextFloat(0.3f, 1.05f);
            ashParticle.Color    = Color.White;

            ParticleHandler.SpawnParticle(ashParticle);
        }
Beispiel #5
0
        public override void OnSpawnAttempt()
        {
            HyperSpaceParticle hyperSpaceParticle = new HyperSpaceParticle();
            Vector2            screenCenter       = Main.screenPosition + new Vector2(Main.screenWidth / 2, Main.screenHeight / 2);
            Vector2            startingPosition   = new Vector2(Main.rand.NextFloat(screenCenter.X - Main.screenWidth * 2, screenCenter.X + Main.screenWidth * 2), Main.screenPosition.Y + Main.screenHeight);

            hyperSpaceParticle.Position = startingPosition;
            hyperSpaceParticle.OriginalScreenPosition = Main.screenPosition;
            hyperSpaceParticle.Velocity = Main.rand.NextFloat(-1, -0.5f) * Vector2.UnitY;
            hyperSpaceParticle.Rotation = Main.rand.NextFloat(MathHelper.TwoPi);
            hyperSpaceParticle.Scale    = Main.rand.NextFloat(0.4f, 0.6f);
            hyperSpaceParticle.Color    = Color.White;

            ParticleHandler.SpawnParticle(hyperSpaceParticle);
        }
Beispiel #6
0
        public override void OnSpawnAttempt()
        {
            FireParticleForeground fireParticle = new FireParticleForeground();

            Vector2 screenCenter     = Main.screenPosition + new Vector2(Main.screenWidth / 2, Main.screenHeight / 2);
            Vector2 startingPosition = new Vector2(Main.rand.NextFloat(screenCenter.X - Main.screenWidth * 2, screenCenter.X + Main.screenWidth * 2), Main.screenPosition.Y + Main.screenHeight);

            fireParticle.Position = startingPosition;
            fireParticle.OriginalScreenPosition = Main.screenPosition;
            fireParticle.Velocity         = new Vector2(0, Main.rand.NextFloat(-3, -6));
            fireParticle.Rotation         = Main.rand.NextFloat(MathHelper.PiOver4);
            fireParticle.Scale            = Main.rand.NextFloat(0.4f, 0.5f);
            fireParticle.ParallaxStrength = (float)Math.Pow(fireParticle.Scale, 3);

            ParticleHandler.SpawnParticle(fireParticle);
        }
        public override void OnSpawnAttempt()
        {
            FireParticle fireParticle = new FireParticle();

            Vector2 screenCenter     = Main.screenPosition + new Vector2(Main.screenWidth / 2, Main.screenHeight / 2);
            Vector2 startingPosition = new Vector2(Main.rand.NextFloat(screenCenter.X - Main.screenWidth * 2, screenCenter.X + Main.screenWidth * 2), Main.screenPosition.Y + Main.screenHeight);

            fireParticle.Position = startingPosition;
            fireParticle.OriginalScreenPosition = Main.screenPosition;
            fireParticle.Velocity = new Vector2(Main.windSpeed * 2f, Main.rand.NextFloat(-2, -6f));
            fireParticle.Rotation = Main.rand.NextFloat(MathHelper.PiOver4);
            fireParticle.Scale    = Main.rand.NextFloat(0.3f, 0.85f);
            fireParticle.Color    = Color.White;

            ParticleHandler.SpawnParticle(fireParticle);
        }