attempt static dict in state machine

This commit is contained in:
yuki 2025-11-22 10:47:06 -03:00
parent 5e46d72790
commit 7194503124

View file

@ -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)