MovementState ​
Inherits: RefCounted
Inherited by: ClimbingState, DirectionalMovementState, FallingState, IdleState, IdleTurningState, MovingState
The base of the movement states of an entity (idle, moving, falling, climbing ...). It keeps the manager, the entity and the animation player, and plays the animation of the state; the states only decide what to play, the physics is not here.
Variables ​
MovementStateComponent | manager | null |
Entity | entity | null |
EntityAnimationPlayer | animation_player | null |
Methods ​
void | setup_state( movement_manager: MovementStateComponent, state_entity: Entity ) |
void | enter() |
void | exit() |
void | return_all_timer() |
Variable descriptions ​
MovementStateComponent manager = null ​
Reference to managers
Entity entity = null ​
The entity this state moves.
EntityAnimationPlayer animation_player = null ​
Animation-related properties
Method descriptions ​
void setup_state( movement_manager: MovementStateComponent, state_entity: Entity ) ​
Sets the manager reference for the new architecture
void enter() ​
Called when entering the state
void exit() ​
Called when exiting the state
void return_all_timer() ​
Timer clean up class