add default data to enter()

This commit is contained in:
yuki 2025-11-14 15:46:48 -03:00
parent fae50f0a56
commit 594605fe70

View file

@ -17,7 +17,7 @@ signal finished(next_state_path: String, data: Dictionary)
## 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 = {}) -> void
## Called by the state machine before changing the active state. Use this function
## to clean up the state.