platformer
Public Member Functions | Public Attributes | List of all members
UnityPlatformer.CharacterAction Class Referenceabstract

Base class to perform an action over a character More...

Inheritance diagram for UnityPlatformer.CharacterAction:
UnityPlatformer.CharacterActionCrounch UnityPlatformer.CharacterActionFallThrough UnityPlatformer.CharacterActionFence UnityPlatformer.CharacterActionFly UnityPlatformer.CharacterActionGrab UnityPlatformer.CharacterActionHorizontalMovement UnityPlatformer.CharacterActionJump UnityPlatformer.CharacterActionLadder UnityPlatformer.CharacterActionLiquidMovement UnityPlatformer.CharacterActionProjectile UnityPlatformer.CharacterActionPull UnityPlatformer.CharacterActionPush UnityPlatformer.CharacterActionRope UnityPlatformer.CharacterActionSlipping UnityPlatformer.CharacterActionTimed UnityPlatformer.CharacterActionUseItem UnityPlatformer.CharacterActionWallStick

Public Member Functions

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...
 
abstract int WantsToUpdate (float delta)
 Tells the character we want to take control More...
 
abstract void PerformAction (float delta)
 Do your action here. More...
 
abstract PostUpdateActions GetPostUpdateActions ()
 Return what to do next. More...
 

Public Attributes

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

Base class to perform an action over a character

Basically an action modify character state and velocity

Member Function Documentation

◆ GainControl()

virtual void UnityPlatformer.CharacterAction.GainControl ( float  delta)
inlinevirtual

◆ GetPostUpdateActions()

abstract PostUpdateActions UnityPlatformer.CharacterAction.GetPostUpdateActions ( )
pure virtual

◆ LoseControl()

virtual void UnityPlatformer.CharacterAction.LoseControl ( float  delta)
inlinevirtual

Called (once) when other action 'WantsToUpdate' or this action don't anymore

Can be used to exit states and clean up

Reimplemented in UnityPlatformer.CharacterActionMelee, UnityPlatformer.CharacterActionPush, UnityPlatformer.CharacterActionRope, UnityPlatformer.CharacterActionPull, UnityPlatformer.CharacterActionGrab, and UnityPlatformer.CharacterActionSlipping.

◆ OnDisable()

virtual void UnityPlatformer.CharacterAction.OnDisable ( )
inlinevirtual

◆ OnEnable()

virtual void UnityPlatformer.CharacterAction.OnEnable ( )
inlinevirtual

◆ PerformAction()

abstract void UnityPlatformer.CharacterAction.PerformAction ( float  delta)
pure virtual

◆ Reset()

void UnityPlatformer.CharacterAction.Reset ( )
inline

Try to set character & input from parent nodes

◆ WantsToUpdate()

abstract int UnityPlatformer.CharacterAction.WantsToUpdate ( float  delta)
pure virtual

Member Data Documentation

◆ character

Character UnityPlatformer.CharacterAction.character

Target character that will be affected by this movement

◆ input

PlatformerInput UnityPlatformer.CharacterAction.input

Input to listen

◆ onGrainControl

Action UnityPlatformer.CharacterAction.onGrainControl

Callback when this movement WantsToUpdate and has highest priority.

◆ onLoseControl

Action UnityPlatformer.CharacterAction.onLoseControl

Callback when this movement don't WantsToUpdate or another movement has higher priority


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