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

A wrapper class for handling moving on the ground that proxies the movement function to the desired implementation. More...

Inheritance diagram for PlatformerPro.GroundMovement:
PlatformerPro.BaseMovement< GroundMovement > PlatformerPro.GroundMovement_BalanceOnEdge PlatformerPro.GroundMovement_Crouch PlatformerPro.GroundMovement_Digital PlatformerPro.GroundMovement_DigitalStopOnUpDown PlatformerPro.GroundMovement_PassDown PlatformerPro.GroundMovement_PassDownByTimeOnly PlatformerPro.GroundMovement_Physics PlatformerPro.GroundMovement_Pull PlatformerPro.GroundMovement_Push PlatformerPro.GroundMovement_RollOnLand PlatformerPro.GroundMovement_SimpleLand PlatformerPro.GroundMovement_Stairs

Public Member Functions

virtual bool WantsGroundControl ()
 Gets a value indicating whether this movement wants to control the movement on the ground. Default is false, with control falling back to default ground. Override if you want particular control. More...
 
virtual void ApplySlopeForce ()
 Applies slope force. More...
 
virtual float ApplySlopeSpeedModifier (float speed)
 Adjusts speed to cater for vertical movement More...
 
virtual float GetSpeed (float baseSpeed)
 Gets the ground speed. More...
 
virtual float GetRunSpeed (float baseRunSpeed)
 Gets the run speed. More...
 
virtual float GetAcceleration (float baseAcceleration)
 Gets the acceleration. More...
 
- Public Member Functions inherited from PlatformerPro.BaseMovement< GroundMovement >
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...
 

Protected Member Functions

virtual void SnapToGround ()
 Snaps the character to the ground. More...
 

Properties

new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
virtual bool SupportsSlidingOnSlopes [get]
 Gets a value indicating whether this PlatformerPro.Movement can support automatic sliding based on the characters slope. More...
 
- Properties inherited from PlatformerPro.BaseMovement< GroundMovement >
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< GroundMovement >
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 on the ground that proxies the movement function to the desired implementation.

Member Function Documentation

◆ ApplySlopeForce()

virtual void PlatformerPro.GroundMovement.ApplySlopeForce ( )
virtual

◆ ApplySlopeSpeedModifier()

virtual float PlatformerPro.GroundMovement.ApplySlopeSpeedModifier ( float  speed)
virtual

Adjusts speed to cater for vertical movement

Parameters
speed
Returns

◆ GetAcceleration()

virtual float PlatformerPro.GroundMovement.GetAcceleration ( float  baseAcceleration)
virtual

Gets the acceleration.

Returns
The acceleration.
Parameters
baseSpeedBase acceleration.

◆ GetRunSpeed()

virtual float PlatformerPro.GroundMovement.GetRunSpeed ( float  baseRunSpeed)
virtual

Gets the run speed.

Returns
The run speed.
Parameters
baseSpeedBase run speed.

◆ GetSpeed()

virtual float PlatformerPro.GroundMovement.GetSpeed ( float  baseSpeed)
virtual

Gets the ground speed.

Returns
The ground speed.
Parameters
baseSpeedBase speed.

◆ SnapToGround()

virtual void PlatformerPro.GroundMovement.SnapToGround ( )
protectedvirtual

Snaps the character to the ground.

◆ WantsGroundControl()

Property Documentation

◆ Info

new static MovementInfo PlatformerPro.GroundMovement.Info
staticget

Static movement info used by the editor.

◆ SupportsSlidingOnSlopes

virtual bool PlatformerPro.GroundMovement.SupportsSlidingOnSlopes
get

Gets a value indicating whether this PlatformerPro.Movement can support automatic sliding based on the characters slope.


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