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

◆ AI_162_TigerPounce()

void Terraria.Projectile.AI_162_TigerPounce ( )
inlineprivate

Definition at line 49582 of file Projectile.cs.

49583 {
49584 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
49585 //IL_0084: Unknown result type (might be due to invalid IL or missing references)
49586 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
49587 //IL_008e: Unknown result type (might be due to invalid IL or missing references)
49588 //IL_008f: Unknown result type (might be due to invalid IL or missing references)
49589 //IL_0090: Unknown result type (might be due to invalid IL or missing references)
49590 //IL_00a4: Unknown result type (might be due to invalid IL or missing references)
49591 //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
49592 //IL_00ae: Unknown result type (might be due to invalid IL or missing references)
49593 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
49594 //IL_00be: Unknown result type (might be due to invalid IL or missing references)
49595 //IL_00c3: Unknown result type (might be due to invalid IL or missing references)
49596 //IL_00c4: Unknown result type (might be due to invalid IL or missing references)
49597 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)
49598 //IL_00d8: Unknown result type (might be due to invalid IL or missing references)
49599 //IL_00dd: Unknown result type (might be due to invalid IL or missing references)
49600 //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
49601 //IL_004b: Unknown result type (might be due to invalid IL or missing references)
49602 //IL_005e: Unknown result type (might be due to invalid IL or missing references)
49603 //IL_0103: Unknown result type (might be due to invalid IL or missing references)
49604 //IL_0109: Unknown result type (might be due to invalid IL or missing references)
49605 //IL_0188: Unknown result type (might be due to invalid IL or missing references)
49606 //IL_0189: Unknown result type (might be due to invalid IL or missing references)
49607 //IL_018a: Unknown result type (might be due to invalid IL or missing references)
49608 //IL_018e: Unknown result type (might be due to invalid IL or missing references)
49609 //IL_0193: Unknown result type (might be due to invalid IL or missing references)
49610 //IL_035b: Unknown result type (might be due to invalid IL or missing references)
49611 //IL_01b9: Unknown result type (might be due to invalid IL or missing references)
49612 //IL_01bf: Unknown result type (might be due to invalid IL or missing references)
49613 //IL_01c1: Unknown result type (might be due to invalid IL or missing references)
49614 //IL_01c6: Unknown result type (might be due to invalid IL or missing references)
49615 //IL_01cb: Unknown result type (might be due to invalid IL or missing references)
49616 //IL_01d5: Unknown result type (might be due to invalid IL or missing references)
49617 //IL_01da: Unknown result type (might be due to invalid IL or missing references)
49618 //IL_01df: Unknown result type (might be due to invalid IL or missing references)
49619 //IL_01e2: Unknown result type (might be due to invalid IL or missing references)
49620 //IL_01e8: Unknown result type (might be due to invalid IL or missing references)
49621 //IL_01fc: Unknown result type (might be due to invalid IL or missing references)
49622 //IL_0201: Unknown result type (might be due to invalid IL or missing references)
49623 //IL_0206: Unknown result type (might be due to invalid IL or missing references)
49624 //IL_021f: Unknown result type (might be due to invalid IL or missing references)
49625 //IL_022b: Unknown result type (might be due to invalid IL or missing references)
49626 //IL_0235: Unknown result type (might be due to invalid IL or missing references)
49627 //IL_025a: Unknown result type (might be due to invalid IL or missing references)
49628 //IL_0260: Unknown result type (might be due to invalid IL or missing references)
49629 //IL_026a: Unknown result type (might be due to invalid IL or missing references)
49630 //IL_026f: Unknown result type (might be due to invalid IL or missing references)
49631 //IL_0274: Unknown result type (might be due to invalid IL or missing references)
49632 //IL_0286: Unknown result type (might be due to invalid IL or missing references)
49633 //IL_0289: Unknown result type (might be due to invalid IL or missing references)
49634 //IL_028e: Unknown result type (might be due to invalid IL or missing references)
49635 //IL_0298: Unknown result type (might be due to invalid IL or missing references)
49636 //IL_029d: Unknown result type (might be due to invalid IL or missing references)
49637 //IL_02e7: Unknown result type (might be due to invalid IL or missing references)
49638 //IL_030a: Unknown result type (might be due to invalid IL or missing references)
49639 //IL_0310: Unknown result type (might be due to invalid IL or missing references)
49640 //IL_0335: Unknown result type (might be due to invalid IL or missing references)
49641 //IL_033b: Unknown result type (might be due to invalid IL or missing references)
49642 //IL_0345: Unknown result type (might be due to invalid IL or missing references)
49643 //IL_034a: Unknown result type (might be due to invalid IL or missing references)
49644 //IL_034f: Unknown result type (might be due to invalid IL or missing references)
49645 if (ai[0] < 0f)
49646 {
49647 Opacity = 0f;
49648 ai[0] += 1f;
49649 return;
49650 }
49651 bool flag = false;
49652 flag = true;
49653 if (frameCounter == 0)
49654 {
49655 frameCounter = 1;
49656 localAI[0] = base.Center.X;
49657 localAI[1] = base.Center.Y;
49658 flag = true;
49659 }
49660 Vector2 vector = default(Vector2);
49661 ((Vector2)(ref vector))._002Ector(localAI[0], localAI[1]);
49662 Vector2 vector2 = vector + velocity;
49663 float y = Vector2.Distance(vector, vector2) * 1.5f;
49664 float num = 0.1f;
49665 Vector2 val = Vector2.Lerp(vector, vector2, 0f - num) + new Vector2(0f, y);
49666 Vector2 value2 = Vector2.Lerp(vector, vector2, 1f + num) + new Vector2(0f, y);
49667 if (Opacity < 1f)
49668 {
49669 Opacity += 0.1f;
49670 }
49671 int num2 = Math.Sign(vector2.X - vector.X);
49672 rotation += (float)num2 * -0.2f;
49674 if (ai[1] < 1f)
49675 {
49676 ai[1] = 60f;
49677 }
49678 ai[0] += 1f / ai[1];
49679 float num4 = Utils.Clamp(ai[0], 0f, 1f);
49680 Vector2 vector3 = Vector2.CatmullRom(val, vector, vector2, value2, num4);
49681 if (flag)
49682 {
49683 for (float num3 = 0f; num3 < 1f; num3 += 0.5f)
49684 {
49685 if (Main.rand.Next(19) == 0)
49686 {
49687 Vector2 vector4 = base.Center + DirectionTo(vector3).SafeNormalize(Vector2.UnitY) * 100f;
49688 Dust dust = Dust.NewDustPerfect(base.Center + base.Size * Main.rand.NextVector2Square(0f, 1f), 278, Main.rand.NextVector2Circular(3f, 3f), 100, Color.White * 0.4f);
49689 dust.velocity.Y += -0.6f;
49690 dust.velocity += velocity * 0.1f;
49691 Main.rand.Next(5);
49692 dust.velocity = (vector4 - base.Center) * 0.05f;
49693 dust.fadeIn = 0f;
49694 dust.scale = 0.7f;
49695 dust.noGravity = true;
49696 }
49697 }
49698 if (Main.rand.Next(2) == 0)
49699 {
49700 Dust obj = Main.dust[Dust.NewDust(position, width, height, 269)];
49701 obj.fadeIn = 0.7f;
49702 obj.scale = 0.4f;
49703 obj.velocity += velocity * 0.001f;
49704 obj.noLight = true;
49705 }
49706 }
49707 base.Center = vector3;
49708 if (ai[0] >= 1f)
49709 {
49710 Kill();
49711 }
49712 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
Vector2 DirectionTo(Vector2 Destination)
Definition Entity.cs:289
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.

References Terraria.Main.dust, Terraria.Dust.NewDust(), Terraria.Dust.NewDustPerfect(), and Terraria.Main.rand.

+ Here is the call graph for this function: