State machine rework
This commit is contained in:
parent
3f99f1b8dd
commit
87919ed890
25 changed files with 102 additions and 76 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue