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

◆ ShowVisuals()

override void Terraria.ModLoader.SandstormInABottleJump.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 12 of file SandstormInABottleJump.cs.

13 {
14 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
15 //IL_008b: Unknown result type (might be due to invalid IL or missing references)
16 //IL_0091: Unknown result type (might be due to invalid IL or missing references)
17 //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
18 //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
19 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
20 //IL_011b: Unknown result type (might be due to invalid IL or missing references)
21 //IL_0142: Unknown result type (might be due to invalid IL or missing references)
22 //IL_016c: Unknown result type (might be due to invalid IL or missing references)
23 //IL_0176: Unknown result type (might be due to invalid IL or missing references)
24 //IL_017c: Unknown result type (might be due to invalid IL or missing references)
25 //IL_0181: Unknown result type (might be due to invalid IL or missing references)
26 int num3 = player.height;
27 if (player.gravDir == -1f)
28 {
29 num3 = -6;
30 }
31 float num4 = ((float)player.jump / 75f + 1f) / 2f;
32 for (int i = 0; i < 3; i++)
33 {
34 int num5 = Dust.NewDust(new Vector2(player.position.X, player.position.Y + (float)(num3 / 2)), player.width, 32, 124, player.velocity.X * 0.3f, player.velocity.Y * 0.3f, 150, default(Color), 1f * num4);
35 Dust obj = Main.dust[num5];
36 obj.velocity *= 0.5f * num4;
37 Main.dust[num5].fadeIn = 1.5f * num4;
38 }
39 player.sandStorm = true;
40 if (player.miscCounter % 3 == 0)
41 {
42 int num6 = Gore.NewGore(new Vector2(player.position.X + (float)(player.width / 2) - 18f, player.position.Y + (float)(num3 / 2)), new Vector2(0f - player.velocity.X, 0f - player.velocity.Y), Main.rand.Next(220, 223), num4);
43 Main.gore[num6].velocity = player.velocity * 0.3f * num4;
44 Main.gore[num6].alpha = 100;
45 }
46 }

References Terraria.Main.dust, Terraria.Main.gore, Terraria.Player.gravDir, Terraria.Entity.height, Terraria.Player.jump, Terraria.Player.miscCounter, Terraria.Dust.NewDust(), Terraria.Gore.NewGore(), Terraria.Entity.position, Terraria.Main.rand, Terraria.Entity.velocity, and Terraria.Entity.width.

+ Here is the call graph for this function: