![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
A climb movement for ladder climbing which plays an (uninterruptible) animation at the top of the ladder is reached. WARNING: THIS MOVEMNET CURRENTLY ONLY WORKS SEAMLESLLY WITH 3D CHARACTERS More...
Public Member Functions | |
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 | GainControl () |
Called when the movement gets control. Typically used to do initialisation of velocity and the like. More... | |
override bool | WantsClimb () |
The digital ladder controller can only work with 2D Box Colliders. More... | |
override bool | ForceMaintainControl () |
Keep control until dismount. More... | |
override void | LosingControl () |
Called when the movement loses control. Override to do any reset type actions. More... | |
![]() | |
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 | 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 | upClimbDistance |
When within this distance we start the up climb. More... | |
Vector2 | upClimbOffset |
After the up climb is complete this is the amount we offset the character. More... | |
Vector2 | downClimbOffset |
After the down climb is complete this is the amount we offset the character. More... | |
![]() | |
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 | |
bool | upClimbStarted |
Tracks if the up climb has started. More... | |
bool | downClimbStarted |
Tracks if the down climb has started. More... | |
bool | upClimbOffsetApplied |
Have we applied the up climb offset. More... | |
bool | downClimbOffsetApplied |
Have we applied the down climb offset. More... | |
Vector2 | ladderTopPosition |
Position of current ladders top. More... | |
Animator | myAnimator |
Reference to an animator used to determine if an animation is finished. More... | |
![]() | |
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 | UpClimbDistanceIndex = 6 |
The index of the up climb distance in the movement data. More... | |
const int | UpClimbOffsetIndex = 7 |
The index of the up climb offset in the movement data. More... | |
const int | DownClimbOffsetIndex = 8 |
The index of the down climb offset in the movement data. More... | |
new const int | MovementVariableCount = 9 |
The size of the movement variable array. More... | |
![]() | |
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 AnimationState | AnimationState [get] |
Gets the animation state that this movement wants to set. More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
virtual bool | CheckForLadderBelow (int layer) |
Checks for ladder below. More... | |
A climb movement for ladder climbing which plays an (uninterruptible) animation at the top of the ladder is reached. WARNING: THIS MOVEMNET CURRENTLY ONLY WORKS SEAMLESLLY WITH 3D CHARACTERS
override void PlatformerPro.LadderMovement_WithTopClimb.DoMove | ( | ) |
Moves the character.
override bool PlatformerPro.LadderMovement_WithTopClimb.ForceMaintainControl | ( | ) |
Keep control until dismount.
override void PlatformerPro.LadderMovement_WithTopClimb.GainControl | ( | ) |
Called when the movement gets control. Typically used to do initialisation of velocity and the like.
override Movement PlatformerPro.LadderMovement_WithTopClimb.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
override void PlatformerPro.LadderMovement_WithTopClimb.LosingControl | ( | ) |
Called when the movement loses control. Override to do any reset type actions.
|
virtual |
The digital ladder controller can only work with 2D Box Colliders.
true
if the character should climb; otherwise, false
.
Reimplemented from PlatformerPro.LadderMovement_DigitalForTiles.
Vector2 PlatformerPro.LadderMovement_WithTopClimb.downClimbOffset |
After the down climb is complete this is the amount we offset the character.
|
protected |
Have we applied the down climb offset.
|
staticprotected |
The index of the down climb offset in the movement data.
|
protected |
Tracks if the down climb has started.
|
protected |
Position of current ladders top.
|
staticprotected |
The size of the movement variable array.
|
protected |
Reference to an animator used to determine if an animation is finished.
float PlatformerPro.LadderMovement_WithTopClimb.upClimbDistance |
When within this distance we start the up climb.
|
staticprotected |
The index of the up climb distance in the movement data.
Vector2 PlatformerPro.LadderMovement_WithTopClimb.upClimbOffset |
After the up climb is complete this is the amount we offset the character.
|
protected |
Have we applied the up climb offset.
|
staticprotected |
The index of the up climb offset in the movement data.
|
protected |
Tracks if the up climb has started.
|
get |
Gets the animation state that this movement wants to set.
|
staticget |
Static movement info used by the editor.