debug.gd 576 B

1234567891011121314151617
  1. extends Label
  2. #func _input(event):
  3. # if Input.is_action_just_pressed("f3"): visible = !visible
  4. func _physics_process(delta):
  5. text = "fps: " + str(Engine.get_frames_per_second())
  6. text += "\n"
  7. text += 'mem: ' + String.humanize_size(OS.get_static_memory_usage())
  8. text += "\n"
  9. text += 'vram: ' + String.humanize_size(Performance.get_monitor(20))
  10. text += "\n"
  11. # if has_node(singleton.player_path):
  12. # text += 'x: ' + str(int(get_node(singleton.player_path).global_position.x))
  13. # text += "\n"
  14. # text += 'y: ' + str(int(get_node(singleton.player_path).global_position.y))