attempt static dict in state machine
This commit is contained in:
parent
5e46d72790
commit
7194503124
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue