Reworked idle, lookaround and death to the states

This commit is contained in:
2026-02-01 23:51:37 +03:00
parent 37b5b698a6
commit 81d81ae103
16 changed files with 153 additions and 19 deletions
@@ -0,0 +1,18 @@
class_name PlayerStateMachine
extends StateMachine
@export var player: Player
@export var dead_state: PlayerState
func _ready() -> void:
if not player.is_node_ready():
await player.ready
super._ready()
func kill_player() -> void:
_change_state(dead_state)