platformer
|
Public Member Functions | |
override void | OnEnable () |
keep Character.actions in sync More... | |
void | OnActionDown (string _action) |
input.onActionDown callback More... | |
void | OnActionUp (string _action) |
input.onActionUp callback More... | |
void | ForceJump (Jump j) |
Force Character to Jump! More... | |
void | Jump (Jump j) |
Try to jump More... | |
override int | WantsToUpdate (float delta) |
Listen input and Select the current Jump More... | |
override void | PerformAction (float delta) |
Do your action here. More... | |
override PostUpdateActions | GetPostUpdateActions () |
Return what to do next. More... | |
![]() | |
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... | |
Public Attributes | |
JumpVariableHeightProperties | jumpProperties |
Jump Properties More... | |
String | action = "Jump" |
Input action name More... | |
int | priority = 5 |
Action priority More... | |
![]() | |
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... | |
Jump while on ground.
The rest jumps, are managed here, but using jump properties/type elsewhere, just by calling Jump() / ForceJump()
NOTE unity-platformer support multiple types of jumps. We just ship one type here, be free to extend!
NOTE executionOrder should be -20
TODO force one jump per press, force to release before another jump
|
inline |
Force Character to Jump!
User must be sure of what they are doing... this doesn't check anything
|
inlinevirtual |
Return what to do next.
By default should be: APPLY_GRAVITY | WORLD_COLLISIONS
Implements UnityPlatformer.CharacterAction.
|
inline |
Try to jump
|
inline |
input.onActionDown callback
|
inline |
input.onActionUp callback
|
inlinevirtual |
keep Character.actions in sync
Reimplemented from UnityPlatformer.CharacterAction.
|
inlinevirtual |
Do your action here.
Implements UnityPlatformer.CharacterAction.
|
inlinevirtual |
Listen input and Select the current Jump
Other actions (with higher priority) can trigger Jumps using Jump(), and the next Frame CharacterActionJump willl take control!
Implements UnityPlatformer.CharacterAction.
String UnityPlatformer.CharacterActionJump.action = "Jump" |
Input action name
JumpVariableHeightProperties UnityPlatformer.CharacterActionJump.jumpProperties |
Jump Properties
int UnityPlatformer.CharacterActionJump.priority = 5 |
Action priority