![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
Hang from the ceiling on collision. More...
Public Member Functions | |
override Movement | Init (Character character, MovementVariable[] movementData) |
Initialise the movement with the given movement data. More... | |
override bool | WantsSpecialMove () |
Gets a value indicating whether this movement wants to do a special move. More... | |
override void | DoSpecialMove () |
Start the special mvoe More... | |
override void | LosingControl () |
Called when the movement loses control. 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 | fallTime = 0.1f |
How long we fall for after letting go of ceiling. More... | |
float | yOffset = 0.2f |
Difference between y position of jump and hang. More... | |
bool | canClimb |
Can we climb? More... | |
Vector2 | climbStartOffset |
Offset applied at start of climb before we go to CLIMB. More... | |
Vector2 | climbEndOffset |
Offset applied at end of climb before we go to CLIMB_UP. More... | |
int | facingDirection |
Direction to face. Use 0 to maintain facing direction. This is really just a work around for the graphics in bionic cop. More... | |
int | climbableLayers |
Layers we can climb up. More... | |
int | hangableLayers |
Layers we can hang from. More... | |
Protected Member Functions | |
virtual void | CheckForAnimationStateTransition () |
Checks for animation state transition. I.e. when state should be changed based on the animation state. More... | |
virtual bool | CheckHeadCollisions () |
Checks the head collisions. More... | |
Protected Attributes | |
CeilingHangState | state |
Current state. More... | |
float | fallTimer |
The fall timer. More... | |
Animator | myAnimator |
If the animator drives animation state then keep a cached copy. More... | |
Collider2D | currentHeadCollider |
Stores current heaad collider. 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 | FallTimeIndex = 0 |
The index of the fall time in the movement data. More... | |
const int | YOffsetIndex = 1 |
The index of the Y Offset in the movement data. More... | |
const int | CanClimbIndex = 2 |
The index of the can climb in the movement data. More... | |
const int | ClimbStartOffsetIndex = 3 |
The index of the climb start in the movement data. More... | |
const int | ClimbEndOffsetIndex = 4 |
The index of the climb end in the movement data. More... | |
const int | ClimbableLayersIndex = 5 |
The index of the climbable layers in the movement data. More... | |
const int | HangableLayersIndex = 7 |
The index of the hangable layers in the movement data. More... | |
const int | FacingDirectionIndex = 6 |
The index of the facing direction in the movement data. More... | |
const int | MovementVariableCount = 8 |
The size of the movement variable array in the movement data. More... | |
Properties | |
new static MovementInfo | Info [get] |
Static movement info used by the editor. More... | |
override int | FacingDirection [get] |
Returns the direction the character is facing. 0 for none, 1 for right, -1 for left. wThis overriden version always returns the input direction. More... | |
override AnimationState | AnimationState [get] |
Gets the animation state that this movement wants to set. More... | |
override bool | ShouldApplyGravity [get] |
This class will handle gravity internally. More... | |
override RaycastType | ShouldDoBaseCollisions [get] |
Gets a value indicating whether this PlatformerPro.Movement expects the base collisions to be executed after its movement finishes. 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... | |
Hang from the ceiling on collision.
|
protectedvirtual |
Checks for animation state transition. I.e. when state should be changed based on the animation state.
|
protectedvirtual |
Checks the head collisions.
true
, if head colliders were hitting something , false
otherwise.
|
virtual |
Start the special mvoe
Reimplemented from PlatformerPro.SpecialMovement.
override Movement PlatformerPro.SpecialMovement_HangFromCeiling.Init | ( | Character | character, |
MovementVariable[] | movementData | ||
) |
override void PlatformerPro.SpecialMovement_HangFromCeiling.LosingControl | ( | ) |
Called when the movement loses control.
|
virtual |
Gets a value indicating whether this movement wants to do a special move.
true
, if special move was wanted, false
otherwise.Reimplemented from PlatformerPro.SpecialMovement.
Reimplemented in PlatformerPro.SpecialMovement_HangFromCeilingWithClimb.
bool PlatformerPro.SpecialMovement_HangFromCeiling.canClimb |
Can we climb?
|
staticprotected |
The index of the can climb in the movement data.
int PlatformerPro.SpecialMovement_HangFromCeiling.climbableLayers |
Layers we can climb up.
|
staticprotected |
The index of the climbable layers in the movement data.
Vector2 PlatformerPro.SpecialMovement_HangFromCeiling.climbEndOffset |
Offset applied at end of climb before we go to CLIMB_UP.
|
staticprotected |
The index of the climb end in the movement data.
Vector2 PlatformerPro.SpecialMovement_HangFromCeiling.climbStartOffset |
Offset applied at start of climb before we go to CLIMB.
|
staticprotected |
The index of the climb start in the movement data.
|
protected |
Stores current heaad collider.
int PlatformerPro.SpecialMovement_HangFromCeiling.facingDirection |
Direction to face. Use 0 to maintain facing direction. This is really just a work around for the graphics in bionic cop.
|
staticprotected |
The index of the facing direction in the movement data.
float PlatformerPro.SpecialMovement_HangFromCeiling.fallTime = 0.1f |
How long we fall for after letting go of ceiling.
|
staticprotected |
The index of the fall time in the movement data.
|
protected |
The fall timer.
int PlatformerPro.SpecialMovement_HangFromCeiling.hangableLayers |
Layers we can hang from.
|
staticprotected |
The index of the hangable layers in the movement data.
|
staticprotected |
The size of the movement variable array in the movement data.
|
protected |
If the animator drives animation state then keep a cached copy.
|
protected |
Current state.
float PlatformerPro.SpecialMovement_HangFromCeiling.yOffset = 0.2f |
Difference between y position of jump and hang.
|
staticprotected |
The index of the Y Offset in the movement data.
|
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. wThis overriden version always returns the input direction.
|
staticget |
Static movement info used by the editor.
|
get |
This class will handle gravity internally.
|
get |
Gets a value indicating whether this PlatformerPro.Movement expects the base collisions to be executed after its movement finishes.