bazar_alea/client/scenes/DebugWindow.gd
2023-11-19 20:41:38 +01:00

39 lines
1.3 KiB
GDScript

extends Window
@export var node_players : Node = null:
set(value):
node_players = value
@export var node_me : Node = null:
set(value):
node_me = value
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
if node_players:
$TabContainer/Perso/VBoxContainer/HBoxContainer/Count.set_text(str(node_players.get_child_count()))
$TabContainer/Perso/VBoxContainer/HBoxContainer2/Id.set_text(str(Multi.get_id()))
if node_players.get_child_count() > 0:
$TabContainer/Network/VBoxContainer/players/player0.set_text(str(node_players.get_child(0).get_global_position()))
print(str(node_players.get_child(0).get_global_position()))
if node_me:
$TabContainer/Network/VBoxContainer/me/me.set_text(str(node_me.get_child(0).get_global_position()))
var tmp:String = ""
tmp += "Anim: " + str(node_me.get_child(0).get_animation())
tmp += "\nGait: " + node_me.get_child(0).get_gait()
tmp += "\nStance: " + node_me.get_child(0).get_stance()
tmp += "\nRotation: " + node_me.get_child(0).get_rotation_mode()
tmp += "\nMovement: " + node_me.get_child(0).get_movement_state()
$TabContainer/Network/VBoxContainer/state/state.set_text(tmp)
func _on_close_requested():
hide()