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

Ground movement which sets x speed based on an animation curve and its relationship to animator normalised time. More...

Inheritance diagram for PlatformerPro.GroundMovement_CurveDriven:
PlatformerPro.GroundMovement_Digital PlatformerPro.IFlippableGravityMovement PlatformerPro.GroundMovement PlatformerPro.IFlippableGravityMovement PlatformerPro.BaseMovement< GroundMovement >

Public Member Functions

override void DoMove ()
 Moves the character. More...
 
override void PostCollisionDoMove ()
 Does any movement that MUST be done after collissions are calculated. More...
 
override Movement Init (Character character, MovementVariable[] movementData)
 Initialise the movement with the given movement data. More...
 
- Public Member Functions inherited from PlatformerPro.GroundMovement_Digital
override void DoMove ()
 Moves the character. More...
 
override void PostCollisionDoMove ()
 Snap to ground if set. More...
 
override Movement Init (Character character, MovementVariable[] movementData)
 Initialise the mvoement with the given movement data. More...
 
- Public Member Functions inherited from PlatformerPro.GroundMovement
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...
 

Public Attributes

AnimationCurve speedCurve
 The curve defining the speed the character moves at. More...
 
bool useAnimationTime
 If true find an animator and use the normalised time of the animation to determine the speed. More...
 
float loopTime
 If we aren't using animation time then what time scale should each loop represent. More...
 
- Public Attributes inherited from PlatformerPro.GroundMovement_Digital
float speed
 The speed the character moves at. More...
 

Protected Attributes

float loopTimer
 The loop timer. More...
 
Animator myAnimator
 Animator reference. More...
 
- 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...
 

Static Protected Attributes

const int SpeedCurveIndex = 0
 The index for the speed value in the movement data. More...
 
const int UseAnimationTimeIndex = 1
 The index for the speed value in the movement data. More...
 
const int LoopTimeIndex = 2
 The index of the loop time in the movement data. More...
 
new const int MovementVariableCount = 3
 The size of the movement variable array. More...
 
- Static Protected Attributes inherited from PlatformerPro.GroundMovement_Digital
const int SpeedIndex = 0
 The index for the speed value in the movement data. More...
 
const int MovementVariableCount = 1
 The size of the movement variable array. More...
 
const float DefaultSpeed = 5.0f
 The default speed. More...
 

Properties

new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
- Properties inherited from PlatformerPro.GroundMovement_Digital
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 FacingDirection [get]
 Returns the direction the character is facing. 0 for none, 1 for right, -1 for left. This overriden version always returns the input direction. More...
 
- Properties inherited from PlatformerPro.GroundMovement
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 Member Functions inherited from PlatformerPro.GroundMovement
virtual void SnapToGround ()
 Snaps the character to the ground. More...
 

Detailed Description

Ground movement which sets x speed based on an animation curve and its relationship to animator normalised time.

Member Function Documentation

◆ DoMove()

override void PlatformerPro.GroundMovement_CurveDriven.DoMove ( )

Moves the character.

◆ Init()

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

Initialise the movement with the given movement data.

Parameters
characterCharacter.
movementDataMovement data.

◆ PostCollisionDoMove()

override void PlatformerPro.GroundMovement_CurveDriven.PostCollisionDoMove ( )

Does any movement that MUST be done after collissions are calculated.

Member Data Documentation

◆ loopTime

float PlatformerPro.GroundMovement_CurveDriven.loopTime

If we aren't using animation time then what time scale should each loop represent.

◆ LoopTimeIndex

const int PlatformerPro.GroundMovement_CurveDriven.LoopTimeIndex = 2
staticprotected

The index of the loop time in the movement data.

◆ loopTimer

float PlatformerPro.GroundMovement_CurveDriven.loopTimer
protected

The loop timer.

◆ MovementVariableCount

new const int PlatformerPro.GroundMovement_CurveDriven.MovementVariableCount = 3
staticprotected

The size of the movement variable array.

◆ myAnimator

Animator PlatformerPro.GroundMovement_CurveDriven.myAnimator
protected

Animator reference.

◆ speedCurve

AnimationCurve PlatformerPro.GroundMovement_CurveDriven.speedCurve

The curve defining the speed the character moves at.

◆ SpeedCurveIndex

const int PlatformerPro.GroundMovement_CurveDriven.SpeedCurveIndex = 0
staticprotected

The index for the speed value in the movement data.

◆ useAnimationTime

bool PlatformerPro.GroundMovement_CurveDriven.useAnimationTime

If true find an animator and use the normalised time of the animation to determine the speed.

◆ UseAnimationTimeIndex

const int PlatformerPro.GroundMovement_CurveDriven.UseAnimationTimeIndex = 1
staticprotected

The index for the speed value in the movement data.

Property Documentation

◆ Info

new static MovementInfo PlatformerPro.GroundMovement_CurveDriven.Info
staticget

Static movement info used by the editor.


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