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

◆ ShowVisuals()

override void Terraria.ModLoader.TsunamiInABottleJump.ShowVisuals ( Player player)
inlinevirtual

Spawn effects that should appear while the player is performing this jump here.
Only runs while the jump is P:Terraria.DataStructures.ExtraJumpState.Active
For example, the Sandstorm in a Bottle's dusts are spawned here.

Parameters
playerThe player performing the jump

Reimplemented from Terraria.ModLoader.ExtraJump.

Definition at line 51 of file TsunamiInABottleJump.cs.

52 {
53 //IL_0045: Unknown result type (might be due to invalid IL or missing references)
54 //IL_007d: Unknown result type (might be due to invalid IL or missing references)
55 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
56 //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
57 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)
58 //IL_00f2: Unknown result type (might be due to invalid IL or missing references)
59 //IL_00f7: Unknown result type (might be due to invalid IL or missing references)
60 //IL_00fc: Unknown result type (might be due to invalid IL or missing references)
61 //IL_013a: Unknown result type (might be due to invalid IL or missing references)
62 //IL_014f: Unknown result type (might be due to invalid IL or missing references)
63 //IL_0154: Unknown result type (might be due to invalid IL or missing references)
64 int num12 = 1;
65 if (player.jump > 0)
66 {
67 num12 = 2;
68 }
69 int num10 = player.height - 6;
70 if (player.gravDir == -1f)
71 {
72 num10 = 6;
73 }
74 Vector2 vector = default(Vector2);
75 for (int i = 0; i < num12; i++)
76 {
77 int num11 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + (float)num10), player.width, 12, 253, player.velocity.X * 0.3f, player.velocity.Y * 0.3f, 100, default(Color), 1.5f);
78 Main.dust[num11].scale += (float)Main.rand.Next(-5, 3) * 0.1f;
79 if (player.jump <= 0)
80 {
81 Main.dust[num11].scale *= 0.8f;
82 }
83 else
84 {
85 Dust obj = Main.dust[num11];
86 obj.velocity -= player.velocity / 5f;
87 }
88 Main.dust[num11].noGravity = true;
89 ((Vector2)(ref vector))._002Ector((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
90 ((Vector2)(ref vector)).Normalize();
91 vector *= (float)Main.rand.Next(81) * 0.1f;
92 }
93 }

References Terraria.Main.dust, Terraria.Player.gravDir, Terraria.Player.jump, Terraria.Dust.NewDust(), Terraria.Entity.position, Terraria.Main.rand, Terraria.Entity.velocity, and Terraria.Entity.width.

+ Here is the call graph for this function: