42602 {
42603
42604
42605
42606
42607
42608
42609
42610
42611
42612
42613
42614
42615
42616
42617
42618
42619
42620
42621
42622
42623
42624
42625
42626
42627
42628
42629
42630
42631
42632
42633
42634
42635
42636
42637
42638
42639
42640
42641
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652
42653
42654
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664
42665
42666
42667
42668
42669
42670
42671
42672
42673
42674
42675
42676
42677
42678
42679
42680
42681
42682
42683
42684
42685
42686
42687
42688
42689
42690
42691
42692
42693
42694
42695
42696
42697
42698
42699
42700
42701
42702
42707 {
42708 for (int i = 0; i < 1; i++)
42709 {
42710 Rectangle
r = Utils.CenteredRectangle(
base.Center +
new Vector2(0
f, 20
f),
new Vector2(32
f, 32
f));
42711 Dust dust = Dust.NewDustDirect(
r.TopLeft(),
r.Width,
r.Height, 263, 0
f, 0
f, 100,
new Color(80, 200, 255), 0.6
f);
42712 dust.noGravity = true;
42713 dust.fadeIn = 0.9f;
42714 dust.velocity =
new Vector2(0
f, -0.3
f);
42715 }
42716 }
42720 {
42722 }
42725 {
42727 {
42729 }
42731 {
42734 {
42736 }
42737 }
42738 }
42739 else
42740 {
42742 }
42749 if (
ai[0] <= 130
f &&
ai[0] >= 60
f)
42750 {
42751 float num15 = Utils.Remap(
ai[0], 60
f, 130
f, 0
f, 1
f);
42752 if (Main.rand.NextFloat() <
num15 * 0.5f)
42753 {
42754 Rectangle
r2 = Utils.CenteredRectangle(
base.Center +
new Vector2(0
f, 0
f),
new Vector2(70
f, 70
f) *
num15);
42755 Dust
dust2 = Dust.NewDustDirect(
r2.TopLeft(),
r2.Width,
r2.Height, 263, 0
f, 0
f, 100,
new Color(80, 200, 255), 0.6f);
42756 dust2.noGravity = true;
42757 dust2.fadeIn = 0.9f;
42758 dust2.velocity = Main.rand.NextVector2Circular(2
f, 2
f);
42759 }
42761 {
42762 if (Main.rand.NextFloat() < 0.5f)
42763 {
42764 Dust
dust3 = Dust.NewDustPerfect(
base.Center, 263, (-Vector2.UnitY).RotatedBy(((0
f -
num15) * (3
f -
num15 * 0.6
f) +
num2 + Main.rand.NextFloatDirection() * 0.05f * (1
f -
num15)) * ((
float)
Math.PI * 2
f)) * (2
f + Main.rand.NextFloat() + Main.rand.NextFloat() * 3
f *
num15), 30,
new Color(80, 200, 255));
42765 dust3.noGravity = true;
42766 dust3.fadeIn = 1.1f;
42767 }
42768 }
42769 }
42771 {
42772 float num3 = Utils.Remap(
ai[0], 0
f, 60
f, 0
f, 1
f);
42774 {
42775 if (Main.rand.NextFloat() < 0.5f)
42776 {
42777 Dust
dust4 = Dust.NewDustPerfect(
base.Center, 263, (-Vector2.UnitY).RotatedBy(((0
f -
num3) * 3
f +
num4 + Main.rand.NextFloatDirection() * 0.05f) * ((float)
Math.PI * 2
f)) * (2
f *
num3 + Main.rand.NextFloat() *
num3), 100,
new Color(80, 200, 255), 2
f -
num3);
42778 dust4.noGravity = true;
42779 dust4.fadeIn = 1.1f;
42780 }
42781 }
42783 {
42785 {
42786 Dust
dust5 = Dust.NewDustPerfect(
base.Center, 263, (-Vector2.UnitY).RotatedBy(((0
f -
num3) * 2
f +
num5 + Main.rand.NextFloatDirection() * 0.05f) * ((
float)Math.PI * 2
f)) * (1
f *
num3 + Main.rand.NextFloat() *
num3 * 2
f), 100,
new Color(80, 200, 255), 0.8f);
42787 dust5.noGravity = true;
42788 dust5.fadeIn = 1.2f;
42789 }
42790 }
42791 }
42793 {
42795 Rectangle
r3 = Utils.CenteredRectangle(
base.Center +
new Vector2(0
f, 30
f +
num6 * -20
f),
new Vector2(82
f, 72
f) *
num6);
42796 for (
int j = 0;
j < 5;
j++)
42797 {
42798 Dust
dust6 = Dust.NewDustDirect(
r3.TopLeft(),
r3.Width,
r3.Height, 263, 0
f,
num6 * -4
f, 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(0
f, -0.3
f);
42802 }
42803 for (
int k = 0;
k < 1;
k++)
42804 {
42805 Rectangle
r4 = Utils.CenteredRectangle(
base.Center +
new Vector2(0
f, 40
f),
new Vector2(32
f, 32
f));
42806 Dust
dust7 = Dust.NewDustDirect(
r4.TopLeft(),
r4.Width,
r4.Height, 263, 0
f, 0
f, 100,
new Color(80, 200, 255), 0.6
f);
42807 dust7.noGravity = true;
42808 dust7.fadeIn = 0.9f;
42809 dust7.velocity =
new Vector2(0
f, -0.3
f);
42810 }
42811 }
42812 if (Main.rand.Next(6) == 0 &&
ai[0] >= 90
f &&
ai[0] <
num8)
42813 {
42814 Rectangle
r5 = Utils.CenteredRectangle(
base.Center +
new Vector2(0
f, 0
f),
new Vector2(104
f, 104
f));
42815 Dust
dust8 = Dust.NewDustDirect(
r5.TopLeft(),
r5.Width,
r5.Height, 263, 0
f, 0
f, 100,
new Color(80, 200, 255), 0.6
f);
42816 dust8.noGravity = true;
42817 dust8.fadeIn = 0.9f;
42818 dust8.velocity =
new Vector2(0
f, -0.3
f);
42819 }
42821 {
42823 Main.item[
num7].velocity =
new Vector2(0
f, 0
f);
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.