HUD.tscn 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. [gd_scene load_steps=5 format=3 uid="uid://b0ljm4vbkww0f"]
  2. [ext_resource type="Script" path="res://HUD.cs" id="1"]
  3. [ext_resource type="FontFile" uid="uid://cu4g4pt1v4fyv" path="res://fonts/Xolonium-Regular.ttf" id="2"]
  4. [sub_resource type="InputEventAction" id="InputEventAction_vmrao"]
  5. action = &"start_game"
  6. [sub_resource type="Shortcut" id="Shortcut_b2h4v"]
  7. events = [SubResource("InputEventAction_vmrao")]
  8. [node name="HUD" type="CanvasLayer"]
  9. script = ExtResource("1")
  10. [node name="ScoreLabel" type="Label" parent="."]
  11. anchors_preset = 5
  12. anchor_left = 0.5
  13. anchor_right = 0.5
  14. offset_left = -25.0
  15. offset_right = 25.0
  16. offset_bottom = 100.0
  17. grow_horizontal = 2
  18. theme_override_fonts/font = ExtResource("2")
  19. theme_override_font_sizes/font_size = 64
  20. text = "0"
  21. horizontal_alignment = 1
  22. [node name="MessageLabel" type="Label" parent="."]
  23. anchors_preset = 8
  24. anchor_left = 0.5
  25. anchor_top = 0.5
  26. anchor_right = 0.5
  27. anchor_bottom = 0.5
  28. offset_left = -240.0
  29. offset_top = -79.5
  30. offset_right = 240.0
  31. offset_bottom = 79.5
  32. grow_horizontal = 2
  33. grow_vertical = 2
  34. theme_override_fonts/font = ExtResource("2")
  35. theme_override_font_sizes/font_size = 64
  36. text = "Dodge the
  37. Creeps"
  38. horizontal_alignment = 1
  39. autowrap_mode = 2
  40. [node name="StartButton" type="Button" parent="."]
  41. anchors_preset = 7
  42. anchor_left = 0.5
  43. anchor_top = 1.0
  44. anchor_right = 0.5
  45. anchor_bottom = 1.0
  46. offset_left = -100.0
  47. offset_top = -140.0
  48. offset_right = 100.0
  49. offset_bottom = -40.0
  50. theme_override_fonts/font = ExtResource("2")
  51. theme_override_font_sizes/font_size = 65
  52. shortcut = SubResource("Shortcut_b2h4v")
  53. text = "Start"
  54. [node name="MessageTimer" type="Timer" parent="."]
  55. wait_time = 2.0
  56. one_shot = true
  57. [connection signal="pressed" from="StartButton" to="." method="OnStartButtonPressed"]
  58. [connection signal="timeout" from="MessageTimer" to="." method="OnMessageTimerTimeout"]