platformer
|
Movement while on ground and not slipping More...
Public Member Functions | |
override void | OnEnable () |
keep Character.actions in sync More... | |
void | OnActionDown (string _action) |
input.onActionDown More... | |
void | OnActionUp (string _action) |
input.onActionUp More... | |
void | Clear () |
Reset SmoothDamp More... | |
override void | PerformAction (float delta) |
Do horizontal movement More... | |
void | Move (float spdy, ref float smoothing, float accTime) |
Horizontal movement based on current input 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... | |
abstract int | WantsToUpdate (float delta) |
Tells the character we want to take control More... | |
Public Attributes | |
float | speed = 3 |
(Walking) Movement speed More... | |
float | accelerationTime = .1f |
(Walking) Time to reach max speed More... | |
float | runSpeed = 6 |
(Running) Movement speed More... | |
float | runAccelerationTime = .1f |
(Running) Time to reach max speed More... | |
bool | alwaysRun = true |
Do not walk? More... | |
string | runAction = "Run" |
Input action name for start running (not used if alwaysRun=true) 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... | |
Movement while on ground and not slipping
|
inline |
Reset SmoothDamp
|
inlinevirtual |
Return what to do next.
By default should be: APPLY_GRAVITY | WORLD_COLLISIONS
Implements UnityPlatformer.CharacterAction.
|
inline |
Horizontal movement based on current input
|
inline |
input.onActionDown
|
inline |
input.onActionUp
|
inlinevirtual |
keep Character.actions in sync
Reimplemented from UnityPlatformer.CharacterAction.
|
inlinevirtual |
Do horizontal movement
Implements UnityPlatformer.CharacterAction.
float UnityPlatformer.CharacterActionHorizontalMovement.accelerationTime = .1f |
(Walking) Time to reach max speed
bool UnityPlatformer.CharacterActionHorizontalMovement.alwaysRun = true |
Do not walk?
float UnityPlatformer.CharacterActionHorizontalMovement.runAccelerationTime = .1f |
(Running) Time to reach max speed
string UnityPlatformer.CharacterActionHorizontalMovement.runAction = "Run" |
Input action name for start running (not used if alwaysRun=true)
float UnityPlatformer.CharacterActionHorizontalMovement.runSpeed = 6 |
(Running) Movement speed
float UnityPlatformer.CharacterActionHorizontalMovement.speed = 3 |
(Walking) Movement speed