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

A wall movement class that lets you jump away from a wall and will automatically slide down a wall if you touch it. More...

Inheritance diagram for PlatformerPro.WallMovement_WallJump_V2:
PlatformerPro.WallMovement_WallJump PlatformerPro.WallMovement PlatformerPro.BaseMovement< WallMovement >

Public Member Functions

override bool WantsCling ()
 Gets a value indicating whether this movement wants to intiate a wall clinging behaviour. More...
 
override void DoMove ()
 Moves the character. More...
 
override bool ForceMaintainControl ()
 If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't. In this case control unless the character dismounts. More...
 
- Public Member Functions inherited from PlatformerPro.WallMovement_WallJump
override void DoMove ()
 Moves the character. More...
 
override Movement Init (Character character, MovementVariable[] movementData)
 Initialise the movement with the given movement data. More...
 
override void DoCling ()
 
override bool ForceMaintainControl ()
 If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't. In this case control unless the character dismounts. More...
 
override void LosingControl ()
 Called when the movement loses control. Override to do any reset type actions. More...
 
- Public Member Functions inherited from PlatformerPro.BaseMovement< WallMovement >
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...
 

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...
 
- Properties inherited from PlatformerPro.WallMovement_WallJump
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...
 
override int AnimationPriority [get]
 Gets the priority for the animation state. More...
 
override int FacingDirection [get]
 Returns the direction the character is facing. 0 for none, 1 for right, -1 for left. This overriden version always returns the wall direction. More...
 
override bool ShouldApplyGravity [get]
 Gravity handled internally More...
 
- Properties inherited from PlatformerPro.WallMovement
virtual bool ClingToAllWalls [get, protected set]
 If true this applies to all walls and there is no need to use tags or layers to detect walls. More...
 
virtual bool DetectWallsByTag [get, protected set]
 Should we find walls 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 WallLayerOrTagName [get, protected set]
 The name of the wall layer if we find by layers, or the tag name if we find by tags. More...
 
virtual int RequiredColliders [get, protected set]
 The number of colliders required for wall clinging to intiate. Note these colliders don't need to be hitting the same wall just a wall on the same side (so you can move up a wall made of tiled boxes). 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 walls don't do this. More...
 
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
- Properties inherited from PlatformerPro.BaseMovement< WallMovement >
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

- Public Attributes inherited from PlatformerPro.WallMovement_WallJump
WallJumpControlType controlType
 How we do a wall jump. More...
 
float jumpHeight
 How high the character jumps on a wall jump. If 0 character will just fall from wall when jump is pressed. More...
 
float controlLeeway
 How long can the character be away from the wall and still trigger a wall jump. More...
 
float minSpeedForWallJump
 If the character is going slower than this (usually falling) then they will not be able to wall jump. More...
 
float speedWhereWallJumpEnds
 How fast does the chracter need to be falling before control reverts back to user. More...
 
float clingGravity
 Gravity to apply if character touches wall. More...
 
float clingTargetSpeed
 Max speed cling will move at. IF it goes faster than this it will slow down instead of speeding up. More...
 
- Protected Member Functions inherited from PlatformerPro.WallMovement_WallJump
virtual bool CheckControls ()
 Checks if correc tinput for a wall jump is being entered. More...
 
- Protected Attributes inherited from PlatformerPro.WallMovement_WallJump
float initialVelocity
 Derived initial velocity based on jumpHeight and relative gravity. More...
 
bool movingAwayFromWall
 Currently moving away from wall? More...
 
Collider2D cachedWall
 Cached copy of the wall we jumped from More...
 
int cachedWallDirection
 What was the wall direction for the last wall? More...
 
float ableToWallJumpTimer
 If this is non-zero the character is able to press trigger a wall jump. More...
 
BasicRaycast highestRightCollider
 The highest right collider. More...
 
BasicRaycast highestLeftCollider
 The highest left collider. More...
 
- Protected Attributes inherited from PlatformerPro.BaseMovement< WallMovement >
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 inherited from PlatformerPro.WallMovement_WallJump
const int ControlTypeIndex = 2
 The index of the control type in movement data. More...
 
const int JumpHeightIndex = 3
 The index of the jump height in movement data. More...
 
const int ControlLeewayIndex = 4
 The index of the control leeway in movement data. More...
 
const int MinSpeedForWallJumpIndex = 5
 The index of the max speed for jump in movement data. More...
 
const int SpeedWhereWallJumpEndsIndex = 6
 The index of the speed where wall jump ends. More...
 
const int ClingGravityIndex = 7
 The index of the cling gravity. More...
 
const int ClingTargetSpeedIndex = 8
 The index of the cling target speed. More...
 
new const int MovementVariableCount = 9
 The size of the movement variable array. More...
 
const float DefaultJumpHeight = 2.0f
 The default height of the jump. More...
 
const float DefaultControlLeeway = 0.2f
 The default away distance. More...
 
const float DefaultMaxSpeedForJump = -999f
 The default air speed. More...
 
const float DefaultSpeedWhereWallJumpEnds = -1f
 The default air speed. More...
 
const float DefaultClingGravity = -10.0f
 The default cling gravity. More...
 
const float DefaultClingTargetSpeed = -5.0f
 The default cling target speed. More...
 
- Static Protected Attributes inherited from PlatformerPro.WallMovement
const int RequiredCollidersIndex = 1
 The index of the property for the required colliders. /// More...
 
const int MovementVariableCount = 2
 The size of the movement variable array. More...
 
const int DefaultRequiredColliders = 2
 The index of the property for the required colliders. /// More...
 

Detailed Description

A wall movement class that lets you jump away from a wall and will automatically slide down a wall if you touch it.

Member Function Documentation

◆ DoMove()

override void PlatformerPro.WallMovement_WallJump_V2.DoMove ( )

Moves the character.

◆ ForceMaintainControl()

override bool PlatformerPro.WallMovement_WallJump_V2.ForceMaintainControl ( )

If this is true then the movement wants to maintain control of the character even if default transition conditions suggest it shouldn't. In this case control unless the character dismounts.

◆ WantsCling()

override bool PlatformerPro.WallMovement_WallJump_V2.WantsCling ( )
virtual

Gets a value indicating whether this movement wants to intiate a wall clinging behaviour.

Reimplemented from PlatformerPro.WallMovement_WallJump.

Property Documentation

◆ AnimationState

override AnimationState PlatformerPro.WallMovement_WallJump_V2.AnimationState
get

Gets the animation state that this movement wants to set.

◆ Info

new static MovementInfo PlatformerPro.WallMovement_WallJump_V2.Info
staticget

Static movement info used by the editor.


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