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

◆ AI_180_FairyQueenSunDance()

void Terraria.Projectile.AI_180_FairyQueenSunDance ( )
inlineprivate

Definition at line 36958 of file Projectile.cs.

36959 {
36960 if (localAI[0] == 0f)
36961 {
36963 }
36964 localAI[0] += 1f;
36965 float num = 180f;
36966 _ = ai[0] / ((float)Math.PI * 2f);
36967 float num2 = (float)Math.PI / 9f;
36968 if (localAI[0] >= num)
36969 {
36970 Kill();
36971 return;
36972 }
36973 alpha -= 15;
36974 if (alpha < 0)
36975 {
36976 alpha = 0;
36977 }
36978 scale = Utils.GetLerpValue(0f, 20f, localAI[0], clamped: true) * Utils.GetLerpValue(num, num - 60f, localAI[0], clamped: true);
36979 float lerpValue = Utils.GetLerpValue(50f, num, localAI[0], clamped: true);
36980 rotation = ai[0] + lerpValue * num2;
36981 int num3 = (int)ai[1];
36982 if (Main.npc.IndexInRange(num3))
36983 {
36984 NPC nPC = Main.npc[num3];
36985 if (nPC.active && nPC.type == 636)
36986 {
36987 base.Center = nPC.Center;
36988 }
36990 Vector2 vector = rotation.ToRotationVector2();
36991 Vector3 v3_ = Main.hslToRgb((ai[0] / ((float)Math.PI * 2f) + localAI[0] / num) % 1f, 1f, 0.85f).ToVector3() * scale;
36992 float num4 = 800f * scale;
36993 DelegateMethods.v3_1 = v3_;
36994 for (float num5 = 0f; num5 <= 1f; num5 += 1f / 12f)
36995 {
36996 Point point = (base.Center + vector * num4 * num5).ToTileCoordinates();
36997 DelegateMethods.CastLightOpen(point.X, point.Y);
36998 }
36999 }
37000 else
37001 {
37002 Kill();
37003 }
37004 }
const double PI
Definition Math.cs:16
static void PlaySound(int type, Vector2 position, int style=1)
Vector2 velocity
Definition Entity.cs:16
static readonly LegacySoundStyle Item159
Definition SoundID.cs:732

References Terraria.DelegateMethods.CastLightOpen(), Terraria.Utils.GetLerpValue(), Terraria.Main.hslToRgb(), Terraria.ID.SoundID.Item159, Terraria.Main.npc, System.Math.PI, Terraria.Audio.SoundEngine.PlaySound(), Microsoft.Xna.Framework.Point.X, Microsoft.Xna.Framework.Point.Y, and Microsoft.Xna.Framework.Vector2.Zero.