hud.tscn 1.7 KB

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