platformer
|
Character Grab 'something', is centered and stop. ex: grab a ring More...
Public Member Functions | |
override void | OnEnable () |
keep Character.actions in sync More... | |
override int | WantsToUpdate (float delta) |
Tells the character we want to take control More... | |
override void | GainControl (float delta) |
EnterState and start centering More... | |
override void | LoseControl (float delta) |
ExitState and no 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... | |
Public Attributes | |
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 | moveToCenter = false |
Move character to the center of the grabArea More... | |
Vector3 | grabbingOffset = new Vector3(0, 0, 0) |
Character offset position while grabbing More... | |
bool | dismountPressingDown = true |
Dismount 'Grab' pressing down axis More... | |
bool | dismountJumping = true |
Dismount 'Grab' jumping More... | |
JumpConstantProperties | jumpOff = new JumpConstantProperties(new Vector2(20, 20)) |
Dismount jump properties More... | |
int | priority = 20 |
Action priority More... | |
float | grabAgainCooldown = 0.25f |
Time after dismount before being able to grab again. 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... | |
|
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 |
ExitState and no centering
Reimplemented from UnityPlatformer.CharacterAction.
|
inlinevirtual |
keep Character.actions in sync
Reimplemented from UnityPlatformer.CharacterAction.
|
inlinevirtual |
Do your action here.
Implements UnityPlatformer.CharacterAction.
|
inlinevirtual |
Tells the character we want to take control
Implements UnityPlatformer.CharacterAction.
bool UnityPlatformer.CharacterActionGrab.dismountJumping = true |
Dismount 'Grab' jumping
bool UnityPlatformer.CharacterActionGrab.dismountPressingDown = true |
Dismount 'Grab' pressing down axis
float UnityPlatformer.CharacterActionGrab.grabAgainCooldown = 0.25f |
Time after dismount before being able to grab again.
Vector3 UnityPlatformer.CharacterActionGrab.grabbingOffset = new Vector3(0, 0, 0) |
Character offset position while grabbing
JumpConstantProperties UnityPlatformer.CharacterActionGrab.jumpOff = new JumpConstantProperties(new Vector2(20, 20)) |
Dismount jump properties
bool UnityPlatformer.CharacterActionGrab.moveToCenter = false |
Move character to the center of the grabArea
int UnityPlatformer.CharacterActionGrab.priority = 20 |
Action priority
float UnityPlatformer.CharacterActionGrab.towardsSpeed = 32 |
Maximum speed to snap to the center.
float UnityPlatformer.CharacterActionGrab.towardsTime = 0.1f |
Time to reach the center (if towardsSpeed is fast enough).