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

◆ Spawn_LeafCrystalShot()

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

Definition at line 968 of file ParticleOrchestrator.cs.

969 {
970 int num = 30;
971 PrettySparkleParticle prettySparkleParticle = _poolPrettySparkle.RequestParticle();
972 Vector2 movementVector = settings.MovementVector;
973 Color value = Main.hslToRgb((float)settings.UniqueInfoPiece / 255f, 1f, 0.5f);
974 value = Color.Lerp(value, Color.Gold, (float)(int)value.R / 255f * 0.5f);
975 prettySparkleParticle.ColorTint = value;
976 prettySparkleParticle.LocalPosition = settings.PositionInWorld;
977 prettySparkleParticle.Rotation = movementVector.ToRotation();
978 prettySparkleParticle.Scale = new Vector2(4f, 1f) * 1f;
979 prettySparkleParticle.FadeInNormalizedTime = 5E-06f;
980 prettySparkleParticle.FadeOutNormalizedTime = 1f;
981 prettySparkleParticle.TimeToLive = num;
982 prettySparkleParticle.FadeOutEnd = num;
983 prettySparkleParticle.FadeInEnd = num / 2;
984 prettySparkleParticle.FadeOutStart = num / 2;
985 prettySparkleParticle.AdditiveAmount = 0.5f;
986 prettySparkleParticle.Velocity = settings.MovementVector;
987 prettySparkleParticle.LocalPosition -= prettySparkleParticle.Velocity * 4f;
988 prettySparkleParticle.DrawVerticalAxis = false;
989 Main.ParticleSystem_World_OverPlayers.Add(prettySparkleParticle);
990 }
static ParticlePool< PrettySparkleParticle > _poolPrettySparkle
static Color Lerp(Color value1, Color value2, float amount)
Definition Color.cs:491

References Terraria.GameContent.Drawing.ParticleOrchestrator._poolPrettySparkle, System.E, Microsoft.Xna.Framework.Color.Gold, Terraria.Main.hslToRgb(), Microsoft.Xna.Framework.Color.Lerp(), Terraria.GameContent.Drawing.ParticleOrchestraSettings.MovementVector, Terraria.Main.ParticleSystem_World_OverPlayers, Terraria.GameContent.Drawing.ParticleOrchestraSettings.PositionInWorld, Terraria.GameContent.Drawing.ParticleOrchestraSettings.UniqueInfoPiece, and System.value.

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