TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
Terraria.DataStructures.ExtraJumpState Struct Reference

A structure containing fields used to manage extra jumps

More...

+ Collaboration diagram for Terraria.DataStructures.ExtraJumpState:

Public Member Functions

void Enable ()
 Sets this extra jump to usable for this game tick.
If you want to disable this extra jump, use M:Terraria.DataStructures.ExtraJumpState.Disable
 
void Disable ()
 Forces this extra jump to be disabled, consuming it and preventing the usage of it during the current game tick in the process.
If you want to disable all extra jumps, using F:Terraria.Player.blockExtraJumps is preferred.
 

Package Functions

void Start ()
 
void Stop ()
 
void ResetEnabled ()
 
void CommitEnabledState (out bool jumpEnded)
 

Properties

bool Enabled [get]
 Whether the extra jump can be used. This property is set by M:Terraria.DataStructures.ExtraJumpState.Enable and M:Terraria.DataStructures.ExtraJumpState.Disable.
This property is automatically set to false in ResetEffects.
When false, P:Terraria.DataStructures.ExtraJumpState.Available and P:Terraria.DataStructures.ExtraJumpState.Active will also be false.

 
bool Available [get, set]
 true if the extra jump has not been consumed. Will be set to false when the extra jump starts.
Setting this field to false will effectively make the game think that the player has already used this extra jump.
This property also checks P:Terraria.DataStructures.ExtraJumpState.Enabled when read.
For a reusable jump (e.g. MultipleUseExtraJump from ExampleMod), this property should only be set to true in M:Terraria.ModLoader.ExtraJump.OnStarted(Terraria.Player,System.Boolean@).
 
bool Active [get]
 Whether any effects (e.g. spawning dusts) should be performed after consuming the extra jump, but before its duration runs out.
This property returns true while the extra jump is in progress, and returns false otherwise.
While an extra jump is in progress, M:Terraria.ModLoader.ExtraJump.UpdateHorizontalSpeeds(Terraria.Player) and M:Terraria.ModLoader.ExtraJump.ShowVisuals(Terraria.Player) will be executed.
This property also checks P:Terraria.DataStructures.ExtraJumpState.Enabled when read.
 

Private Attributes

bool _enabled
 
bool _available
 
bool _active
 
bool _disabled
 

Detailed Description

A structure containing fields used to manage extra jumps

Valid states for an extra jump are as follows:

  • Enabled = false | The extra jump cannot be used. Available and Active will be false
  • Enabled = true, Available = true, Active = false | The extra jump is ready to be consumed, but hasn't been consumed yet
  • Enabled = true, Available = false, Active = true | The extra jump has been consumed and is currently in progress
  • Enabled = true, Available = true, Active = true | The extra jump is currently in progress, but can be re-used again after it ends
  • Enabled = true, Available = false, Active = false | The extra jump has been consumed and cannot be used again until extra jumps are refreshed

Definition at line 15 of file ExtraJumpState.cs.


The documentation for this struct was generated from the following file: