Exemple #1
0
        private static void Spawn_WallOfFleshGoatMountFlames(ParticleOrchestraSettings settings)
        {
            float num = 50f;

            for (int i = -1; i <= 1; i++)
            {
                int num2 = Main.rand.NextFromList(new short[3]
                {
                    326,
                    327,
                    328
                });
                Main.instance.LoadProjectile(num2);
                Player        player        = Main.player[settings.IndexOfPlayerWhoInvokedThis];
                float         scaleFactor   = Main.rand.NextFloat() * 0.9f + 0.1f;
                Vector2       vector        = settings.PositionInWorld + new Vector2((float)i * 5.33333349f, 0f);
                FlameParticle flameParticle = _poolFlame.RequestParticle();
                flameParticle.SetBasicInfo(TextureAssets.Projectile[num2], null, Vector2.Zero, vector);
                flameParticle.SetTypeInfo(num, settings.IndexOfPlayerWhoInvokedThis, player.cMount);
                flameParticle.FadeOutNormalizedTime = 0.3f;
                flameParticle.ScaleAcceleration     = Vector2.One * scaleFactor * -0.0166666675f / num;
                flameParticle.Scale = Vector2.One * scaleFactor;
                Main.ParticleSystem_World_BehindPlayers.Add(flameParticle);
                if (Main.rand.Next(8) == 0)
                {
                    Dust dust = Dust.NewDustDirect(vector, 4, 4, 6, 0f, 0f, 100);
                    if (Main.rand.Next(2) == 0)
                    {
                        dust.noGravity = true;
                        dust.fadeIn    = 1.15f;
                    }
                    else
                    {
                        dust.scale = 0.6f;
                    }
                    dust.velocity   *= 0.6f;
                    dust.velocity.Y -= 1.2f;
                    dust.noLight     = true;
                    dust.position.Y -= 4f;
                    dust.shader      = GameShaders.Armor.GetSecondaryShader(player.cMount, player);
                }
            }
        }
        private static void Spawn_WallOfFleshGoatMountFlames(ParticleOrchestraSettings settings)
        {
            float timeToLive = 50f;

            for (int index = -1; index <= 1; ++index)
            {
                int i = (int)Main.rand.NextFromList <short>((short)326, (short)327, (short)328);
                Main.instance.LoadProjectile(i);
                Player        player        = Main.player[(int)settings.IndexOfPlayerWhoInvokedThis];
                float         num           = (float)((double)Main.rand.NextFloat() * 0.899999976158142 + 0.100000001490116);
                Vector2       vector2       = settings.PositionInWorld + new Vector2((float)index * 5.333333f, 0.0f);
                FlameParticle flameParticle = ParticleOrchestrator._poolFlame.RequestParticle();
                flameParticle.SetBasicInfo(TextureAssets.Projectile[i], new Rectangle?(), Vector2.Zero, vector2);
                flameParticle.SetTypeInfo(timeToLive, (int)settings.IndexOfPlayerWhoInvokedThis, player.cMount);
                flameParticle.FadeOutNormalizedTime = 0.3f;
                flameParticle.ScaleAcceleration     = Vector2.One * num * -0.01666667f / timeToLive;
                flameParticle.Scale = Vector2.One * num;
                Main.ParticleSystem_World_BehindPlayers.Add((IParticle)flameParticle);
                if (Main.rand.Next(8) == 0)
                {
                    Dust dust = Dust.NewDustDirect(vector2, 4, 4, 6, 0.0f, 0.0f, 100, new Color(), 1f);
                    if (Main.rand.Next(2) == 0)
                    {
                        dust.noGravity = true;
                        dust.fadeIn    = 1.15f;
                    }
                    else
                    {
                        dust.scale = 0.6f;
                    }
                    dust.velocity   *= 0.6f;
                    dust.velocity.Y -= 1.2f;
                    dust.noLight     = true;
                    dust.position.Y -= 4f;
                    dust.shader      = GameShaders.Armor.GetSecondaryShader(player.cMount, player);
                }
            }
        }