Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Spawn_LeafCrystalPassive()

static void Terraria.GameContent.Drawing.ParticleOrchestrator.Spawn_LeafCrystalPassive ( ParticleOrchestraSettings settings)
inlinestaticprivate

Definition at line 942 of file ParticleOrchestrator.cs.

943 {
944 float num = 90f;
945 float num2 = (float)Math.PI * 2f * Main.rand.NextFloat();
946 float num3 = 3f;
947 for (float num4 = 0f; num4 < num3; num4 += 1f)
948 {
949 PrettySparkleParticle prettySparkleParticle = _poolPrettySparkle.RequestParticle();
950 Vector2 v = ((float)Math.PI * 2f / num3 * num4 + num2).ToRotationVector2() * 4f;
951 prettySparkleParticle.ColorTint = new Color(0.3f, 0.6f, 0.3f, 0.5f);
952 prettySparkleParticle.LocalPosition = settings.PositionInWorld;
953 prettySparkleParticle.Rotation = v.ToRotation();
954 prettySparkleParticle.Scale = new Vector2(4f, 1f) * 0.4f;
955 prettySparkleParticle.FadeInNormalizedTime = 5E-06f;
956 prettySparkleParticle.FadeOutNormalizedTime = 0.95f;
957 prettySparkleParticle.TimeToLive = num;
958 prettySparkleParticle.FadeOutEnd = num;
959 prettySparkleParticle.FadeInEnd = 10f;
960 prettySparkleParticle.FadeOutStart = 10f;
961 prettySparkleParticle.AdditiveAmount = 0.5f;
962 prettySparkleParticle.Velocity = Vector2.Zero;
963 prettySparkleParticle.DrawVerticalAxis = false;
964 Main.ParticleSystem_World_OverPlayers.Add(prettySparkleParticle);
965 }
966 }
const double PI
Definition Math.cs:16
static ParticlePool< PrettySparkleParticle > _poolPrettySparkle

References Terraria.GameContent.Drawing.ParticleOrchestrator._poolPrettySparkle, System.E, Terraria.Main.ParticleSystem_World_OverPlayers, System.Math.PI, Terraria.GameContent.Drawing.ParticleOrchestraSettings.PositionInWorld, Terraria.Main.rand, and Microsoft.Xna.Framework.Vector2.Zero.

Referenced by Terraria.GameContent.Drawing.ParticleOrchestrator.SpawnParticlesDirect().