![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Air movement which floats when jump is pressed. More...
Public Member Functions | |
override Movement | Init (Character character, MovementVariable[] movementData) |
Initialise the movement with the given movement data. More... | |
override 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... | |
override void | DoMove () |
Moves the character. More... | |
![]() | |
virtual bool | WantsJump () |
Gets a value indicating whether this movement wants to intiate the jump. More... | |
virtual void | DoJump () |
Do the jump. More... | |
virtual void | DoOverridenJump (float newHeight, int jumpCount, bool skipPowerUps=false) |
Does a jump with overriden values for the key variables. Primarily used to allow platforms and wall jumps to affect jump height in non-physics based jumps. 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... | |
![]() | |
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 | floatGravity |
The float gravity. More... | |
Protected Member Functions | |
override void | MoveInY () |
![]() | |
virtual void | MoveInX (float horizontalAxis, int horizontalAxisDigital, ButtonState runButton) |
Moves in x. 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... | |
Protected Attributes | |
bool | jumpStarted |
Track if a normal jump has started. More... | |
![]() | |
FlippableGravity | flippableGravity |
Cached reference to a flippable gravity. More... | |
![]() | |
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 float | DefaultFloatGravity = 7.0f |
The default float gravity. More... | |
const int | FloatGravityIndex = 0 |
The index of the float gravity. More... | |
const int | MovementVariableCount = 1 |
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.
| |
override AnimationState | AnimationState [get] |
Gets the animation state that this movement wants to set. More... | |
![]() | |
new static MovementInfo | Info [get] |
Static movement info used by the editor. More... | |
![]() | |
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... | |
Air movement which floats when jump is pressed.
override void PlatformerPro.AirMovement_Float.DoMove | ( | ) |
Moves the character.
override Movement PlatformerPro.AirMovement_Float.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
|
protectedvirtual |
Do the Y movement.
Reimplemented from PlatformerPro.AirMovement.
|
virtual |
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.
true
false
true
, if air control was wantsed, false
otherwise.Reimplemented from PlatformerPro.AirMovement.
|
staticprotected |
The default float gravity.
float PlatformerPro.AirMovement_Float.floatGravity |
The float gravity.
|
staticprotected |
The index of the float gravity.
|
protected |
Track if a normal jump has started.
|
staticprotected |
The size of the movement variable array.
|
get |
Gets the animation state that this movement wants to set.
|
get |
Gets a value indicating the current gravity, only used if this movement doesn't apply the default gravity.
|
staticget |
Static movement info used by the editor.
|
get |
This class will handle gravity internally.