mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2025-12-16 05:20:06 +01:00
17 lines
383 B
GDScript
17 lines
383 B
GDScript
extends Panel
|
|
|
|
@onready var fsm_node: Node = get_node(^"../../Player/StateMachine")
|
|
|
|
func _process(_delta: float) -> void:
|
|
var states_names: String = ""
|
|
var numbers: String = ""
|
|
var index := 0
|
|
|
|
for state: Node in fsm_node.states_stack:
|
|
states_names += String(state.name) + "\n"
|
|
numbers += str(index) + "\n"
|
|
index += 1
|
|
|
|
%States.text = states_names
|
|
%Numbers.text = numbers
|