Add this ability to a Character to have it handle ground movement (walk, and potentially run, crawl, etc) in x and z direction for 3D, x and y for 2D Animator parameters : Speed (float), Walking (bool)
More...
|
Movements | Movement = Movements.Free |
| whether the character can move freely, in 2D only, in 4 or 8 cardinal directions More...
|
|
bool | InputAuthorized = true |
| whether or not movement input is authorized at that time More...
|
|
bool | AnalogInput = false |
| whether or not input should be analog More...
|
|
bool | ScriptDrivenInput = false |
| whether or not input should be set from another script More...
|
|
float | WalkSpeed = 6f |
| the speed of the character when it's walking More...
|
|
bool | ShouldSetMovement = true |
| whether or not this component should set the controller's movement More...
|
|
float | IdleThreshold = 0.05f |
| the speed threshold after which the character is not considered idle anymore More...
|
|
float | Acceleration = 10f |
| the acceleration to apply to the current speed / 0f : no acceleration, instant full speed More...
|
|
float | Deceleration = 10f |
| the deceleration to apply to the current speed / 0f : no deceleration, instant stop More...
|
|
bool | InterpolateMovementSpeed = false |
| whether or not to interpolate movement speed More...
|
|
Stack< float > | ContextSpeedStack = new Stack<float>() |
| the multiplier to apply to the horizontal movement, applied by contextual elements (movement zones, etc) More...
|
|
virtual float | ContextSpeedMultiplier => ContextSpeedStack.Count > 0 ? ContextSpeedStack.Peek() : 1 |
|
ParticleSystem[] | WalkParticles |
| the particles to trigger while walking More...
|
|
ParticleSystem[] | TouchTheGroundParticles |
| the particles to trigger when touching the ground More...
|
|
AudioClip[] | TouchTheGroundSfx |
| the sfx to trigger when touching the ground More...
|
|
AudioClip | AbilityStartSfx |
| the sound fx to play when the ability starts More...
|
|
AudioClip | AbilityInProgressSfx |
| the sound fx to play while the ability is running More...
|
|
AudioClip | AbilityStopSfx |
| the sound fx to play when the ability stops More...
|
|
MMFeedbacks | AbilityStartFeedbacks |
| the feedbacks to play when the ability starts More...
|
|
MMFeedbacks | AbilityStopFeedbacks |
| the feedbacks to play when the ability stops More...
|
|
bool | AbilityPermitted = true |
| if true, this ability can perform as usual, if not, it'll be ignored. You can use this to unlock abilities over time for example More...
|
|
CharacterStates.MovementStates[] | BlockingMovementStates |
| an array containing all the blocking movement states. If the Character is in one of these states and tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while Idle or Swimming, for example. More...
|
|
CharacterStates.CharacterConditions[] | BlockingConditionStates |
| an array containing all the blocking condition states. If the Character is in one of these states and tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while dead, for example. More...
|
|
Weapon.WeaponStates[] | BlockingWeaponStates |
| an array containing all the blocking weapon states. If one of the character's weapons is in one of these states and yet the character tries to trigger this ability, it won't be permitted. Useful to prevent this ability from being used while attacking, for example. More...
|
|
AbilityEvent | OnAbilityStart |
|
AbilityEvent | OnAbilityStop |
|
|
override void | Initialization () |
| On Initialization, we set our movement speed to WalkSpeed. More...
|
|
override void | HandleInput () |
| Called at the very start of the ability's cycle, and intended to be overridden, looks for input and calls methods if conditions are met More...
|
|
virtual IEnumerator | ApplyMovementMultiplierCo (float movementMultiplier, float duration) |
| A coroutine used to apply a movement multiplier for a certain duration only More...
|
|
virtual void | HandleDirection () |
| Modifies player input to account for the selected movement mode More...
|
|
virtual void | HandleMovement () |
| Called at Update(), handles horizontal movement More...
|
|
virtual void | HandleFrozen () |
| Describes what happens when the character is in the frozen state More...
|
|
virtual void | SetMovement () |
| Moves the controller More...
|
|
virtual void | CheckJustGotGrounded () |
| Every frame, checks if we just hit the ground, and if yes, changes the state and triggers a particle effect More...
|
|
virtual void | Feedbacks () |
| Plays particles when walking, and particles and sounds when landing More...
|
|
override void | OnRespawn () |
| On Respawn, resets the speed More...
|
|
override void | OnDeath () |
| Override this to describe what should happen to this ability when the character respawns More...
|
|
virtual void | DisableWalkParticles () |
| Disables all walk particle systems that may be playing More...
|
|
override void | OnDisable () |
| On disable we make sure to turn off anything that could still be playing More...
|
|
override void | InitializeAnimatorParameters () |
| Adds required animator parameters to the animator parameters list if they exist More...
|
|
virtual void | Awake () |
| On awake we proceed to pre initializing our ability More...
|
|
virtual void | Start () |
| On Start(), we call the ability's intialization More...
|
|
virtual void | PreInitialization () |
| A method you can override to have an initialization before the actual initialization More...
|
|
virtual void | BindAnimator () |
| Binds the animator from the character and initializes the animator parameters More...
|
|
virtual void | InternalHandleInput () |
| Internal method to check if an input manager is present or not More...
|
|
virtual void | RegisterAnimatorParameter (string parameterName, AnimatorControllerParameterType parameterType, out int parameter) |
| Registers a new animator parameter to the list More...
|
|
virtual void | OnHit () |
| Override this to describe what should happen to this ability when the character takes a hit More...
|
|
virtual void | OnEnable () |
| On enable, we bind our respawn delegate More...
|
|
Add this ability to a Character to have it handle ground movement (walk, and potentially run, crawl, etc) in x and z direction for 3D, x and y for 2D Animator parameters : Speed (float), Walking (bool)
◆ Movements
the possible rotation modes for the character
Enumerator |
---|
Free | |
Strict2DirectionsHorizontal | |
Strict2DirectionsVertical | |
Strict4Directions | |
Strict8Directions | |
◆ ApplyMovementMultiplier()
virtual void MoreMountains.TopDownEngine.CharacterMovement.ApplyMovementMultiplier |
( |
float |
movementMultiplier, |
|
|
float |
duration |
|
) |
| |
|
virtual |
Applies a movement multiplier for the specified duration
- Parameters
-
movementMultiplier | |
duration | |
◆ ApplyMovementMultiplierCo()
virtual IEnumerator MoreMountains.TopDownEngine.CharacterMovement.ApplyMovementMultiplierCo |
( |
float |
movementMultiplier, |
|
|
float |
duration |
|
) |
| |
|
protectedvirtual |
A coroutine used to apply a movement multiplier for a certain duration only
- Parameters
-
movementMultiplier | |
duration | |
- Returns
◆ CheckJustGotGrounded()
virtual void MoreMountains.TopDownEngine.CharacterMovement.CheckJustGotGrounded |
( |
| ) |
|
|
protectedvirtual |
Every frame, checks if we just hit the ground, and if yes, changes the state and triggers a particle effect
◆ DisableWalkParticles()
virtual void MoreMountains.TopDownEngine.CharacterMovement.DisableWalkParticles |
( |
| ) |
|
|
protectedvirtual |
Disables all walk particle systems that may be playing
◆ Feedbacks()
virtual void MoreMountains.TopDownEngine.CharacterMovement.Feedbacks |
( |
| ) |
|
|
protectedvirtual |
Plays particles when walking, and particles and sounds when landing
◆ HandleDirection()
virtual void MoreMountains.TopDownEngine.CharacterMovement.HandleDirection |
( |
| ) |
|
|
protectedvirtual |
Modifies player input to account for the selected movement mode
◆ HandleFrozen()
virtual void MoreMountains.TopDownEngine.CharacterMovement.HandleFrozen |
( |
| ) |
|
|
protectedvirtual |
Describes what happens when the character is in the frozen state
◆ HandleInput()
override void MoreMountains.TopDownEngine.CharacterMovement.HandleInput |
( |
| ) |
|
|
protectedvirtual |
◆ HandleMovement()
virtual void MoreMountains.TopDownEngine.CharacterMovement.HandleMovement |
( |
| ) |
|
|
protectedvirtual |
Called at Update(), handles horizontal movement
◆ Initialization()
override void MoreMountains.TopDownEngine.CharacterMovement.Initialization |
( |
| ) |
|
|
protectedvirtual |
◆ InitializeAnimatorParameters()
override void MoreMountains.TopDownEngine.CharacterMovement.InitializeAnimatorParameters |
( |
| ) |
|
|
protectedvirtual |
◆ OnDeath()
override void MoreMountains.TopDownEngine.CharacterMovement.OnDeath |
( |
| ) |
|
|
protectedvirtual |
◆ OnDisable()
override void MoreMountains.TopDownEngine.CharacterMovement.OnDisable |
( |
| ) |
|
|
protectedvirtual |
◆ OnRespawn()
override void MoreMountains.TopDownEngine.CharacterMovement.OnRespawn |
( |
| ) |
|
|
protectedvirtual |
◆ ProcessAbility()
override void MoreMountains.TopDownEngine.CharacterMovement.ProcessAbility |
( |
| ) |
|
|
virtual |
◆ ResetAbility()
override void MoreMountains.TopDownEngine.CharacterMovement.ResetAbility |
( |
| ) |
|
|
virtual |
◆ ResetContextSpeedMultiplier()
virtual void MoreMountains.TopDownEngine.CharacterMovement.ResetContextSpeedMultiplier |
( |
| ) |
|
|
virtual |
Revers the context speed multiplier to its previous value
◆ ResetSpeed()
virtual void MoreMountains.TopDownEngine.CharacterMovement.ResetSpeed |
( |
| ) |
|
|
virtual |
Resets this character's speed
◆ SetContextSpeedMultiplier()
virtual void MoreMountains.TopDownEngine.CharacterMovement.SetContextSpeedMultiplier |
( |
float |
newMovementSpeedMultiplier | ) |
|
|
virtual |
Stacks a new context speed multiplier
- Parameters
-
newMovementSpeedMultiplier | |
◆ SetHorizontalMovement()
virtual void MoreMountains.TopDownEngine.CharacterMovement.SetHorizontalMovement |
( |
float |
value | ) |
|
|
virtual |
Sets the horizontal part of the movement
- Parameters
-
◆ SetMovement() [1/2]
virtual void MoreMountains.TopDownEngine.CharacterMovement.SetMovement |
( |
| ) |
|
|
protectedvirtual |
◆ SetMovement() [2/2]
virtual void MoreMountains.TopDownEngine.CharacterMovement.SetMovement |
( |
Vector2 |
value | ) |
|
|
virtual |
Sets the horizontal move value.
- Parameters
-
value | Horizontal move value, between -1 and 1 - positive : will move to the right, negative : will move left |
◆ SetVerticalMovement()
virtual void MoreMountains.TopDownEngine.CharacterMovement.SetVerticalMovement |
( |
float |
value | ) |
|
|
virtual |
Sets the vertical part of the movement
- Parameters
-
◆ UpdateAnimator()
override void MoreMountains.TopDownEngine.CharacterMovement.UpdateAnimator |
( |
| ) |
|
|
virtual |
◆ _acceleration
float MoreMountains.TopDownEngine.CharacterMovement._acceleration = 0f |
|
protected |
◆ _currentInput
Vector2 MoreMountains.TopDownEngine.CharacterMovement._currentInput = Vector2.zero |
|
protected |
◆ _horizontalMovement
float MoreMountains.TopDownEngine.CharacterMovement._horizontalMovement |
|
protected |
◆ _idleAnimationParameter
int MoreMountains.TopDownEngine.CharacterMovement._idleAnimationParameter |
|
protected |
◆ _idleAnimationParameterName
const string MoreMountains.TopDownEngine.CharacterMovement._idleAnimationParameterName = "Idle" |
|
staticprotected |
◆ _lerpedInput
Vector2 MoreMountains.TopDownEngine.CharacterMovement._lerpedInput = Vector2.zero |
|
protected |
◆ _movementSpeed
float MoreMountains.TopDownEngine.CharacterMovement._movementSpeed |
|
protected |
◆ _movementVector
Vector3 MoreMountains.TopDownEngine.CharacterMovement._movementVector |
|
protected |
◆ _normalizedInput
Vector2 MoreMountains.TopDownEngine.CharacterMovement._normalizedInput |
|
protected |
◆ _speedAnimationParameter
int MoreMountains.TopDownEngine.CharacterMovement._speedAnimationParameter |
|
protected |
◆ _speedAnimationParameterName
const string MoreMountains.TopDownEngine.CharacterMovement._speedAnimationParameterName = "Speed" |
|
staticprotected |
◆ _verticalMovement
float MoreMountains.TopDownEngine.CharacterMovement._verticalMovement |
|
protected |
◆ _walkingAnimationParameter
int MoreMountains.TopDownEngine.CharacterMovement._walkingAnimationParameter |
|
protected |
◆ _walkingAnimationParameterName
const string MoreMountains.TopDownEngine.CharacterMovement._walkingAnimationParameterName = "Walking" |
|
staticprotected |
◆ _walkParticlesPlaying
bool MoreMountains.TopDownEngine.CharacterMovement._walkParticlesPlaying = false |
|
protected |
◆ Acceleration
float MoreMountains.TopDownEngine.CharacterMovement.Acceleration = 10f |
the acceleration to apply to the current speed / 0f : no acceleration, instant full speed
◆ AnalogInput
bool MoreMountains.TopDownEngine.CharacterMovement.AnalogInput = false |
whether or not input should be analog
◆ ContextSpeedMultiplier
virtual float MoreMountains.TopDownEngine.CharacterMovement.ContextSpeedMultiplier => ContextSpeedStack.Count > 0 ? ContextSpeedStack.Peek() : 1 |
◆ ContextSpeedStack
Stack<float> MoreMountains.TopDownEngine.CharacterMovement.ContextSpeedStack = new Stack<float>() |
the multiplier to apply to the horizontal movement, applied by contextual elements (movement zones, etc)
◆ Deceleration
float MoreMountains.TopDownEngine.CharacterMovement.Deceleration = 10f |
the deceleration to apply to the current speed / 0f : no deceleration, instant stop
◆ IdleThreshold
float MoreMountains.TopDownEngine.CharacterMovement.IdleThreshold = 0.05f |
the speed threshold after which the character is not considered idle anymore
◆ InputAuthorized
bool MoreMountains.TopDownEngine.CharacterMovement.InputAuthorized = true |
whether or not movement input is authorized at that time
◆ InterpolateMovementSpeed
bool MoreMountains.TopDownEngine.CharacterMovement.InterpolateMovementSpeed = false |
whether or not to interpolate movement speed
◆ Movement
whether the character can move freely, in 2D only, in 4 or 8 cardinal directions
◆ ScriptDrivenInput
bool MoreMountains.TopDownEngine.CharacterMovement.ScriptDrivenInput = false |
whether or not input should be set from another script
◆ ShouldSetMovement
bool MoreMountains.TopDownEngine.CharacterMovement.ShouldSetMovement = true |
whether or not this component should set the controller's movement
◆ TouchTheGroundParticles
ParticleSystem [] MoreMountains.TopDownEngine.CharacterMovement.TouchTheGroundParticles |
the particles to trigger when touching the ground
◆ TouchTheGroundSfx
AudioClip [] MoreMountains.TopDownEngine.CharacterMovement.TouchTheGroundSfx |
the sfx to trigger when touching the ground
◆ WalkParticles
ParticleSystem [] MoreMountains.TopDownEngine.CharacterMovement.WalkParticles |
the particles to trigger while walking
◆ WalkSpeed
float MoreMountains.TopDownEngine.CharacterMovement.WalkSpeed = 6f |
the speed of the character when it's walking
◆ MovementForbidden
virtual bool MoreMountains.TopDownEngine.CharacterMovement.MovementForbidden |
|
getset |
if this is true, movement will be forbidden (as well as flip)
◆ MovementSpeed
virtual float MoreMountains.TopDownEngine.CharacterMovement.MovementSpeed |
|
getset |
the current reference movement speed
◆ MovementSpeedMaxMultiplier
virtual float MoreMountains.TopDownEngine.CharacterMovement.MovementSpeedMaxMultiplier = float.MaxValue |
|
getset |
◆ MovementSpeedMultiplier
float MoreMountains.TopDownEngine.CharacterMovement.MovementSpeedMultiplier |
|
getset |
the multiplier to apply to the horizontal movement
The documentation for this class was generated from the following file:
- F:/Github/Store/TopDownEngine/Assets/TopDownEngine/Common/Scripts/Characters/CharacterAbilities/CharacterMovement.cs