State machine rework

This commit is contained in:
Rendo 2025-12-09 22:34:17 +05:00
commit 87919ed890
25 changed files with 102 additions and 76 deletions

View file

@ -4,12 +4,11 @@ class_name SubStateMachine
@export var enter_state: State
func enter() -> void:
func _enter() -> void:
change_state(enter_state)
func exit() -> void:
if is_multiplayer_authority():
clear_state.rpc()
func _exit() -> void:
current_state.exit()
func update(delta: float) -> void:
if current_state == null: