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

◆ BunnyCannonCanFire()

static bool Terraria.WorldGen.BunnyCannonCanFire ( )
inlinestatic

Definition at line 44346 of file WorldGen.cs.

44347 {
44348 int num = 1;
44349 int num2 = 0;
44350 int num3 = 100;
44351 for (int i = 0; i < num3; i++)
44352 {
44353 NPC nPC = Main.npc[i];
44354 if (nPC == null || !nPC.active)
44355 {
44356 num2++;
44357 }
44358 }
44359 for (int j = 0; j < Main.projectile.Length; j++)
44360 {
44361 Projectile projectile = Main.projectile[j];
44362 if (projectile != null && projectile.active && projectile.type == 281)
44363 {
44364 num2--;
44365 if (num2 <= 0)
44366 {
44367 return false;
44368 }
44369 }
44370 }
44371 return num2 >= num;
44372 }

References Terraria.Entity.active, Terraria.Main.npc, Terraria.Main.projectile, and Terraria.Projectile.type.

Referenced by Terraria.Player.ShootFromCannon().

+ Here is the caller graph for this function: