HUD.tscn 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. [gd_scene load_steps=6 format=2]
  2. [ext_resource path="res://HUD.cs" type="Script" id=1]
  3. [ext_resource path="res://fonts/Xolonium-Regular.ttf" type="FontData" id=2]
  4. [sub_resource type="Font" id=1]
  5. size = 64
  6. use_mipmaps = true
  7. font_data = ExtResource( 2 )
  8. [sub_resource type="Font" id=2]
  9. size = 64
  10. use_mipmaps = true
  11. font_data = ExtResource( 2 )
  12. [sub_resource type="Font" id=3]
  13. size = 64
  14. use_mipmaps = true
  15. font_data = ExtResource( 2 )
  16. [node name="HUD" type="CanvasLayer"]
  17. script = ExtResource( 1 )
  18. [node name="ScoreLabel" type="Label" parent="."]
  19. anchor_left = 0.5
  20. anchor_right = 0.5
  21. offset_left = -25.0
  22. offset_right = 25.0
  23. offset_bottom = 100.0
  24. custom_fonts/font = SubResource( 1 )
  25. text = "0
  26. "
  27. align = 1
  28. [node name="MessageLabel" type="Label" parent="."]
  29. anchor_left = 0.5
  30. anchor_top = 0.5
  31. anchor_right = 0.5
  32. anchor_bottom = 0.5
  33. offset_left = -200.0
  34. offset_top = -150.0
  35. offset_right = 200.0
  36. custom_fonts/font = SubResource( 2 )
  37. text = "Dodge the
  38. Creeps!"
  39. align = 1
  40. valign = 1
  41. [node name="StartButton" type="Button" parent="."]
  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 = -200.0
  48. offset_right = 100.0
  49. offset_bottom = -100.0
  50. custom_fonts/font = SubResource( 3 )
  51. text = "Start"
  52. [node name="MessageTimer" type="Timer" parent="."]
  53. wait_time = 2.0
  54. one_shot = true
  55. [connection signal="pressed" from="StartButton" to="." method="OnStartButtonPressed"]
  56. [connection signal="timeout" from="MessageTimer" to="." method="OnMessageTimerTimeout"]