added the game

This commit is contained in:
JHDev2006
2025-09-13 16:30:32 +01:00
parent 5ef689109b
commit 3773bdaf64
3616 changed files with 263702 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
class_name StateMachine
extends Node
@export var state: State = null
func transition_to(state_name := "", state_msg := {}) -> void:
state.exit()
state.state_exited.emit()
state = get_node(state_name)
state.enter(state_msg)
state.state_entered.emit()
func _physics_process(delta: float) -> void:
state.physics_update(delta)
func _process(delta: float) -> void:
state.update(delta)