![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
A wrapper class for handling moving on the ground that proxies the movement function to the desired implementation. More...
Public Member Functions | |
virtual bool | WantsJump () |
Gets a value indicating whether this movement wants to intiate the jump. More... | |
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 | 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... | |
Protected Member Functions | |
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... | |
Protected Attributes | |
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... | |
Properties | |
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... | |
A wrapper class for handling moving on the ground that proxies the movement function to the desired implementation.
|
protectedvirtual |
Add handler for the gravity flip event
|
virtual |
Do the jump.
Reimplemented in AirMovement_DigitalInFacingDirection, PlatformerPro.AirMovement_Wrapper, PlatformerPro.AirMovement_VariableWithInertiaV2, PlatformerPro.AirMovement_VariableWithInertiaAndDouble, PlatformerPro.AirMovement_VariableWithInertia, PlatformerPro.AirMovement_VariableWithDoubleJump, PlatformerPro.AirMovement_VariableDoubleJumpOnly, PlatformerPro.AirMovement_Variable, PlatformerPro.AirMovement_TeleportJump, PlatformerPro.AirMovement_Physics, PlatformerPro.AirMovement_MecanimDrivenAnimation, PlatformerPro.AirMovement_Fly, PlatformerPro.AirMovement_DigitalNoDirChange, PlatformerPro.AirMovement_Digital, and PlatformerPro.AirMovement_DelayedJump.
|
virtual |
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.
Reimplemented in PlatformerPro.AirMovement_Wrapper, PlatformerPro.AirMovement_MecanimDrivenAnimation, PlatformerPro.AirMovement_Fly, PlatformerPro.AirMovement_DigitalNoDirChange, PlatformerPro.AirMovement_Digital, PlatformerPro.AirMovement_DelayedJump, PlatformerPro.AirMovement_Physics, PlatformerPro.AirMovement_VariableWithDoubleJump, PlatformerPro.AirMovement_VariableDoubleJumpOnly, and PlatformerPro.AirMovement_Variable.
|
virtual |
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.
moveInX | If set to true move in x. |
moveInY | If set to true move in y. |
xInput | Simulated X input. |
runButton | Simulated Run button. |
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.
Reimplemented in PlatformerPro.AirMovement_Wrapper.
|
virtual |
Gets the acceleration.
baseSpeed | Base acceleration. |
|
virtual |
Gets the double jump height or the double jump force.
baseHeight | Base double jump height. |
|
virtual |
Gets the jump height or the jump force.
baseSpeed | Base acceleration. |
|
virtual |
Gets the run speed.
baseSpeed | Base run speed. |
|
virtual |
Gets the air speed.
baseSpeed | Base speed. |
|
protectedvirtual |
Handles the gravity being flipped.
sender | Sender. |
e | E. |
Reimplemented in PlatformerPro.AirMovement_Digital.
|
protectedvirtual |
Moves in x.
horizontalAxis | Horizontal axis. |
horizontalAxisDigital | Horizontal axis digital. |
runButton | Run button. |
Reimplemented in AirMovement_DigitalInFacingDirection, PlatformerPro.AirMovement_VariableWithInertiaV2, PlatformerPro.AirMovement_VariableWithInertiaAndDouble, PlatformerPro.AirMovement_VariableWithInertia, PlatformerPro.AirMovement_VariableWithDoubleJump, PlatformerPro.AirMovement_VariableDoubleJumpOnly, PlatformerPro.AirMovement_Variable, PlatformerPro.AirMovement_Physics, PlatformerPro.AirMovement_Parachute, PlatformerPro.AirMovement_MecanimDrivenAnimation, PlatformerPro.AirMovement_JetPack, PlatformerPro.AirMovement_Fly, PlatformerPro.AirMovement_DigitalNoDirChange, and PlatformerPro.AirMovement_Digital.
|
protectedvirtual |
Moves in y.
Reimplemented in PlatformerPro.AirMovement_VariableWithDoubleJump, PlatformerPro.AirMovement_VariableDoubleJumpOnly, PlatformerPro.AirMovement_Variable, PlatformerPro.AirMovement_Physics, PlatformerPro.AirMovement_Parachute, PlatformerPro.AirMovement_JetPack, PlatformerPro.AirMovement_Fly, PlatformerPro.AirMovement_Float, PlatformerPro.AirMovement_DigitalNoDirChange, and PlatformerPro.AirMovement_Digital.
|
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
if this instance wants control; otherwise, false
.
Reimplemented in PlatformerPro.AirMovement_Wrapper, PlatformerPro.AirMovement_VariableDoubleJumpOnly, PlatformerPro.AirMovement_TeleportJump, PlatformerPro.AirMovement_Parachute, PlatformerPro.AirMovement_JetPack, PlatformerPro.AirMovement_Fly, PlatformerPro.AirMovement_Float, PlatformerPro.AirMovement_Digital, and PlatformerPro.AirMovement_CrouchJump.
|
virtual |
Gets a value indicating whether this movement wants to intiate the jump.
true
if this instance can jump; otherwise, false
.
Reimplemented in PlatformerPro.AirMovement_Wrapper, PlatformerPro.AirMovement_VariableWithDoubleJump, PlatformerPro.AirMovement_VariableDoubleJumpOnly, PlatformerPro.AirMovement_Variable, PlatformerPro.AirMovement_TeleportJump, PlatformerPro.AirMovement_Physics, PlatformerPro.AirMovement_MecanimDrivenAnimation, PlatformerPro.AirMovement_Fly, PlatformerPro.AirMovement_DoubleJumpJetpack, PlatformerPro.AirMovement_DigitalNoDirChange, PlatformerPro.AirMovement_Digital, PlatformerPro.AirMovement_DelayedJump, and PlatformerPro.AirMovement_CrouchJump.
|
protected |
Cached reference to a flippable gravity.
|
staticget |
Static movement info used by the editor.