platformer
|
Base class to perform an action over a character More...
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... | |
Base class to perform an action over a character
Basically an action modify character state and velocity
|
inlinevirtual |
Called (once) when this action is going to be 'PerformAction' for first time
Can be use to enter states
Reimplemented in UnityPlatformer.CharacterActionLadder, UnityPlatformer.CharacterActionMelee, UnityPlatformer.CharacterActionWallStick, UnityPlatformer.CharacterActionPush, UnityPlatformer.CharacterActionTimed, UnityPlatformer.CharacterActionRope, UnityPlatformer.CharacterActionFence, UnityPlatformer.CharacterActionPull, UnityPlatformer.CharacterActionGrab, and UnityPlatformer.CharacterActionSlipping.
|
pure virtual |
Return what to do next.
By default should be: APPLY_GRAVITY | WORLD_COLLISIONS
Implemented in UnityPlatformer.CharacterActionLadder, UnityPlatformer.CharacterActionJump, UnityPlatformer.CharacterActionMelee, UnityPlatformer.CharacterActionRope, UnityPlatformer.CharacterActionWallStick, UnityPlatformer.CharacterActionPush, UnityPlatformer.CharacterActionLiquidMovement, UnityPlatformer.CharacterActionGrab, UnityPlatformer.CharacterActionPull, UnityPlatformer.CharacterActionFence, UnityPlatformer.CharacterActionProjectile, UnityPlatformer.CharacterActionHorizontalMovement, UnityPlatformer.CharacterActionSlipping, UnityPlatformer.CharacterActionCrounch, UnityPlatformer.CharacterActionUseItem, UnityPlatformer.CharacterActionFly, and UnityPlatformer.CharacterActionFallThrough.
|
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.
|
inlinevirtual |
keep Character.actions in sync
Reimplemented in UnityPlatformer.CharacterActionMelee, and UnityPlatformer.CharacterActionTimed.
|
inlinevirtual |
keep Character.actions in sync
Reimplemented in UnityPlatformer.CharacterActionMelee, UnityPlatformer.CharacterActionTimed, UnityPlatformer.CharacterActionWallStick, UnityPlatformer.CharacterActionRope, UnityPlatformer.CharacterActionLadder, UnityPlatformer.CharacterActionJump, UnityPlatformer.CharacterActionGrab, UnityPlatformer.CharacterActionPush, UnityPlatformer.CharacterActionPull, UnityPlatformer.CharacterActionHorizontalMovement, UnityPlatformer.CharacterActionLiquidMovement, UnityPlatformer.CharacterActionFence, UnityPlatformer.CharacterActionCrounch, and UnityPlatformer.CharacterActionFly.
|
pure virtual |
Do your action here.
Implemented in UnityPlatformer.CharacterActionMelee, UnityPlatformer.CharacterActionJump, UnityPlatformer.CharacterActionLadder, UnityPlatformer.CharacterActionPush, UnityPlatformer.CharacterActionRope, UnityPlatformer.CharacterActionWallStick, UnityPlatformer.CharacterActionPull, UnityPlatformer.CharacterActionLiquidMovement, UnityPlatformer.CharacterActionGrab, UnityPlatformer.CharacterActionFence, UnityPlatformer.CharacterActionProjectile, UnityPlatformer.CharacterActionHorizontalMovement, UnityPlatformer.CharacterActionSlipping, UnityPlatformer.CharacterActionCrounch, UnityPlatformer.CharacterActionUseItem, UnityPlatformer.CharacterActionFallThrough, and UnityPlatformer.CharacterActionFly.
|
inline |
Try to set character & input from parent nodes
|
pure virtual |
Tells the character we want to take control
Implemented in UnityPlatformer.CharacterActionMelee, UnityPlatformer.CharacterActionTimed, UnityPlatformer.CharacterActionJump, UnityPlatformer.CharacterActionWallStick, UnityPlatformer.CharacterActionLadder, UnityPlatformer.CharacterActionRope, UnityPlatformer.CharacterActionProjectile, UnityPlatformer.CharacterActionFence, UnityPlatformer.CharacterActionLiquidMovement, UnityPlatformer.CharacterActionGrab, UnityPlatformer.CharacterActionPush, UnityPlatformer.CharacterActionPull, UnityPlatformer.CharacterActionCrounch, UnityPlatformer.CharacterActionSlipping, UnityPlatformer.CharacterActionUseItem, UnityPlatformer.CharacterActionFly, UnityPlatformer.CharacterActionAirMovement, UnityPlatformer.CharacterActionCrounchMovement, UnityPlatformer.CharacterActionGroundMovement, and UnityPlatformer.CharacterActionFallThrough.
Character UnityPlatformer.CharacterAction.character |
Target character that will be affected by this movement
PlatformerInput UnityPlatformer.CharacterAction.input |
Input to listen
Action UnityPlatformer.CharacterAction.onGrainControl |
Callback when this movement WantsToUpdate and has highest priority.
Action UnityPlatformer.CharacterAction.onLoseControl |
Callback when this movement don't WantsToUpdate or another movement has higher priority