From 719450312414d59a24a35fed4c73258212bb3b5e Mon Sep 17 00:00:00 2001 From: yuki Date: Sat, 22 Nov 2025 10:47:06 -0300 Subject: [PATCH] attempt static dict in state machine --- classes/state/state.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/state/state.gd b/classes/state/state.gd index 7f77f43..4d35ff1 100644 --- a/classes/state/state.gd +++ b/classes/state/state.gd @@ -26,7 +26,7 @@ var is_active: bool = false: ## Called by the state machine upon changing the active state. The `data` parameter ## is a dictionary with arbitrary data the state can use to initialize itself. -@abstract func _enter(previous_state_path: String, data: Dictionary = {}) -> void +@abstract func _enter(previous_state_path: String, data: Dictionary[StringName, Variant] = {}) -> void ## Called by the state machine before changing the active state. Use this function ## to clean up the state. @@ -48,7 +48,7 @@ func state_physics_update(delta: float) -> void: _state_physics_update(delta) -func enter(previous_state_path: String, data: Dictionary = {}) -> void: +func enter(previous_state_path: String, data: Dictionary[StringName, Variant] = {}) -> void: is_active = true _enter(previous_state_path, data)