![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Ground movement that uses physics style movement and includes run. More...
Public Member Functions | |
override void | ApplySlopeForce () |
Applies the slope force by setting velocity. Note this WILL NOT move the character that happens in DoMove. More... | |
override void | DoMove () |
Moves the character. More... | |
override void | PostCollisionDoMove () |
Does any movement that MUST be done after collissions are calculated. More... | |
override Movement | Init (Character character, MovementVariable[] movementData) |
Initialise the mvoement with the given movement data. More... | |
![]() | |
override void | DoMove () |
Moves the character. More... | |
override void | PostCollisionDoMove () |
Does any movement that MUST be done after collissions are calculated. More... | |
override Movement | Init (Character character, MovementVariable[] movementData) |
Initialise the mvoement with the given movement data. More... | |
![]() | |
virtual 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... | |
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 | walkSpeed |
Maximum speed when run is not pressed. More... | |
![]() | |
float | acceleration |
The speed the character accelerates at. More... | |
float | maxSpeed |
The maximum travel speed. More... | |
float | friction |
The default friction. Platforms can override this. More... | |
bool | useAnalogueInput |
If true the acceleration will be multiplied via the analogue input value. More... | |
float | slopeAccelerationFactor |
If non-zero the character will have acceleration applied by slopes based on gravity. The actual force will be f = g sin() * slopeAccelerationFactor. More... | |
float | quiesceSpeed |
If a character is moving slower than this stop them moving. More... | |
float | ignoreForce |
Forces smaller than this will be ignored (generally applies to, for example, slighlty sloped platforms or very small input values). More... | |
bool | stickToGround |
Should we stick to the ground when running on a slope. More... | |
Static Protected Attributes | |
const int | WalkSpeedIndex = 8 |
The index for the walk speed. More... | |
new const int | MovementVariableCount = 9 |
The size of the movement variable array. More... | |
![]() | |
const int | AccelerationIndex = 5 |
The index for the acceleration value in the movement data. More... | |
const int | MaxSpeedIndex = 6 |
The index for the max speed in the movement data. More... | |
const int | StickToGroundIndex = 7 |
The index for the stick to ground value in the movement data. More... | |
const int | MovementVariableCount = 8 |
The size of the movement variable array. More... | |
const float | DefaultAcceleration = 40f |
The default ignore force. More... | |
const float | DefaultMaxSpeed = 8f |
The default ignore force. More... | |
Properties | |
new static MovementInfo | Info [get] |
Static movement info used by the editor. More... | |
override bool | SupportsSlidingOnSlopes [get] |
Gets a value indicating whether this PlatformerPro.Movement can support automatic sliding based on the characters slope. This physics based movement can do this. 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... | |
override bool | SupportsSlidingOnSlopes [get] |
Gets a value indicating whether this PlatformerPro.Movement can support automatic sliding based on the characters slope. This physics based movement can do this. 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 | |
![]() | |
const int | FrictionIndex = 0 |
The index for the friction value in the movement data. More... | |
const int | UseAnalogueIndex = 1 |
The index for the use analogue input value in the movement data. More... | |
const int | SlopeAccelerationIndex = 2 |
The index for the use slope accelration factor value in the movement data. More... | |
const int | QuiesceSpeedIndex = 3 |
The index for the quiesce value in the movement data. More... | |
const int | IgnoreForceIndex = 4 |
The index for the ignore force value in the movement data. More... | |
const float | DefaultFriction = 5.0f |
The default slope acceleration. More... | |
const float | DefaultSlopeAcceleration = 0.0f |
The default slope acceleration. More... | |
const float | DefaultQuiesceSpeed = 0.5f |
The default quiesce Speed. More... | |
const float | DefaultIgnoreForce = 2f |
The default ignore force. More... | |
![]() | |
virtual void | SnapToGround () |
Snaps the character to the ground. More... | |
![]() | |
bool | hasAppliedForce |
Has a force been applied this frame? If so don't quiesce. 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... | |
Ground movement that uses physics style movement and includes run.
|
virtual |
Applies the slope force by setting velocity. Note this WILL NOT move the character that happens in DoMove.
Reimplemented from PlatformerPro.GroundMovement_Physics.
override void PlatformerPro.GroundMovement_PhysicsWithRun.DoMove | ( | ) |
Moves the character.
override Movement PlatformerPro.GroundMovement_PhysicsWithRun.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
override void PlatformerPro.GroundMovement_PhysicsWithRun.PostCollisionDoMove | ( | ) |
Does any movement that MUST be done after collissions are calculated.
|
staticprotected |
The size of the movement variable array.
float PlatformerPro.GroundMovement_PhysicsWithRun.walkSpeed |
Maximum speed when run is not pressed.
|
staticprotected |
The index for the walk speed.
|
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.
|
get |
Gets a value indicating whether this PlatformerPro.Movement can support automatic sliding based on the characters slope. This physics based movement can do this.