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

◆ AI_153_ToiletPop()

void Terraria.Projectile.AI_153_ToiletPop ( )
inlineprivate

Definition at line 55062 of file Projectile.cs.

55063 {
55064 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
55065 //IL_0006: Unknown result type (might be due to invalid IL or missing references)
55066 //IL_006a: Unknown result type (might be due to invalid IL or missing references)
55067 //IL_007b: Unknown result type (might be due to invalid IL or missing references)
55068 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
55069 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
55070 //IL_00d1: Unknown result type (might be due to invalid IL or missing references)
55071 //IL_00d6: Unknown result type (might be due to invalid IL or missing references)
55072 //IL_00db: Unknown result type (might be due to invalid IL or missing references)
55073 //IL_00ff: Unknown result type (might be due to invalid IL or missing references)
55074 //IL_0100: Unknown result type (might be due to invalid IL or missing references)
55075 //IL_010a: Unknown result type (might be due to invalid IL or missing references)
55076 //IL_011e: Unknown result type (might be due to invalid IL or missing references)
55077 //IL_0123: Unknown result type (might be due to invalid IL or missing references)
55078 Vector2 center = base.Center;
55079 float speedY = -2f;
55080 int num = 0;
55081 int num2 = 0;
55082 if (ai[0] == 0f)
55083 {
55084 num = 6;
55085 num2 = 1;
55086 }
55087 else
55088 {
55089 if (!(ai[0] <= 10f))
55090 {
55091 Kill();
55092 return;
55093 }
55094 if (Main.rand.Next(5) == 0)
55095 {
55096 num2 = 1;
55097 }
55098 num = 2;
55099 }
55100 ai[0] += 1f;
55101 for (int i = 0; i < num; i++)
55102 {
55103 Dust dust = Dust.NewDustDirect(center, 3, 6, 216, 0f, speedY);
55104 dust.velocity.X *= 0.5f;
55105 dust.velocity.Y = 0f - Math.Abs(dust.velocity.Y);
55106 dust.position -= dust.velocity;
55107 dust.scale = 0.8f;
55108 }
55109 for (int j = 0; j < num2; j++)
55110 {
55111 Gore gore = Gore.NewGoreDirect(center, Vector2.UnitY * -3f + Main.rand.NextVector2Circular(1f, 1f), Main.rand.Next(580, 583));
55112 gore.velocity.Y = 0f - Math.Abs(gore.velocity.Y);
55113 }
55114 }
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....

References Terraria.Dust.NewDustDirect(), Terraria.Gore.NewGoreDirect(), Terraria.Main.rand, Terraria.Dust.velocity, and Terraria.Gore.velocity.

+ Here is the call graph for this function: