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

Fall through platforms while pressing down More...

Inheritance diagram for UnityPlatformer.CharacterActionFallThrough:
UnityPlatformer.CharacterAction

Public Member Functions

override int WantsToUpdate (float delta)
 Tells the character we want to take control More...
 
override void PerformAction (float delta)
 Do your action here. More...
 
override PostUpdateActions GetPostUpdateActions ()
 Return what to do next. 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...
 
virtual void GainControl (float delta)
 Called (once) when this action is going to be 'PerformAction' for first time More...
 
virtual void LoseControl (float delta)
 Called (once) when other action 'WantsToUpdate' or this action don't anymore More...
 

Additional Inherited Members

- 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

Fall through platforms while pressing down

Member Function Documentation

◆ GetPostUpdateActions()

override PostUpdateActions UnityPlatformer.CharacterActionFallThrough.GetPostUpdateActions ( )
inlinevirtual

Return what to do next.

By default should be: APPLY_GRAVITY | WORLD_COLLISIONS

Implements UnityPlatformer.CharacterAction.

◆ PerformAction()

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

Do your action here.

Implements UnityPlatformer.CharacterAction.

◆ WantsToUpdate()

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

Tells the character we want to take control

  • Positive numbers fight: Higher number wins
  • Negative numbers are used to ignore fight and force Character to call PerformAction, but! because it doesn't win the fight onLoseControl, onGrainControl and GetPostUpdateActions are ignored.
    NOTE can be used as a replace for UpdateManager.PlatformerUpdate

Implements UnityPlatformer.CharacterAction.


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