![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Ground movement_ digital. More...
Public Member Functions | |
override bool | WantsGroundControl () |
Gets a value indicating whether this movement wants to control the movement on the ground. Default is false, with control falling back to default ground. Override if you want particular control. More... | |
override void | DoMove () |
Moves the character. More... | |
override Movement | Init (Character character, MovementVariable[] movementData) |
Initialise the mvoement with the given movement data. More... | |
override void | GainControl () |
Called when the movement gets control. Typically used to do initialisation of velocity and the like. More... | |
override void | LosingControl () |
Called when the movement loses control. Override to do any reset type actions. More... | |
override bool | ForceMaintainControl () |
If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't. More... | |
![]() | |
virtual void | ApplySlopeForce () |
Applies slope force. More... | |
virtual float | ApplySlopeSpeedModifier (float speed) |
Adjusts speed to cater for vertical movement More... | |
virtual float | GetSpeed (float baseSpeed) |
Gets the ground speed. More... | |
virtual float | GetRunSpeed (float baseRunSpeed) |
Gets the run speed. More... | |
virtual float | GetAcceleration (float baseAcceleration) |
Gets the acceleration. 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 | |
bool | requireJump |
If false press down to passthrough, if true press down + jump to pass through. More... | |
float | bobbleHeight |
How high to bobble upwards before passing through downwards. More... | |
float | clearanceTime |
How long to wait before giving back control to normal movements. More... | |
bool | supportTiles |
If true all feet colliders will be ignored, if false only the middle ground collider. More... | |
Protected Attributes | |
float | clearanceTimer |
The clearance timer. More... | |
List< Collider2D > | collidersToIgnore |
The collider to passthrough. 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 int | RequireJumpIndex = 0 |
The index of the require jump in the movement data. More... | |
const int | BobbleHeightIndex = 1 |
The index of the bobble height in the movement data. More... | |
const int | ClearanceTimeIndex = 2 |
The index of the clearance time in the movement data. More... | |
const int | SupportTilesIndex = 3 |
The index of support tiles in the movement data. More... | |
const int | MovementVariableCount = 4 |
The size of the movement variable array. More... | |
const float | DefaultClearanceTime = 0.33f |
The default speed. More... | |
Properties | |
new static MovementInfo | Info [get] |
Static movement info used by the editor. More... | |
override AnimationState | AnimationState [get] |
Gets the animation state that this movement wants to set. 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 bool | ShouldApplyGravity [get] |
Gets a value indicating whether this PlatformerPro.Movement expects gravity to be applied after its movement finishes. More... | |
override float | CurrentGravity [get] |
Gets a value indicating the current gravity, only used if this movement doesn't apply the default gravity.
| |
![]() | |
new static MovementInfo | Info [get] |
Static movement info used by the editor. More... | |
virtual bool | SupportsSlidingOnSlopes [get] |
Gets a value indicating whether this PlatformerPro.Movement can support automatic sliding based on the characters slope. 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... | |
Additional Inherited Members | |
![]() | |
virtual void | SnapToGround () |
Snaps the character to the ground. More... | |
Ground movement_ digital.
override void PlatformerPro.GroundMovement_PassDown.DoMove | ( | ) |
Moves the character.
override bool PlatformerPro.GroundMovement_PassDown.ForceMaintainControl | ( | ) |
If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't.
override void PlatformerPro.GroundMovement_PassDown.GainControl | ( | ) |
Called when the movement gets control. Typically used to do initialisation of velocity and the like.
override Movement PlatformerPro.GroundMovement_PassDown.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
override void PlatformerPro.GroundMovement_PassDown.LosingControl | ( | ) |
Called when the movement loses control. Override to do any reset type actions.
|
virtual |
Gets a value indicating whether this movement wants to control the movement on the ground. Default is false, with control falling back to default ground. Override if you want particular control.
Reimplemented from PlatformerPro.GroundMovement.
float PlatformerPro.GroundMovement_PassDown.bobbleHeight |
How high to bobble upwards before passing through downwards.
|
staticprotected |
The index of the bobble height in the movement data.
float PlatformerPro.GroundMovement_PassDown.clearanceTime |
How long to wait before giving back control to normal movements.
|
staticprotected |
The index of the clearance time in the movement data.
|
protected |
The clearance timer.
|
protected |
The collider to passthrough.
|
staticprotected |
The default speed.
|
staticprotected |
The size of the movement variable array.
bool PlatformerPro.GroundMovement_PassDown.requireJump |
If false press down to passthrough, if true press down + jump to pass through.
|
staticprotected |
The index of the require jump in the movement data.
bool PlatformerPro.GroundMovement_PassDown.supportTiles |
If true all feet colliders will be ignored, if false only the middle ground collider.
|
staticprotected |
The index of support tiles in the movement data.
|
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.
|
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.
|
staticget |
Static movement info used by the editor.
|
get |
Gets a value indicating whether this PlatformerPro.Movement expects gravity to be applied after its movement finishes.