This hook runs when the player uses this jump via pressing the jump key
Effects that should appear when the jump starts can be spawned here.
For example, the Cloud in a Bottle's initial puff of smoke is spawned here.
To make the jump re-usable, set P:Terraria.DataStructures.ExtraJumpState.Available to true
- Parameters
-
| player | The player performing the jump |
| playSound | Whether the poof sound should play. Set this parameter to false if you want to play a different sound. |
Reimplemented from Terraria.ModLoader.ExtraJump.
Definition at line 12 of file SantankMountJump.cs.
13 {
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 int num17 = player.height;
35 if (player.gravDir == -1
f)
36 {
38 }
40 {
41 int num19 = Dust.NewDust(
new Vector2(player.position.X - 34
f, player.position.Y + (
float)
num17 - 16
f), 102, 32, 4, (0
f - player.velocity.X) * 0.5f, player.velocity.Y * 0.5f, 100,
new Color(250, 230, 230, 150), 1.5
f);
42 Main.dust[
num19].velocity.X = Main.dust[
num19].velocity.X * 0.5f - player.velocity.X * 0.1f;
43 Main.dust[
num19].velocity.Y = Main.dust[
num19].velocity.Y * 0.5f - player.velocity.Y * 0.3f;
44 Main.dust[
num19].noGravity =
true;
45 num19 = Dust.NewDust(
new Vector2(player.position.X - 34
f, player.position.Y + (
float)
num17 - 16
f), 102, 32, 6, (0
f - player.velocity.X) * 0.5f, player.velocity.Y * 0.5f, 20,
default(Color), 1.5f);
46 Main.dust[
num19].velocity.Y -= 1
f;
48 {
49 Main.dust[
num19].fadeIn = Main.rand.NextFloat() * 2
f;
50 }
51 }
52 float y = player.Bottom.Y - 22
f;
54 {
55 Vector2
vector8 = player.Center;
57 {
58 case 0:
60 break;
61 case 1:
63 break;
64 case 2:
66 break;
67 }
68 int num21 = Gore.NewGore(
vector8,
new Vector2(0
f - player.velocity.X, 0
f - player.velocity.Y), Main.rand.Next(61, 63));
70 obj.velocity *= 0.1f;
71 Main.gore[
num21].velocity.X -= player.velocity.X * 0.1f;
72 Main.gore[
num21].velocity.Y -= player.velocity.Y * 0.05f;
74 obj2.velocity += Main.rand.NextVector2Circular(1
f, 1
f) * 0.5f;
75 }
76 }
References Terraria.Entity.Center, Terraria.Main.dust, Terraria.Main.gore, Terraria.Player.gravDir, Terraria.Entity.height, Terraria.Dust.NewDust(), Terraria.Gore.NewGore(), Terraria.Entity.position, Terraria.Main.rand, Terraria.Entity.Right, and Terraria.Entity.velocity.