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

◆ StingerExplosion()

void Terraria.NPC.StingerExplosion ( )
inlineprivate

Definition at line 56003 of file NPC.cs.

56004 {
56005 //IL_0049: Unknown result type (might be due to invalid IL or missing references)
56006 //IL_004b: Unknown result type (might be due to invalid IL or missing references)
56007 //IL_0050: Unknown result type (might be due to invalid IL or missing references)
56008 //IL_0087: Unknown result type (might be due to invalid IL or missing references)
56009 //IL_0092: Unknown result type (might be due to invalid IL or missing references)
56010 //IL_009c: Unknown result type (might be due to invalid IL or missing references)
56011 //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
56012 int num = Main.rand.Next(4, 9);
56013 Vector2 vector = default(Vector2);
56014 for (int i = 0; i < num; i++)
56015 {
56016 float num2 = 8f;
56017 ((Vector2)(ref vector))._002Ector(Main.rand.NextFloat() - 0.5f, Main.rand.NextFloat() - 0.5f);
56018 ((Vector2)(ref vector)).Normalize();
56019 vector *= num2;
56020 int num3 = (int)(10f * scale);
56021 if (type == 176)
56022 {
56023 num3 = (int)(30f * scale);
56024 }
56025 int num4 = 55;
56026 int num5 = Projectile.NewProjectile(GetSpawnSource_ForProjectile(), base.Center.X, base.Center.Y, vector.X, vector.Y, num4, num3, 0f, Main.myPlayer);
56027 Main.projectile[num5].timeLeft = 300;
56028 }
56029 }
float scale
Makes the NPC bigger or smaller. Bigger than 1f is bigger. Defaults to 1f.
Definition NPC.cs:1104
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
IEntitySource GetSpawnSource_ForProjectile()
Definition NPC.cs:107558

References Terraria.NPC.GetSpawnSource_ForProjectile(), Terraria.Main.myPlayer, Terraria.Projectile.NewProjectile(), Terraria.Main.projectile, Terraria.Main.rand, Terraria.NPC.scale, and Terraria.NPC.type.

Referenced by Terraria.NPC.checkDead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: