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

◆ AI_192_JuminoAnimation()

void Terraria.Projectile.AI_192_JuminoAnimation ( )
inlineprivate

Definition at line 42601 of file Projectile.cs.

42602 {
42603 //IL_016f: Unknown result type (might be due to invalid IL or missing references)
42604 //IL_017a: Unknown result type (might be due to invalid IL or missing references)
42605 //IL_003f: Unknown result type (might be due to invalid IL or missing references)
42606 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
42607 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
42608 //IL_0062: Unknown result type (might be due to invalid IL or missing references)
42609 //IL_0067: Unknown result type (might be due to invalid IL or missing references)
42610 //IL_006c: Unknown result type (might be due to invalid IL or missing references)
42611 //IL_006e: Unknown result type (might be due to invalid IL or missing references)
42612 //IL_0070: Unknown result type (might be due to invalid IL or missing references)
42613 //IL_0075: Unknown result type (might be due to invalid IL or missing references)
42614 //IL_007c: Unknown result type (might be due to invalid IL or missing references)
42615 //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
42616 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
42617 //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
42618 //IL_0626: Unknown result type (might be due to invalid IL or missing references)
42619 //IL_063e: Unknown result type (might be due to invalid IL or missing references)
42620 //IL_0643: Unknown result type (might be due to invalid IL or missing references)
42621 //IL_0652: Unknown result type (might be due to invalid IL or missing references)
42622 //IL_0659: Unknown result type (might be due to invalid IL or missing references)
42623 //IL_065e: Unknown result type (might be due to invalid IL or missing references)
42624 //IL_0663: Unknown result type (might be due to invalid IL or missing references)
42625 //IL_027a: Unknown result type (might be due to invalid IL or missing references)
42626 //IL_0289: Unknown result type (might be due to invalid IL or missing references)
42627 //IL_028e: Unknown result type (might be due to invalid IL or missing references)
42628 //IL_029d: Unknown result type (might be due to invalid IL or missing references)
42629 //IL_02a4: Unknown result type (might be due to invalid IL or missing references)
42630 //IL_02a9: Unknown result type (might be due to invalid IL or missing references)
42631 //IL_02ae: Unknown result type (might be due to invalid IL or missing references)
42632 //IL_02b0: Unknown result type (might be due to invalid IL or missing references)
42633 //IL_02b2: Unknown result type (might be due to invalid IL or missing references)
42634 //IL_02b7: Unknown result type (might be due to invalid IL or missing references)
42635 //IL_02be: Unknown result type (might be due to invalid IL or missing references)
42636 //IL_02e2: Unknown result type (might be due to invalid IL or missing references)
42637 //IL_0312: Unknown result type (might be due to invalid IL or missing references)
42638 //IL_0317: Unknown result type (might be due to invalid IL or missing references)
42639 //IL_0888: Unknown result type (might be due to invalid IL or missing references)
42640 //IL_0897: Unknown result type (might be due to invalid IL or missing references)
42641 //IL_089c: Unknown result type (might be due to invalid IL or missing references)
42642 //IL_08a1: Unknown result type (might be due to invalid IL or missing references)
42643 //IL_08c9: Unknown result type (might be due to invalid IL or missing references)
42644 //IL_08ce: Unknown result type (might be due to invalid IL or missing references)
42645 //IL_066d: Unknown result type (might be due to invalid IL or missing references)
42646 //IL_066f: Unknown result type (might be due to invalid IL or missing references)
42647 //IL_0674: Unknown result type (might be due to invalid IL or missing references)
42648 //IL_067b: Unknown result type (might be due to invalid IL or missing references)
42649 //IL_06a2: Unknown result type (might be due to invalid IL or missing references)
42650 //IL_06ac: Unknown result type (might be due to invalid IL or missing references)
42651 //IL_06e8: Unknown result type (might be due to invalid IL or missing references)
42652 //IL_06ed: Unknown result type (might be due to invalid IL or missing references)
42653 //IL_0464: Unknown result type (might be due to invalid IL or missing references)
42654 //IL_046e: Unknown result type (might be due to invalid IL or missing references)
42655 //IL_0473: Unknown result type (might be due to invalid IL or missing references)
42656 //IL_04a3: Unknown result type (might be due to invalid IL or missing references)
42657 //IL_04a9: Unknown result type (might be due to invalid IL or missing references)
42658 //IL_04ab: Unknown result type (might be due to invalid IL or missing references)
42659 //IL_04c6: Unknown result type (might be due to invalid IL or missing references)
42660 //IL_04de: Unknown result type (might be due to invalid IL or missing references)
42661 //IL_07de: Unknown result type (might be due to invalid IL or missing references)
42662 //IL_07ed: Unknown result type (might be due to invalid IL or missing references)
42663 //IL_07f2: Unknown result type (might be due to invalid IL or missing references)
42664 //IL_0801: Unknown result type (might be due to invalid IL or missing references)
42665 //IL_0806: Unknown result type (might be due to invalid IL or missing references)
42666 //IL_080b: Unknown result type (might be due to invalid IL or missing references)
42667 //IL_080d: Unknown result type (might be due to invalid IL or missing references)
42668 //IL_080f: Unknown result type (might be due to invalid IL or missing references)
42669 //IL_0814: Unknown result type (might be due to invalid IL or missing references)
42670 //IL_081b: Unknown result type (might be due to invalid IL or missing references)
42671 //IL_083f: Unknown result type (might be due to invalid IL or missing references)
42672 //IL_086a: Unknown result type (might be due to invalid IL or missing references)
42673 //IL_086f: Unknown result type (might be due to invalid IL or missing references)
42674 //IL_033d: Unknown result type (might be due to invalid IL or missing references)
42675 //IL_0347: Unknown result type (might be due to invalid IL or missing references)
42676 //IL_034c: Unknown result type (might be due to invalid IL or missing references)
42677 //IL_038e: Unknown result type (might be due to invalid IL or missing references)
42678 //IL_0394: Unknown result type (might be due to invalid IL or missing references)
42679 //IL_0396: Unknown result type (might be due to invalid IL or missing references)
42680 //IL_03bf: Unknown result type (might be due to invalid IL or missing references)
42681 //IL_03d7: Unknown result type (might be due to invalid IL or missing references)
42682 //IL_0709: Unknown result type (might be due to invalid IL or missing references)
42683 //IL_0718: Unknown result type (might be due to invalid IL or missing references)
42684 //IL_071d: Unknown result type (might be due to invalid IL or missing references)
42685 //IL_072c: Unknown result type (might be due to invalid IL or missing references)
42686 //IL_0731: Unknown result type (might be due to invalid IL or missing references)
42687 //IL_0736: Unknown result type (might be due to invalid IL or missing references)
42688 //IL_0738: Unknown result type (might be due to invalid IL or missing references)
42689 //IL_073a: Unknown result type (might be due to invalid IL or missing references)
42690 //IL_073f: Unknown result type (might be due to invalid IL or missing references)
42691 //IL_0746: Unknown result type (might be due to invalid IL or missing references)
42692 //IL_076a: Unknown result type (might be due to invalid IL or missing references)
42693 //IL_0795: Unknown result type (might be due to invalid IL or missing references)
42694 //IL_079a: Unknown result type (might be due to invalid IL or missing references)
42695 //IL_0536: Unknown result type (might be due to invalid IL or missing references)
42696 //IL_0540: Unknown result type (might be due to invalid IL or missing references)
42697 //IL_0545: Unknown result type (might be due to invalid IL or missing references)
42698 //IL_0575: Unknown result type (might be due to invalid IL or missing references)
42699 //IL_057b: Unknown result type (might be due to invalid IL or missing references)
42700 //IL_057d: Unknown result type (might be due to invalid IL or missing references)
42701 //IL_059e: Unknown result type (might be due to invalid IL or missing references)
42702 //IL_05b6: Unknown result type (might be due to invalid IL or missing references)
42703 float num = 120f;
42704 float num8 = 420f + num;
42705 float num9 = num8 - 150f;
42706 if (Opacity > 0f && Opacity < 1f)
42707 {
42708 for (int i = 0; i < 1; i++)
42709 {
42710 Rectangle r = Utils.CenteredRectangle(base.Center + new Vector2(0f, 20f), new Vector2(32f, 32f));
42711 Dust dust = Dust.NewDustDirect(r.TopLeft(), r.Width, r.Height, 263, 0f, 0f, 100, new Color(80, 200, 255), 0.6f);
42712 dust.noGravity = true;
42713 dust.fadeIn = 0.9f;
42714 dust.velocity = new Vector2(0f, -0.3f);
42715 }
42716 }
42717 int num10 = 20;
42718 int num11 = 4;
42719 if (frame == 1)
42720 {
42721 num11 = 60;
42722 }
42724 if (timeSinceFall > 0f)
42725 {
42726 if (fall < 20f)
42727 {
42728 frame = 0;
42729 }
42730 else if (++frameCounter >= num11)
42731 {
42732 frameCounter = 0;
42733 if (++frame >= num10)
42734 {
42735 frame = num10 - 1;
42736 }
42737 }
42738 }
42739 else
42740 {
42741 frame = 1;
42742 }
42743 float num12 = Main.player[owner].Center.X - base.Center.X;
42744 direction = (spriteDirection = ((num12 >= 0f) ? 1 : (-1)));
42745 int num13 = 30;
42746 float num14 = num8 + (float)(num10 * num11) + (float)num13;
42747 Opacity = Utils.Remap(ai[0], num9 + 0f, num9 + 20f, 0f, 1f) * Utils.Remap(ai[0], num14 - 5f, num14, 1f, 0.5f);
42748 ai[0] += 1f;
42749 if (ai[0] <= 130f && ai[0] >= 60f)
42750 {
42751 float num15 = Utils.Remap(ai[0], 60f, 130f, 0f, 1f);
42752 if (Main.rand.NextFloat() < num15 * 0.5f)
42753 {
42754 Rectangle r2 = Utils.CenteredRectangle(base.Center + new Vector2(0f, 0f), new Vector2(70f, 70f) * num15);
42755 Dust dust2 = Dust.NewDustDirect(r2.TopLeft(), r2.Width, r2.Height, 263, 0f, 0f, 100, new Color(80, 200, 255), 0.6f);
42756 dust2.noGravity = true;
42757 dust2.fadeIn = 0.9f;
42758 dust2.velocity = Main.rand.NextVector2Circular(2f, 2f);
42759 }
42760 for (float num2 = 0f; num2 < 1f; num2 += 0.5f)
42761 {
42762 if (Main.rand.NextFloat() < 0.5f)
42763 {
42764 Dust dust3 = Dust.NewDustPerfect(base.Center, 263, (-Vector2.UnitY).RotatedBy(((0f - num15) * (3f - num15 * 0.6f) + num2 + Main.rand.NextFloatDirection() * 0.05f * (1f - num15)) * ((float)Math.PI * 2f)) * (2f + Main.rand.NextFloat() + Main.rand.NextFloat() * 3f * num15), 30, new Color(80, 200, 255));
42765 dust3.noGravity = true;
42766 dust3.fadeIn = 1.1f;
42767 }
42768 }
42769 }
42770 if (ai[0] <= 60f)
42771 {
42772 float num3 = Utils.Remap(ai[0], 0f, 60f, 0f, 1f);
42773 for (float num4 = 0f; num4 < 1f; num4 += 0.5f)
42774 {
42775 if (Main.rand.NextFloat() < 0.5f)
42776 {
42777 Dust dust4 = Dust.NewDustPerfect(base.Center, 263, (-Vector2.UnitY).RotatedBy(((0f - num3) * 3f + num4 + Main.rand.NextFloatDirection() * 0.05f) * ((float)Math.PI * 2f)) * (2f * num3 + Main.rand.NextFloat() * num3), 100, new Color(80, 200, 255), 2f - num3);
42778 dust4.noGravity = true;
42779 dust4.fadeIn = 1.1f;
42780 }
42781 }
42782 if (ai[0] == 58f)
42783 {
42784 for (float num5 = 0f; num5 < 1f; num5 += 1f / 12f)
42785 {
42786 Dust dust5 = Dust.NewDustPerfect(base.Center, 263, (-Vector2.UnitY).RotatedBy(((0f - num3) * 2f + num5 + Main.rand.NextFloatDirection() * 0.05f) * ((float)Math.PI * 2f)) * (1f * num3 + Main.rand.NextFloat() * num3 * 2f), 100, new Color(80, 200, 255), 0.8f);
42787 dust5.noGravity = true;
42788 dust5.fadeIn = 1.2f;
42789 }
42790 }
42791 }
42792 if (ai[0] >= num14 - 20f)
42793 {
42794 float num6 = Utils.Remap(ai[0], num14 - 20f, num14, 0.25f, 1f);
42795 Rectangle r3 = Utils.CenteredRectangle(base.Center + new Vector2(0f, 30f + num6 * -20f), new Vector2(82f, 72f) * num6);
42796 for (int j = 0; j < 5; j++)
42797 {
42798 Dust dust6 = Dust.NewDustDirect(r3.TopLeft(), r3.Width, r3.Height, 263, 0f, num6 * -4f, 100, new Color(80, 200, 255) * 0.75f, 0.1f);
42799 dust6.noGravity = true;
42800 dust6.fadeIn = 0.6f + Main.rand.NextFloat() * 0.3f;
42801 dust6.velocity = new Vector2(0f, -0.3f);
42802 }
42803 for (int k = 0; k < 1; k++)
42804 {
42805 Rectangle r4 = Utils.CenteredRectangle(base.Center + new Vector2(0f, 40f), new Vector2(32f, 32f));
42806 Dust dust7 = Dust.NewDustDirect(r4.TopLeft(), r4.Width, r4.Height, 263, 0f, 0f, 100, new Color(80, 200, 255), 0.6f);
42807 dust7.noGravity = true;
42808 dust7.fadeIn = 0.9f;
42809 dust7.velocity = new Vector2(0f, -0.3f);
42810 }
42811 }
42812 if (Main.rand.Next(6) == 0 && ai[0] >= 90f && ai[0] < num8)
42813 {
42814 Rectangle r5 = Utils.CenteredRectangle(base.Center + new Vector2(0f, 0f), new Vector2(104f, 104f));
42815 Dust dust8 = Dust.NewDustDirect(r5.TopLeft(), r5.Width, r5.Height, 263, 0f, 0f, 100, new Color(80, 200, 255), 0.6f);
42816 dust8.noGravity = true;
42817 dust8.fadeIn = 0.9f;
42818 dust8.velocity = new Vector2(0f, -0.3f);
42819 }
42820 if (ai[0] >= num14)
42821 {
42822 int num7 = Item.NewItem(new EntitySource_Gift(this), base.Center + new Vector2(0f, 12f), Vector2.Zero, 5276);
42823 Main.item[num7].velocity = new Vector2(0f, 0f);
42824 Kill();
42825 }
42826 }
Used when NPCs or pets/minions give gifts or rewards to a player.
static void AI_192_GetJuminoFall(Projectile proj, out float timeSinceFall, out float fall)
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.

References Terraria.Utils.CenteredRectangle(), Terraria.Main.item, Terraria.Dust.NewDustDirect(), Terraria.Dust.NewDustPerfect(), Terraria.Item.NewItem(), Terraria.Main.player, Terraria.Main.rand, and Terraria.Utils.Remap().

+ Here is the call graph for this function: