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

◆ GetBossHeadRotation()

float Terraria.NPC.GetBossHeadRotation ( )
inline

Definition at line 2571 of file NPC.cs.

2572 {
2573 float result = 0f;
2574 switch (type)
2575 {
2576 case 68:
2577 case 262:
2578 result = rotation;
2579 break;
2580 case 35:
2581 case 127:
2582 if (ai[1] == 1f || ai[1] == 2f)
2583 {
2584 result = rotation;
2585 }
2586 break;
2587 case 345:
2588 if (ai[0] == 2f)
2589 {
2590 result = rotation;
2591 }
2592 break;
2593 }
2595 return result;
2596 }
static void BossHeadRotation(NPC npc, ref float rotation)
This serves as the central class from which NPC-related functions are carried out....
Definition NPCLoader.cs:26
float[] ai
An array with 4 slots used for any sort of data storage, which is occasionally synced from the server...
Definition NPC.cs:997
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990
float rotation
Definition NPC.cs:1116

References Terraria.NPC.ai, Terraria.ModLoader.NPCLoader.BossHeadRotation(), Terraria.NPC.rotation, and Terraria.NPC.type.

+ Here is the call graph for this function: