Debug.tscn 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. [gd_scene load_steps=3 format=2]
  2. [ext_resource path="res://font/8bit.tres" type="DynamicFont" id=6]
  3. [sub_resource type="GDScript" id=1]
  4. script/source = "extends Label
  5. func _input(event):
  6. if Input.is_action_just_pressed(\"f3\"):
  7. visible = !visible
  8. Engine.set_target_fps(0 if visible else 60)
  9. func _physics_process(delta):
  10. text = \"fps: \" + str(Engine.get_frames_per_second())
  11. text += \"\\n\"
  12. text += 'mem: ' + String.humanize_size(OS.get_static_memory_usage())
  13. text += \"\\n\"
  14. text += 'vram: ' + String.humanize_size(Performance.get_monitor(20))
  15. text += \"\\n\"
  16. # if has_node(singleton.player_path):
  17. # text += 'x: ' + str(int(get_node(singleton.player_path).global_position.x))
  18. # text += \"\\n\"
  19. # text += 'y: ' + str(int(get_node(singleton.player_path).global_position.y))
  20. "
  21. [node name="Debug" type="CanvasLayer"]
  22. pause_mode = 2
  23. layer = 127
  24. [node name="fpscount" type="Label" parent="."]
  25. pause_mode = 2
  26. anchor_left = -0.00539021
  27. anchor_top = 0.260297
  28. anchor_right = -0.00539021
  29. anchor_bottom = 0.260297
  30. margin_left = 11.9259
  31. margin_top = 188.737
  32. margin_right = 189.926
  33. margin_bottom = 309.737
  34. custom_fonts/font = ExtResource( 6 )
  35. text = "fps: 60"
  36. script = SubResource( 1 )
  37. __meta__ = {
  38. "_edit_use_anchors_": true
  39. }