HUD.tscn 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. [gd_scene load_steps=4 format=3 uid="uid://ccqoreueuxdb7"]
  2. [ext_resource type="Script" path="res://HUD.gd" id="1"]
  3. [sub_resource type="InputEventAction" id="InputEventAction_fopy7"]
  4. action = &"start_game"
  5. [sub_resource type="Shortcut" id="4"]
  6. events = [SubResource("InputEventAction_fopy7")]
  7. [node name="HUD" type="CanvasLayer"]
  8. script = ExtResource("1")
  9. [node name="ScoreLabel" type="Label" parent="."]
  10. anchors_preset = 10
  11. anchor_right = 1.0
  12. offset_bottom = 78.0
  13. grow_horizontal = 2
  14. theme_override_font_sizes/font_size = 60
  15. text = "0"
  16. horizontal_alignment = 1
  17. [node name="MessageLabel" type="Label" parent="."]
  18. anchors_preset = 14
  19. anchor_top = 0.5
  20. anchor_right = 1.0
  21. anchor_bottom = 0.5
  22. offset_top = -79.5
  23. offset_bottom = 79.5
  24. grow_horizontal = 2
  25. grow_vertical = 2
  26. theme_override_font_sizes/font_size = 60
  27. text = "Dodge the
  28. Creeps"
  29. horizontal_alignment = 1
  30. [node name="StartButton" type="Button" parent="."]
  31. anchors_preset = 7
  32. anchor_left = 0.5
  33. anchor_top = 1.0
  34. anchor_right = 0.5
  35. anchor_bottom = 1.0
  36. offset_left = -90.0
  37. offset_top = -200.0
  38. offset_right = 90.0
  39. offset_bottom = -100.0
  40. grow_horizontal = 2
  41. grow_vertical = 0
  42. theme_override_font_sizes/font_size = 60
  43. shortcut = SubResource("4")
  44. text = "Start"
  45. [node name="MessageTimer" type="Timer" parent="."]
  46. one_shot = true
  47. [connection signal="pressed" from="StartButton" to="." method="_on_StartButton_pressed"]
  48. [connection signal="timeout" from="MessageTimer" to="." method="_on_MessageTimer_timeout"]