![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | smooth_stacks |
extends Control
onready var Debug = $Debug
onready var player = get_parent().get_node("PlayerCharacter")
onready var player_state = player.STATE
onready var player_physics = player.PHYSICS
func _process(delta):
Debug.text = "FPS: " + str( Engine.get_frames_per_second() ) + "\n"
for n in player_state:
Debug.text += str( n ) + ": " + str( player_state[n] ) + "\n"
Debug.text += "\nVelocity: " + str( player_physics.VELOCITY )
This only works if this GUI control is loaded after the playercharacter node from my understanding. Is there a way to have a conditional statement that I can implement in process() to check if the player node in the tree is loaded before calling process code?