This commit is contained in:
Andriy Yednarovych
2026-02-22 19:26:26 +01:00
parent fd1ff19c4c
commit e877c5f058
211 changed files with 9385 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
class_name State_Idle extends State
@onready var walk: State = $"../walk"
@onready var attack: State = $"../attack"
func enter() -> void:
player.update_animation("idle")
func exit() -> void:
pass
func process(_delta : float) -> State:
if player.direction != Vector2.ZERO:
return walk
player.velocity = Vector2.ZERO
return null
func physics(_delta : float) -> State:
return null
func handle_input(event : InputEvent) -> State:
if event.is_action_pressed("attack"):
return attack
if event.is_action_pressed("interact"):
PlayerManager.interact_pressed.emit()
return null