![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Ground movement which allows character to pull things. More...
Public Member Functions | |
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. This movement wants control if the side colliders are pulling a box. More... | |
override void | DoMove () |
Moves the character. More... | |
override void | PostCollisionDoMove () |
Does any movement that MUST be done after collissions are calculated. 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 |
Speed if weight is not affecting us. More... | |
float | maxWeight |
How much can the character pull. More... | |
bool | weightAffectsSpeed |
Should we consider object weight when adjusting speed. More... | |
Protected Attributes | |
IPullable | pullable |
The current thing being pushed. More... | |
float | initialPullOffset |
How far is the pullable offset when the pull starts. More... | |
float | pullDirection |
The direction we are pushing. More... | |
bool | latched |
Are we latched on to something? More... | |
float | pullDelayTimer |
Are we still latched even though we let go of button. More... | |
float | latchTimer |
How lond do we have before we can't latch without pressing towards object. 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 of the speed adjustment. More... | |
const int | MaxWeightIndex = 1 |
The index of the max weight. More... | |
const int | WeightAffectsSpeedIndex = 2 |
The index of weight affects speed. More... | |
const int | MovementVariableCount = 3 |
The size of the movement variable array. More... | |
const float | PullDelayTime = 0.125f |
A small delay before pull so a user can double tap to stop pulling. More... | |
const float | LatchTime = 0.75f |
How long do we give the user to start pulling before resetting back to a normal state. 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] |
![]() | |
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 which allows character to pull things.
override void PlatformerPro.GroundMovement_Pull.DoMove | ( | ) |
Moves the character.
override Movement PlatformerPro.GroundMovement_Pull.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
override void PlatformerPro.GroundMovement_Pull.LosingControl | ( | ) |
Called when the movement loses control. Override to do any reset type actions.
override void PlatformerPro.GroundMovement_Pull.PostCollisionDoMove | ( | ) |
Does any movement that MUST be done after collissions are calculated.
|
virtual |
Gets a value indicating whether this movement wants to control the movement on the ground. This movement wants control if the side colliders are pulling a box.
true
if this instance wants control; otherwise, false
.
Reimplemented from PlatformerPro.GroundMovement.
|
protected |
How far is the pullable offset when the pull starts.
|
protected |
Are we latched on to something?
|
staticprotected |
How long do we give the user to start pulling before resetting back to a normal state.
|
protected |
How lond do we have before we can't latch without pressing towards object.
float PlatformerPro.GroundMovement_Pull.maxWeight |
How much can the character pull.
|
staticprotected |
The index of the max weight.
|
staticprotected |
The size of the movement variable array.
|
protected |
The current thing being pushed.
|
staticprotected |
A small delay before pull so a user can double tap to stop pulling.
|
protected |
Are we still latched even though we let go of button.
|
protected |
The direction we are pushing.
float PlatformerPro.GroundMovement_Pull.speed |
Speed if weight is not affecting us.
|
staticprotected |
The index of the speed adjustment.
bool PlatformerPro.GroundMovement_Pull.weightAffectsSpeed |
Should we consider object weight when adjusting speed.
|
staticprotected |
The index of weight affects 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 default ground movements facing direction.
|
staticget |
Static movement info used by the editor.