![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Ground movement roll on land. More...
Public Member Functions | |
override void | DoMove () |
Moves the character. More... | |
override Movement | Init (Character character, MovementVariable[] movementData) |
Initialise the mvoement with the given movement data. More... | |
override bool | WantsGroundControl () |
Gets a value indicating whether this movement wants to control the movement on the ground. We want this if roll timer is set and user hasn't put in a counter input. More... | |
override void | LosingControl () |
Called when the movement loses control. Override to do any reset type actions. 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 | |
float | speed |
The speed the character rolls at. More... | |
float | rollTime |
How long to roll for if no interrupt is given. More... | |
float | yVelocityForRoll |
How fast to be falling before we have to roll? More... | |
Protected Attributes | |
int | currentRollDirection |
Stores the direction the roll started in. More... | |
float | rollTimer |
How long till we stop rolling 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 | SpeedIndex = 0 |
The index for the speed value in the movement data. More... | |
const int | RollTimeIndex = 1 |
The index for the role time in the data. More... | |
const int | YVelocityForRollIndex = 2 |
The index for the role time in the data. More... | |
const int | MovementVariableCount = 3 |
The size of the movement variable array. More... | |
const float | DefaultSpeed = 4.0f |
The default speed. More... | |
const float | DefaultRollTime = 1.0f |
The default roll time. More... | |
const float | DefaultYVelocityForRoll = -10.0f |
The default Y velocity for roll. 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... | |
![]() | |
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 roll on land.
override void PlatformerPro.GroundMovement_RollOnLand.DoMove | ( | ) |
Moves the character.
override Movement PlatformerPro.GroundMovement_RollOnLand.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
override void PlatformerPro.GroundMovement_RollOnLand.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. We want this if roll timer is set and user hasn't put in a counter input.
true
if this instance wants control; otherwise, false
.
Reimplemented from PlatformerPro.GroundMovement.
|
protected |
Stores the direction the roll started in.
|
staticprotected |
The default roll time.
|
staticprotected |
The default speed.
|
staticprotected |
The default Y velocity for roll.
|
staticprotected |
The size of the movement variable array.
float PlatformerPro.GroundMovement_RollOnLand.rollTime |
How long to roll for if no interrupt is given.
|
staticprotected |
The index for the role time in the data.
|
protected |
How long till we stop rolling
float PlatformerPro.GroundMovement_RollOnLand.speed |
The speed the character rolls at.
|
staticprotected |
The index for the speed value in the movement data.
float PlatformerPro.GroundMovement_RollOnLand.yVelocityForRoll |
How fast to be falling before we have to roll?
|
staticprotected |
The index for the role time in the data.
|
get |
Gets the animation state that this movement wants to set.
|
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.