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

◆ UpdateMoonLordIndex()

void Terraria.GameContent.Shaders.MoonLordScreenShaderData.UpdateMoonLordIndex ( )
inlineprivate

Definition at line 17 of file MoonLordScreenShaderData.cs.

18 {
19 if (_aimAtPlayer || (_moonLordIndex >= 0 && Main.npc[_moonLordIndex].active && Main.npc[_moonLordIndex].type == 398))
20 {
21 return;
22 }
23 int moonLordIndex = -1;
24 for (int i = 0; i < Main.npc.Length; i++)
25 {
26 if (Main.npc[i].active && Main.npc[i].type == 398)
27 {
28 moonLordIndex = i;
29 break;
30 }
31 }
32 _moonLordIndex = moonLordIndex;
33 }

References Terraria.GameContent.Shaders.MoonLordScreenShaderData._aimAtPlayer, Terraria.GameContent.Shaders.MoonLordScreenShaderData._moonLordIndex, and Terraria.Main.npc.

Referenced by Terraria.GameContent.Shaders.MoonLordScreenShaderData.Apply().