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

◆ NearSpikeBall()

static bool Terraria.NPC.NearSpikeBall ( int x,
int y )
inlinestatic

Definition at line 86713 of file NPC.cs.

86714 {
86715 Rectangle rectangle = new Rectangle(x * 16 - 300, y * 16 - 300, 600, 600);
86716 for (int i = 0; i < 200; i++)
86717 {
86718 if (Main.npc[i].active && Main.npc[i].aiStyle == 20)
86719 {
86720 Rectangle rectangle2 = new Rectangle((int)Main.npc[i].ai[1], (int)Main.npc[i].ai[2], 20, 20);
86721 if (rectangle.Intersects(rectangle2))
86722 {
86723 return true;
86724 }
86725 }
86726 }
86727 return false;
86728 }

References Terraria.Main.npc.