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

◆ AI_179_FairyQueenLance()

void Terraria.Projectile.AI_179_FairyQueenLance ( )
inlineprivate

Definition at line 37006 of file Projectile.cs.

37007 {
37008 localAI[0] += 1f;
37009 if (localAI[0] >= 60f)
37010 {
37011 velocity = ai[0].ToRotationVector2() * 40f;
37012 if (Main.rand.Next(3) == 0)
37013 {
37014 Dust dust = Dust.NewDustPerfect(base.Center, 267);
37015 dust.fadeIn = 1f;
37016 dust.noGravity = true;
37017 dust.alpha = 100;
37018 dust.color = Color.Lerp(AI_171_GetColor(), Color.White, Main.rand.NextFloat() * 0.4f);
37019 dust.noLightEmittence = true;
37020 dust.scale *= 1.5f;
37021 }
37022 }
37023 if (localAI[0] >= 360f)
37024 {
37025 Kill();
37026 return;
37027 }
37028 alpha = (int)MathHelper.Lerp(255f, 0f, Utils.GetLerpValue(0f, 20f, localAI[0], clamped: true));
37029 rotation = ai[0];
37030 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
Vector2 velocity
Definition Entity.cs:16
static Color Lerp(Color value1, Color value2, float amount)
Definition Color.cs:491

References Terraria.Utils.GetLerpValue(), Microsoft.Xna.Framework.Color.Lerp(), Microsoft.Xna.Framework.MathHelper.Lerp(), Terraria.Dust.NewDustPerfect(), Terraria.Main.rand, and Microsoft.Xna.Framework.Color.White.