![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
A climb movement for ladder climbing with strict digital style controls. 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 | leeway |
The character can only engage the ladder if the distance in X between their transform and the ladders transform is smaller than this. More... | |
float | centeringRate |
The speed at which the character moves towards the centre of the ladder. More... | |
int | availableDismounts |
Enum mask More... | |
Protected Attributes | |
BoxCollider2D | ladderCollider |
Reference to the box2D collider defining the ladder. More... | |
bool | centered |
Has the character centered on the ladder yet? 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... | |
LadderFacingDirectionOverride | facingDirectionOverride |
Nullable reference to a facing direciton override. More... | |
ParentOnStandPlatform | parentPlatform |
Stores parent platform if one is found. 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 = 6 |
The size of the movement variable array. More... | |
const float | DefaultClimbSpeed = 3.0f |
The default climb speed. More... | |
const float | DefaultLeeway = 0.5f |
The default leeway. More... | |
const float | DefaultCenteringRate = 1.0f |
The default leeway. More... | |
const int | DefaultAvailableDismounts = (int)LadderDismountType.TOP_BOTTOM_AND_JUMP_AND_LEFT_RIGHT |
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 for ladder climbing with strict digital style controls.
override void PlatformerPro.LadderMovement_Digital.DoMove | ( | ) |
Moves the character.
override bool PlatformerPro.LadderMovement_Digital.ForceMaintainControl | ( | ) |
Keep control until dismount.
override Movement PlatformerPro.LadderMovement_Digital.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
|
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.LadderMovement_Digital.availableDismounts |
Enum mask
|
protected |
Has the character centered on the ladder yet?
float PlatformerPro.LadderMovement_Digital.centeringRate |
The speed at which the character moves towards the centre of the ladder.
float PlatformerPro.LadderMovement_Digital.climbSpeed |
The speed the character climbs at.
|
staticprotected |
The default available dismounts.
|
staticprotected |
The default leeway.
|
staticprotected |
The default climb speed.
|
staticprotected |
The default leeway.
|
protected |
If the user is dismounting we will relinquish control.
|
protected |
Nullable reference to a facing direciton override.
|
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.
float PlatformerPro.LadderMovement_Digital.leeway |
The character can only engage the ladder if the distance in X between their transform and the ladders transform is smaller than this.
|
staticprotected |
The size of the movement variable array.
|
protected |
Stores parent platform if one is found.
|
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.