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

This is a Hacky Action to keep the Character from falling.
The reason is that you cannot set 0,0 as gravity in the character, because it means use global configuration More...

Inheritance diagram for UnityPlatformer.CharacterActionFly:
UnityPlatformer.CharacterAction

Public Member Functions

override void OnEnable ()
 keep Character.actions in sync More...
 
override void PerformAction (float delta)
 Oppose gravity, do not fall More...
 
override int WantsToUpdate (float delta)
 Always. 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 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

This is a Hacky Action to keep the Character from falling.
The reason is that you cannot set 0,0 as gravity in the character, because it means use global configuration

Member Function Documentation

◆ GetPostUpdateActions()

override PostUpdateActions UnityPlatformer.CharacterActionFly.GetPostUpdateActions ( )
inlinevirtual

Return what to do next.

By default should be: APPLY_GRAVITY | WORLD_COLLISIONS

Implements UnityPlatformer.CharacterAction.

◆ OnEnable()

override void UnityPlatformer.CharacterActionFly.OnEnable ( )
inlinevirtual

keep Character.actions in sync

Reimplemented from UnityPlatformer.CharacterAction.

◆ PerformAction()

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

Oppose gravity, do not fall

Implements UnityPlatformer.CharacterAction.

◆ WantsToUpdate()

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

Always.

Implements UnityPlatformer.CharacterAction.


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