platformer
|
Climb a ladder More...
Public Member Functions | |
override void | OnEnable () |
keep Character.actions in sync More... | |
override int | WantsToUpdate (float delta) |
Enter in ladder mode when user is in a ladder area and pressing up/down More... | |
override void | GainControl (float delta) |
EnterState and start centering 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 | LoseControl (float delta) |
Called (once) when other action 'WantsToUpdate' or this action don't anymore More... | |
Public Attributes | |
float | speed = 6 |
Ladder movement speed. More... | |
bool | moveToCenter = false |
Move character to the center of the ladder, instantly More... | |
float | towardsSpeed = 32 |
Maximum speed to snap to the center. More... | |
float | towardsTime = 0.1f |
Time to reach the center (if towardsSpeed is fast enough). More... | |
bool | leftRightDismount = true |
Dismount pressing left/right More... | |
float | dismountTime = 0.2f |
Time left/right need to be pressed to dismount More... | |
bool | dismountJumping = true |
Character can dismount ladders jumping? More... | |
JumpConstantProperties | jumpOff = new JumpConstantProperties(new Vector2(20, 20)) |
Jump with no direction pressed. More... | |
int | priority = 10 |
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... | |
Climb a ladder
|
inlinevirtual |
EnterState and start centering
Reimplemented from UnityPlatformer.CharacterAction.
|
inlinevirtual |
Return what to do next.
By default should be: APPLY_GRAVITY | WORLD_COLLISIONS
Implements UnityPlatformer.CharacterAction.
|
inlinevirtual |
keep Character.actions in sync
Reimplemented from UnityPlatformer.CharacterAction.
|
inlinevirtual |
Do your action here.
Implements UnityPlatformer.CharacterAction.
|
inlinevirtual |
Enter in ladder mode when user is in a ladder area and pressing up/down
Implements UnityPlatformer.CharacterAction.
bool UnityPlatformer.CharacterActionLadder.dismountJumping = true |
Character can dismount ladders jumping?
float UnityPlatformer.CharacterActionLadder.dismountTime = 0.2f |
Time left/right need to be pressed to dismount
JumpConstantProperties UnityPlatformer.CharacterActionLadder.jumpOff = new JumpConstantProperties(new Vector2(20, 20)) |
Jump with no direction pressed.
bool UnityPlatformer.CharacterActionLadder.leftRightDismount = true |
Dismount pressing left/right
bool UnityPlatformer.CharacterActionLadder.moveToCenter = false |
Move character to the center of the ladder, instantly
int UnityPlatformer.CharacterActionLadder.priority = 10 |
Action priority
float UnityPlatformer.CharacterActionLadder.speed = 6 |
Ladder movement speed.
float UnityPlatformer.CharacterActionLadder.towardsSpeed = 32 |
Maximum speed to snap to the center.
float UnityPlatformer.CharacterActionLadder.towardsTime = 0.1f |
Time to reach the center (if towardsSpeed is fast enough).