beta-1.1
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
extends BaseState
|
||||
|
||||
@export var walking_speed := 100
|
||||
signal StartedWalking
|
||||
|
||||
@export var walking_speed := 100
|
||||
@export var movement_component: MovementComponent
|
||||
@export var direction_component: FacingDirectionComponent
|
||||
@export var body: CharacterBody2D
|
||||
@@ -10,6 +11,10 @@ func GetStateEnum() -> PlayerStateMachine.States:
|
||||
return PlayerStateMachine.States.WALKING
|
||||
|
||||
|
||||
func Enter(_extra_parameters: Dictionary) -> void:
|
||||
StartedWalking.emit()
|
||||
|
||||
|
||||
func Update(_delta: float) -> void:
|
||||
if movement_component.movement_vector == Vector2.ZERO:
|
||||
state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)
|
||||
|
||||
Reference in New Issue
Block a user