Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.AirMovement_DelayedJump Class Reference

Air movement which delays jump until a timer goes off and then gives control to the deault jump. Cannot be the default jump. More...

Inheritance diagram for PlatformerPro.AirMovement_DelayedJump:
PlatformerPro.AirMovement PlatformerPro.BaseMovement< AirMovement >

Public Member Functions

override bool WantsJump ()
 Gets a value indicating whether this movement wants to intiate the jump. More...
 
override void DoJump ()
 Do the jump. More...
 
override void DoMove ()
 Moves the character. More...
 
override string PostInitValidation ()
 Called after initialisation to check if this movement is configured correctly. Typically used to stop wrapper movements being the default and ending up in infinite loops. More...
 
override Movement Init (Character character, MovementVariable[] movementData)
 Initialise the movement with the given movement data. More...
 
override bool ForceMaintainControl ()
 If the jump just started force control. More...
 
override void LosingControl ()
 Called when the movement loses control. Reset the jump count. More...
 
override void GainControl ()
 Called when the movement gets control. Typically used to do initialisation of velocity and the like. More...
 
override void DoOverridenJump (float newHeight, int newJumpCount, bool skipPowerUps=false)
 For overriden jump don't delay More...
 
- Public Member Functions inherited from PlatformerPro.AirMovement
virtual bool WantsAirControl ()
 Gets a value indicating whether this movement wants to control the movement in the air. Default is false with movement falling back to default air. Override if you want control. More...
 
virtual void DoOverridenMove (bool moveInX, bool moveInY, float xInput, ButtonState runButton)
 Partially moves the character. A lot of movements (e.g. wall movements) require partial air movement. This allows them to use the air movement instead of re-implementing the movement. More...
 
virtual float GetSpeed (float baseSpeed)
 Gets the air speed. More...
 
virtual float GetRunSpeed (float baseRunSpeed)
 Gets the run speed. More...
 
virtual float GetAcceleration (float baseAcceleration)
 Gets the acceleration. More...
 
virtual float GetJumpHeightOrForce (float baseHeight)
 Gets the jump height or the jump force. More...
 
virtual float GetDoubleJumpHeightOrForce (float baseHeight)
 Gets the double jump height or the double jump force. More...
 
- Public Member Functions inherited from PlatformerPro.BaseMovement< AirMovement >
sealed override Movement Init (Character character)
 Initialise this movement. More...
 
bool IsMovementDataDifferent (MovementVariable[] originalMovementData)
 Determines whether this instances movement data is different from the supplied originalMovementData. More...
 

Public Attributes

float jumpDelay
 Amount of time the jump is delayed for More...
 
bool useJumpAnimationOnly
 Should we always set JUMP as the animation state or should we set the underlying animation state from the default air movement. More...
 

Protected Attributes

float jumpTimer
 The jump timer. More...
 
bool controlChecked
 Keep track of the current control state. More...
 
bool shouldJump
 True when we should trigger jump next frame. More...
 
bool hasJumped
 True the frame that jump started. More...
 
- Protected Attributes inherited from PlatformerPro.AirMovement
FlippableGravity flippableGravity
 Cached reference to a flippable gravity. More...
 
- Protected Attributes inherited from PlatformerPro.BaseMovement< AirMovement >
Movement implementation
 The class that will do the movement. More...
 
string movementType
 The type of movement as a string. More...
 
MovementVariable[] movementData
 Data that should be applied to the movement type on init. More...
 

Static Protected Attributes

const int JumpDelayIndex = 0
 The index for the air speed value in the movement data. More...
 
const int JumpAnimationOnlyIndex = 1
 The index of the jump animation only variable in the movement data. More...
 
const int MovementVariableCount = 2
 The size of the movement variable array. More...
 

Properties

new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
override bool ShouldApplyGravity [get]
 This class will handle gravity internally. More...
 
override float CurrentGravity [get]
 Gets a value indicating the current gravity, only used if this movement doesn't apply the default gravity.

See also
ShouldApplyGravity()
More...
 
override int FacingDirection [get]
 Returns the direction the character is facing. 0 for none, 1 for right, -1 for left. This overriden version always returns the input direction. More...
 
override VelocityType VelocityType [get]
 How does this movement use Velocity. More...
 
override bool ShouldDoRotations [get]
 Gets a value indicating whether this PlatformerPro.Movement expects the rotations to be calculated and applied by the character. More...
 
override AnimationState AnimationState [get]
 Gets the animation state that this movement wants to set. More...
 
override int AnimationPriority [get]
 Gets the priority for the animation state. More...
 
- Properties inherited from PlatformerPro.AirMovement
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
- Properties inherited from PlatformerPro.BaseMovement< AirMovement >
virtual string MovementType [get, set]
 The type of movement as a string. More...
 
virtual MovementVariable[] MovementData [get, set]
 Data that should be applied to the movement type on init. More...
 
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
override bool Enabled [get, set]
 A custom enable which base movements can use to pass on enable values. More...
 
override Movement Implementation [get]
 Gets the underlying implementation. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PlatformerPro.AirMovement
virtual void MoveInX (float horizontalAxis, int horizontalAxisDigital, ButtonState runButton)
 Moves in x. More...
 
virtual void MoveInY ()
 Moves in y. More...
 
virtual void AddGravityFlipHandler ()
 Add handler for the gravity flip event More...
 
virtual void HandleGravityFlipped (object sender, System.EventArgs e)
 Handles the gravity being flipped. More...
 

Detailed Description

Air movement which delays jump until a timer goes off and then gives control to the deault jump. Cannot be the default jump.

Member Function Documentation

◆ DoJump()

override void PlatformerPro.AirMovement_DelayedJump.DoJump ( )
virtual

Do the jump.

Reimplemented from PlatformerPro.AirMovement.

◆ DoMove()

override void PlatformerPro.AirMovement_DelayedJump.DoMove ( )

Moves the character.

◆ DoOverridenJump()

override void PlatformerPro.AirMovement_DelayedJump.DoOverridenJump ( float  newHeight,
int  newJumpCount,
bool  skipPowerUps = false 
)
virtual

For overriden jump don't delay

Reimplemented from PlatformerPro.AirMovement.

◆ ForceMaintainControl()

override bool PlatformerPro.AirMovement_DelayedJump.ForceMaintainControl ( )

If the jump just started force control.

◆ GainControl()

override void PlatformerPro.AirMovement_DelayedJump.GainControl ( )

Called when the movement gets control. Typically used to do initialisation of velocity and the like.

◆ Init()

override Movement PlatformerPro.AirMovement_DelayedJump.Init ( Character  character,
MovementVariable[]  movementData 
)

Initialise the movement with the given movement data.

Parameters
characterCharacter.
movementDataMovement data.

◆ LosingControl()

override void PlatformerPro.AirMovement_DelayedJump.LosingControl ( )

Called when the movement loses control. Reset the jump count.

◆ PostInitValidation()

override string PlatformerPro.AirMovement_DelayedJump.PostInitValidation ( )

Called after initialisation to check if this movement is configured correctly. Typically used to stop wrapper movements being the default and ending up in infinite loops.

◆ WantsJump()

override bool PlatformerPro.AirMovement_DelayedJump.WantsJump ( )
virtual

Gets a value indicating whether this movement wants to intiate the jump.

true ijumpTimerf this instance should jump; otherwise, false.

Reimplemented from PlatformerPro.AirMovement.

Member Data Documentation

◆ controlChecked

bool PlatformerPro.AirMovement_DelayedJump.controlChecked
protected

Keep track of the current control state.

◆ hasJumped

bool PlatformerPro.AirMovement_DelayedJump.hasJumped
protected

True the frame that jump started.

◆ JumpAnimationOnlyIndex

const int PlatformerPro.AirMovement_DelayedJump.JumpAnimationOnlyIndex = 1
staticprotected

The index of the jump animation only variable in the movement data.

◆ jumpDelay

float PlatformerPro.AirMovement_DelayedJump.jumpDelay

Amount of time the jump is delayed for

◆ JumpDelayIndex

const int PlatformerPro.AirMovement_DelayedJump.JumpDelayIndex = 0
staticprotected

The index for the air speed value in the movement data.

◆ jumpTimer

float PlatformerPro.AirMovement_DelayedJump.jumpTimer
protected

The jump timer.

◆ MovementVariableCount

const int PlatformerPro.AirMovement_DelayedJump.MovementVariableCount = 2
staticprotected

The size of the movement variable array.

◆ shouldJump

bool PlatformerPro.AirMovement_DelayedJump.shouldJump
protected

True when we should trigger jump next frame.

◆ useJumpAnimationOnly

bool PlatformerPro.AirMovement_DelayedJump.useJumpAnimationOnly

Should we always set JUMP as the animation state or should we set the underlying animation state from the default air movement.

Property Documentation

◆ AnimationPriority

override int PlatformerPro.AirMovement_DelayedJump.AnimationPriority
get

Gets the priority for the animation state.

◆ AnimationState

override AnimationState PlatformerPro.AirMovement_DelayedJump.AnimationState
get

Gets the animation state that this movement wants to set.

◆ CurrentGravity

override float PlatformerPro.AirMovement_DelayedJump.CurrentGravity
get

Gets a value indicating the current gravity, only used if this movement doesn't apply the default gravity.

See also
ShouldApplyGravity()

◆ FacingDirection

override int PlatformerPro.AirMovement_DelayedJump.FacingDirection
get

Returns the direction the character is facing. 0 for none, 1 for right, -1 for left. This overriden version always returns the input direction.

◆ Info

new static MovementInfo PlatformerPro.AirMovement_DelayedJump.Info
staticget

Static movement info used by the editor.

◆ ShouldApplyGravity

override bool PlatformerPro.AirMovement_DelayedJump.ShouldApplyGravity
get

This class will handle gravity internally.

◆ ShouldDoRotations

override bool PlatformerPro.AirMovement_DelayedJump.ShouldDoRotations
get

Gets a value indicating whether this PlatformerPro.Movement expects the rotations to be calculated and applied by the character.

◆ VelocityType

override VelocityType PlatformerPro.AirMovement_DelayedJump.VelocityType
get

How does this movement use Velocity.


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