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

A wrapper class for handling moving against a wall that proxies the movement function to the desired implementation. More...

Inheritance diagram for PlatformerPro.WallMovement:
PlatformerPro.BaseMovement< WallMovement > PlatformerPro.WallMovement_AutoStick PlatformerPro.WallMovement_LedgeClimb PlatformerPro.WallMovement_WallCling PlatformerPro.WallMovement_WallJump PlatformerPro.WallMovement_WallClingAndClimb PlatformerPro.WallMovement_WallClingAndRun PlatformerPro.WallMovement_WallJump_V2 PlatformerPro.WallMovement_WallJump_V3

Public Member Functions

virtual bool WantsCling ()
 Gets a value indicating whether this movement wants to intiate a wall clinging behaviour. More...
 
virtual void DoCling ()
 
- 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...
 

Static Protected Attributes

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...
 

Properties

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

- 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...
 

Detailed Description

A wrapper class for handling moving against a wall that proxies the movement function to the desired implementation.

Member Function Documentation

◆ DoCling()

◆ WantsCling()

virtual bool PlatformerPro.WallMovement.WantsCling ( )
virtual

Member Data Documentation

◆ DefaultRequiredColliders

const int PlatformerPro.WallMovement.DefaultRequiredColliders = 2
staticprotected

The index of the property for the required colliders. ///

◆ MovementVariableCount

const int PlatformerPro.WallMovement.MovementVariableCount = 2
staticprotected

The size of the movement variable array.

◆ RequiredCollidersIndex

const int PlatformerPro.WallMovement.RequiredCollidersIndex = 1
staticprotected

The index of the property for the required colliders. ///

Property Documentation

◆ ClingToAllWalls

virtual bool PlatformerPro.WallMovement.ClingToAllWalls
getprotected set

If true this applies to all walls and there is no need to use tags or layers to detect walls.

◆ DetectWallsByTag

virtual bool PlatformerPro.WallMovement.DetectWallsByTag
getprotected 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.

◆ Info

new static MovementInfo PlatformerPro.WallMovement.Info
staticget

Static movement info used by the editor.

◆ RequiredColliders

virtual int PlatformerPro.WallMovement.RequiredColliders
getprotected 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).

◆ ShouldDoRotations

override bool PlatformerPro.WallMovement.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.

◆ WallLayerOrTagName

virtual string PlatformerPro.WallMovement.WallLayerOrTagName
getprotected set

The name of the wall layer if we find by layers, or the tag name if we find by tags.


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