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

◆ OnStarted()

override void Terraria.ModLoader.BasiliskMountJump.OnStarted ( Player player,
ref bool playSound )
inlinevirtual

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
playerThe player performing the jump
playSoundWhether 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 14 of file BasiliskMountJump.cs.

15 {
16 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
17 //IL_0006: Unknown result type (might be due to invalid IL or missing references)
18 //IL_0041: Unknown result type (might be due to invalid IL or missing references)
19 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
20 //IL_0059: Unknown result type (might be due to invalid IL or missing references)
21 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
22 //IL_007e: Unknown result type (might be due to invalid IL or missing references)
23 //IL_0084: Unknown result type (might be due to invalid IL or missing references)
24 //IL_0086: Unknown result type (might be due to invalid IL or missing references)
25 //IL_008b: Unknown result type (might be due to invalid IL or missing references)
26 //IL_008d: Unknown result type (might be due to invalid IL or missing references)
27 //IL_0097: Unknown result type (might be due to invalid IL or missing references)
28 //IL_009c: Unknown result type (might be due to invalid IL or missing references)
29 //IL_009f: Unknown result type (might be due to invalid IL or missing references)
30 //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
31 //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
32 //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
33 //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
34 //IL_00ad: Unknown result type (might be due to invalid IL or missing references)
35 //IL_00b3: Unknown result type (might be due to invalid IL or missing references)
36 //IL_00c6: Unknown result type (might be due to invalid IL or missing references)
37 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
38 //IL_00d0: Unknown result type (might be due to invalid IL or missing references)
39 Vector2 center2 = player.Center;
40 Vector2 vector4 = default(Vector2);
41 ((Vector2)(ref vector4))._002Ector(50f, 20f);
42 float num12 = (float)Math.PI * 2f * Main.rand.NextFloat();
43 for (int i = 0; i < 5; i++)
44 {
45 for (float num13 = 0f; num13 < 14f; num13 += 1f)
46 {
47 Dust obj = Main.dust[Dust.NewDust(center2, 0, 0, 31)];
48 Vector2 vector5 = Vector2.UnitY.RotatedBy(num13 * ((float)Math.PI * 2f) / 14f + num12);
49 vector5 *= 0.2f * (float)i;
50 obj.position = center2 + vector5 * vector4;
51 obj.velocity = vector5 + new Vector2(0f, player.gravDir * 4f);
52 obj.noGravity = true;
53 obj.scale = 1f + Main.rand.NextFloat() * 0.8f;
54 obj.fadeIn = Main.rand.NextFloat() * 2f;
55 obj.shader = GameShaders.Armor.GetSecondaryShader(player.cMount, player);
56 }
57 }
58 }
static ArmorShaderDataSet Armor
Definition GameShaders.cs:7

References Terraria.Graphics.Shaders.GameShaders.Armor, Terraria.Entity.Center, Terraria.Player.cMount, Terraria.Main.dust, Terraria.Player.gravDir, Terraria.Dust.NewDust(), and Terraria.Main.rand.

+ Here is the call graph for this function: