platformer
Public Member Functions | Public Attributes | List of all members
UnityPlatformer.CharacterActionSlipping Class Reference

Force character to slip down slope, when slopeAngle > maxClimbAngle More...

Inheritance diagram for UnityPlatformer.CharacterActionSlipping:
UnityPlatformer.CharacterAction

Public Member Functions

override int WantsToUpdate (float delta)
 Not in a liquid. OnGround and slopeAngle > maxClimbAngle More...
 
override void GainControl (float delta)
 Reset SmoothDamp More...
 
override void LoseControl (float delta)
 Exit state More...
 
override void PerformAction (float delta)
 Slipping down slope! More...
 
override PostUpdateActions GetPostUpdateActions ()
 default actions More...
 
- Public Member Functions inherited from UnityPlatformer.CharacterAction
void Reset ()
 Try to set character & input from parent nodes More...
 
virtual void OnEnable ()
 keep Character.actions in sync More...
 
virtual void OnDisable ()
 keep Character.actions in sync More...
 

Public Attributes

float minSpeed = 4
 Minimum speed More...
 
float maxSpeed = 12
 Maximum speed More...
 
float accelerationTime = .20f
 Time to reach maxSpeed More...
 
int priority = 3
 Action priority More...
 
- Public Attributes inherited from UnityPlatformer.CharacterAction
Character character
 Target character that will be affected by this movement More...
 
PlatformerInput input
 Input to listen More...
 
Action onGrainControl
 Callback when this movement WantsToUpdate and has highest priority. More...
 
Action onLoseControl
 Callback when this movement don't WantsToUpdate or another movement has higher priority More...
 

Detailed Description

Force character to slip down slope, when slopeAngle > maxClimbAngle

NOTE do not apply gravity. Handle the velocity manually so the character is always colliding below

Member Function Documentation

◆ GainControl()

override void UnityPlatformer.CharacterActionSlipping.GainControl ( float  delta)
inlinevirtual

Reset SmoothDamp

Reimplemented from UnityPlatformer.CharacterAction.

◆ GetPostUpdateActions()

override PostUpdateActions UnityPlatformer.CharacterActionSlipping.GetPostUpdateActions ( )
inlinevirtual

default actions

Implements UnityPlatformer.CharacterAction.

◆ LoseControl()

override void UnityPlatformer.CharacterActionSlipping.LoseControl ( float  delta)
inlinevirtual

Exit state

Reimplemented from UnityPlatformer.CharacterAction.

◆ PerformAction()

override void UnityPlatformer.CharacterActionSlipping.PerformAction ( float  delta)
inlinevirtual

Slipping down slope!

Implements UnityPlatformer.CharacterAction.

◆ WantsToUpdate()

override int UnityPlatformer.CharacterActionSlipping.WantsToUpdate ( float  delta)
inlinevirtual

Not in a liquid. OnGround and slopeAngle > maxClimbAngle

Implements UnityPlatformer.CharacterAction.

Member Data Documentation

◆ accelerationTime

float UnityPlatformer.CharacterActionSlipping.accelerationTime = .20f

Time to reach maxSpeed

◆ maxSpeed

float UnityPlatformer.CharacterActionSlipping.maxSpeed = 12

Maximum speed

◆ minSpeed

float UnityPlatformer.CharacterActionSlipping.minSpeed = 4

Minimum speed

◆ priority

int UnityPlatformer.CharacterActionSlipping.priority = 3

Action priority


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