![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
A climb movement which allows you to move in all four directions. For example on fences, vines, walls. 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 | WantsClimb () |
The digital ladder controller can only work with 2D Box Colliders. More... | |
override bool | ForceMaintainControl () |
Keep control until dismount. 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 | climbSpeed |
The speed the character climbs at. More... | |
float | horizontalSpeed |
The speed the character moves horizontally at. More... | |
int | requiredColliders |
The required colliders hitting the fence for climb to start. More... | |
int | availableDismounts |
Enum mask. More... | |
Protected Member Functions | |
virtual void | MoveInY () |
Does the Y movement. More... | |
virtual void | MoveInX () |
Does the X movement. More... | |
Protected Attributes | |
BoxCollider2D | ladderCollider |
Reference to the box2D collider defining the ladder. More... | |
bool | dismount |
If the user is dismounting we will relinquish control. More... | |
bool | jumpDismount |
When a character jumps while holding up or down you don't want them to automatically stick back on the ladder. We track if the way they dismounted was a jump, and if it was we only stick back to the ladder when the velocity is smaller than 0. 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 | MovementVariableCount = 4 |
The size of the movement variable array. More... | |
const float | DefaultClimbSpeed = 3.0f |
The default climb speed. More... | |
const int | DefaultRequiredColliders = 3 |
The default leeway. More... | |
const int | DefaultAvailableDismounts = (int)LadderDismountType.TOP_BOTTOM_AND_JUMP |
The default available dismounts. More... | |
Properties | |
new static MovementInfo | Info [get] |
Static movement info used by the editor. More... | |
override bool | ShouldApplyGravity [get] |
No gravity when climbing. More... | |
override RaycastType | ShouldDoBaseCollisions [get] |
Ignore collisions when climbing. More... | |
override AnimationState | AnimationState [get] |
Gets the animation state that this movement wants to set. More... | |
![]() | |
virtual bool | DetectLaddersByTag [get, protected set] |
Should we find ladders by tag or by layer. If true we will use tags, if false we will use layers. Tags are easier to use but come with an allocation cost. More... | |
virtual string | LadderLayerOrTagName [get, protected set] |
The name of the ladder lyaer if we find by layers, or the tag name if we find by tags. More... | |
override bool | ShouldDoRotations [get] |
Gets a value indicating whether this PlatformerPro.Movement expects the rotations to be calculated and applied by the character. By default ladders don't do this. More... | |
new static MovementInfo | Info [get] |
Static movement info used by the editor. 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... | |
A climb movement which allows you to move in all four directions. For example on fences, vines, walls.
override void PlatformerPro.ClimbMovement_FourWay.DoMove | ( | ) |
Moves the character.
override bool PlatformerPro.ClimbMovement_FourWay.ForceMaintainControl | ( | ) |
Keep control until dismount.
override Movement PlatformerPro.ClimbMovement_FourWay.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
|
protectedvirtual |
Does the X movement.
|
protectedvirtual |
Does the Y movement.
|
virtual |
The digital ladder controller can only work with 2D Box Colliders.
true
if the character should climb; otherwise, false
.
Reimplemented from PlatformerPro.ClimbMovement.
int PlatformerPro.ClimbMovement_FourWay.availableDismounts |
Enum mask.
float PlatformerPro.ClimbMovement_FourWay.climbSpeed |
The speed the character climbs at.
|
staticprotected |
The default available dismounts.
|
staticprotected |
The default climb speed.
|
staticprotected |
The default leeway.
|
protected |
If the user is dismounting we will relinquish control.
float PlatformerPro.ClimbMovement_FourWay.horizontalSpeed |
The speed the character moves horizontally at.
|
protected |
When a character jumps while holding up or down you don't want them to automatically stick back on the ladder. We track if the way they dismounted was a jump, and if it was we only stick back to the ladder when the velocity is smaller than 0.
|
protected |
Reference to the box2D collider defining the ladder.
|
staticprotected |
The size of the movement variable array.
int PlatformerPro.ClimbMovement_FourWay.requiredColliders |
The required colliders hitting the fence for climb to start.
|
get |
Gets the animation state that this movement wants to set.
|
staticget |
Static movement info used by the editor.
|
get |
No gravity when climbing.
|
get |
Ignore collisions when climbing.