![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Ground movement for walking up and down stairs. More...
Public Member Functions | |
override Movement | Init (Character character, MovementVariable[] movementData) |
Initialise the movement with the given movement data (movemnt data is ignored as its not used by this movement). More... | |
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 | 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 void | DoMove () |
Moves the character. More... | |
override bool | IsGrounded () |
Always grounded when on a step. 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... | |
Protected Member Functions | |
void | Reset () |
Clear all our variables. More... | |
![]() | |
virtual void | SnapToGround () |
Snaps the character to the ground. More... | |
Protected Attributes | |
int | step |
The current step. More... | |
bool | isClimbing |
Are we climbing. More... | |
bool | isDescending |
Are we descending. More... | |
Animator | myAnimator |
Reference to the animator we use to determine when stiar movements have finished. More... | |
Stairs | currentStairs |
Current stair case. More... | |
int | facingDirection |
The facing direction. More... | |
bool | dismountDown |
Are we dismounting the bootm of steps? More... | |
bool | dismountUp |
Are we dismounting the top of the steps? More... | |
bool | switchDirection |
Did we just change direction. 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... | |
override bool | ShouldApplyGravity [get] |
Gets a value indicating whether this PlatformerPro.Movement expects gravity to be applied after its movement finishes. In this case false, Stairs ignore gravity. More... | |
override RaycastType | ShouldDoBaseCollisions [get] |
Gets a value indicating whether this PlatformerPro.Movement expects the base collisions to be executed after its movement finishes. In this case NONE. 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. More... | |
![]() | |
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... | |
Ground movement for walking up and down stairs.
override void PlatformerPro.GroundMovement_Stairs.DoMove | ( | ) |
Moves the character.
override void PlatformerPro.GroundMovement_Stairs.GainControl | ( | ) |
Called when the movement gets control. Typically used to do initialisation of velocity and the like.
override Movement PlatformerPro.GroundMovement_Stairs.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
override bool PlatformerPro.GroundMovement_Stairs.IsGrounded | ( | ) |
Always grounded when on a step.
false
override void PlatformerPro.GroundMovement_Stairs.LosingControl | ( | ) |
Called when the movement loses control. Override to do any reset type actions.
|
protected |
Clear all our variables.
|
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.
true
if this instance wants control; otherwise, false
.
Reimplemented from PlatformerPro.GroundMovement.
|
protected |
Current stair case.
|
protected |
Are we dismounting the bootm of steps?
|
protected |
Are we dismounting the top of the steps?
|
protected |
The facing direction.
|
protected |
Are we climbing.
|
protected |
Are we descending.
|
protected |
Reference to the animator we use to determine when stiar movements have finished.
|
protected |
The current step.
|
protected |
Did we just change direction.
|
get |
Gets the animation state that this movement wants to set.
The state of the animation.
|
get |
Returns the direction the character is facing. 0 for none, 1 for right, -1 for left.
|
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. In this case false, Stairs ignore gravity.
|
get |
Gets a value indicating whether this PlatformerPro.Movement expects the base collisions to be executed after its movement finishes. In this case NONE.