cleaner state machine debug print
This commit is contained in:
parent
7194503124
commit
254f1af0b7
1 changed files with 3 additions and 3 deletions
|
|
@ -41,9 +41,9 @@ func _get_initial_state() -> State:
|
||||||
|
|
||||||
## Transitions the active state out after receiving a finished signal.
|
## Transitions the active state out after receiving a finished signal.
|
||||||
func _transition_to_next_state(target_state_path: String, data: Dictionary[StringName, Variant] = {}) -> void:
|
func _transition_to_next_state(target_state_path: String, data: Dictionary[StringName, Variant] = {}) -> void:
|
||||||
print("+++ TRANSITION CALLED: ", target_state_path)
|
print(owner.name+"+++ TRANSITION CALLED: ", target_state_path)
|
||||||
print("+++ has node? ", has_node(target_state_path))
|
print(owner.name+"+++ has node? ", has_node(target_state_path))
|
||||||
print("+++ all children: ", get_children().map(func(c: Node) -> StringName: return c.name))
|
print(owner.name+"+++ all children: ", get_children().map(func(c: Node) -> StringName: return c.name))
|
||||||
|
|
||||||
assert(has_node(target_state_path), owner.name + ": Trying to transition to state " + target_state_path + " but it does not exist.")
|
assert(has_node(target_state_path), owner.name + ": Trying to transition to state " + target_state_path + " but it does not exist.")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue