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

@ -7,8 +7,21 @@ class_name State
signal transition(to: StringName)
@abstract func enter() -> void
@abstract func exit() -> void
@abstract func _enter() -> void
@abstract func _exit() -> void
@rpc("authority","call_remote","reliable")
func enter():
_enter()
if is_multiplayer_authority():
enter.rpc()
@rpc("authority","call_remote","reliable")
func exit():
_exit()
if is_multiplayer_authority():
exit.rpc()
func update(delta: float) -> void:
pass
func physics_update(delta: float) -> void: