Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.SpecialMovement_HangFromCeiling Class Reference

Hang from the ceiling on collision. More...

Inheritance diagram for PlatformerPro.SpecialMovement_HangFromCeiling:
PlatformerPro.SpecialMovement PlatformerPro.BaseMovement< SpecialMovement > PlatformerPro.SpecialMovement_HangFromCeilingWithClimb

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...
 
- Public Member Functions inherited from PlatformerPro.BaseMovement< SpecialMovement >
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...
 
- Protected Attributes inherited from PlatformerPro.BaseMovement< SpecialMovement >
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...
 
- Properties inherited from PlatformerPro.SpecialMovement
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
- Properties inherited from PlatformerPro.BaseMovement< SpecialMovement >
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...
 

Detailed Description

Hang from the ceiling on collision.

Member Function Documentation

◆ CheckForAnimationStateTransition()

virtual void PlatformerPro.SpecialMovement_HangFromCeiling.CheckForAnimationStateTransition ( )
protectedvirtual

Checks for animation state transition. I.e. when state should be changed based on the animation state.

◆ CheckHeadCollisions()

virtual bool PlatformerPro.SpecialMovement_HangFromCeiling.CheckHeadCollisions ( )
protectedvirtual

Checks the head collisions.

Returns
true, if head colliders were hitting something , false otherwise.

◆ DoSpecialMove()

override void PlatformerPro.SpecialMovement_HangFromCeiling.DoSpecialMove ( )
virtual

Start the special mvoe

Reimplemented from PlatformerPro.SpecialMovement.

◆ Init()

override Movement PlatformerPro.SpecialMovement_HangFromCeiling.Init ( Character  character,
MovementVariable[]  movementData 
)

Initialise the movement with the given movement data.

Parameters
characterCharacter.
movementDataMovement data.
ignoredIgnored.

◆ LosingControl()

override void PlatformerPro.SpecialMovement_HangFromCeiling.LosingControl ( )

Called when the movement loses control.

◆ WantsSpecialMove()

override bool PlatformerPro.SpecialMovement_HangFromCeiling.WantsSpecialMove ( )
virtual

Gets a value indicating whether this movement wants to do a special move.

Returns
true, if special move was wanted, false otherwise.

Reimplemented from PlatformerPro.SpecialMovement.

Reimplemented in PlatformerPro.SpecialMovement_HangFromCeilingWithClimb.

Member Data Documentation

◆ canClimb

bool PlatformerPro.SpecialMovement_HangFromCeiling.canClimb

Can we climb?

◆ CanClimbIndex

const int PlatformerPro.SpecialMovement_HangFromCeiling.CanClimbIndex = 2
staticprotected

The index of the can climb in the movement data.

◆ climbableLayers

int PlatformerPro.SpecialMovement_HangFromCeiling.climbableLayers

Layers we can climb up.

◆ ClimbableLayersIndex

const int PlatformerPro.SpecialMovement_HangFromCeiling.ClimbableLayersIndex = 5
staticprotected

The index of the climbable layers in the movement data.

◆ climbEndOffset

Vector2 PlatformerPro.SpecialMovement_HangFromCeiling.climbEndOffset

Offset applied at end of climb before we go to CLIMB_UP.

◆ ClimbEndOffsetIndex

const int PlatformerPro.SpecialMovement_HangFromCeiling.ClimbEndOffsetIndex = 4
staticprotected

The index of the climb end in the movement data.

◆ climbStartOffset

Vector2 PlatformerPro.SpecialMovement_HangFromCeiling.climbStartOffset

Offset applied at start of climb before we go to CLIMB.

◆ ClimbStartOffsetIndex

const int PlatformerPro.SpecialMovement_HangFromCeiling.ClimbStartOffsetIndex = 3
staticprotected

The index of the climb start in the movement data.

◆ currentHeadCollider

Collider2D PlatformerPro.SpecialMovement_HangFromCeiling.currentHeadCollider
protected

Stores current heaad collider.

◆ facingDirection

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.

◆ FacingDirectionIndex

const int PlatformerPro.SpecialMovement_HangFromCeiling.FacingDirectionIndex = 6
staticprotected

The index of the facing direction in the movement data.

◆ fallTime

float PlatformerPro.SpecialMovement_HangFromCeiling.fallTime = 0.1f

How long we fall for after letting go of ceiling.

◆ FallTimeIndex

const int PlatformerPro.SpecialMovement_HangFromCeiling.FallTimeIndex = 0
staticprotected

The index of the fall time in the movement data.

◆ fallTimer

float PlatformerPro.SpecialMovement_HangFromCeiling.fallTimer
protected

The fall timer.

◆ hangableLayers

int PlatformerPro.SpecialMovement_HangFromCeiling.hangableLayers

Layers we can hang from.

◆ HangableLayersIndex

const int PlatformerPro.SpecialMovement_HangFromCeiling.HangableLayersIndex = 7
staticprotected

The index of the hangable layers in the movement data.

◆ MovementVariableCount

const int PlatformerPro.SpecialMovement_HangFromCeiling.MovementVariableCount = 8
staticprotected

The size of the movement variable array in the movement data.

◆ myAnimator

Animator PlatformerPro.SpecialMovement_HangFromCeiling.myAnimator
protected

If the animator drives animation state then keep a cached copy.

◆ state

CeilingHangState PlatformerPro.SpecialMovement_HangFromCeiling.state
protected

Current state.

◆ yOffset

float PlatformerPro.SpecialMovement_HangFromCeiling.yOffset = 0.2f

Difference between y position of jump and hang.

◆ YOffsetIndex

const int PlatformerPro.SpecialMovement_HangFromCeiling.YOffsetIndex = 1
staticprotected

The index of the Y Offset in the movement data.

Property Documentation

◆ AnimationState

override AnimationState PlatformerPro.SpecialMovement_HangFromCeiling.AnimationState
get

Gets the animation state that this movement wants to set.

◆ FacingDirection

override int PlatformerPro.SpecialMovement_HangFromCeiling.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.

◆ Info

new static MovementInfo PlatformerPro.SpecialMovement_HangFromCeiling.Info
staticget

Static movement info used by the editor.

◆ ShouldApplyGravity

override bool PlatformerPro.SpecialMovement_HangFromCeiling.ShouldApplyGravity
get

This class will handle gravity internally.

◆ ShouldDoBaseCollisions

override RaycastType PlatformerPro.SpecialMovement_HangFromCeiling.ShouldDoBaseCollisions
get

Gets a value indicating whether this PlatformerPro.Movement expects the base collisions to be executed after its movement finishes.


The documentation for this class was generated from the following file: