pong.tscn 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. [gd_scene load_steps=5 format=3 uid="uid://bafoh1ief0147"]
  2. [ext_resource type="Script" path="res://logic/pong.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://b10swafhe08oj" path="res://separator.png" id="2"]
  4. [ext_resource type="PackedScene" uid="uid://cpw46256eirwq" path="res://paddle.tscn" id="3"]
  5. [ext_resource type="PackedScene" uid="uid://bjmldn1x3lpa" path="res://ball.tscn" id="4"]
  6. [node name="Pong" type="Node2D"]
  7. script = ExtResource("1")
  8. [node name="ColorRect" type="ColorRect" parent="."]
  9. offset_right = 640.0
  10. offset_bottom = 400.0
  11. grow_horizontal = 2
  12. grow_vertical = 2
  13. color = Color(0.141176, 0.152941, 0.164706, 1)
  14. [node name="Separator" type="Sprite2D" parent="."]
  15. position = Vector2(320, 200)
  16. texture = ExtResource("2")
  17. [node name="Player1" parent="." instance=ExtResource("3")]
  18. modulate = Color(0, 1, 1, 1)
  19. position = Vector2(32.49, 188.622)
  20. left = true
  21. [node name="Player2" parent="." instance=ExtResource("3")]
  22. modulate = Color(1, 0, 1, 1)
  23. position = Vector2(608.88, 188.622)
  24. [node name="Ball" parent="." instance=ExtResource("4")]
  25. position = Vector2(320.387, 189.525)
  26. [node name="ScoreLeft" type="Label" parent="."]
  27. offset_left = 240.0
  28. offset_top = 10.0
  29. offset_right = 280.0
  30. offset_bottom = 30.0
  31. size_flags_horizontal = 2
  32. size_flags_vertical = 0
  33. text = "0"
  34. [node name="ScoreRight" type="Label" parent="."]
  35. offset_left = 360.0
  36. offset_top = 10.0
  37. offset_right = 400.0
  38. offset_bottom = 30.0
  39. size_flags_horizontal = 2
  40. size_flags_vertical = 0
  41. text = "0"
  42. [node name="WinnerLeft" type="Label" parent="."]
  43. visible = false
  44. offset_left = 190.0
  45. offset_top = 170.0
  46. offset_right = 267.0
  47. offset_bottom = 184.0
  48. size_flags_horizontal = 2
  49. size_flags_vertical = 0
  50. text = "The Winner!"
  51. [node name="WinnerRight" type="Label" parent="."]
  52. visible = false
  53. offset_left = 380.0
  54. offset_top = 170.0
  55. offset_right = 457.0
  56. offset_bottom = 184.0
  57. size_flags_horizontal = 2
  58. size_flags_vertical = 0
  59. text = "The Winner!"
  60. [node name="ExitGame" type="Button" parent="."]
  61. visible = false
  62. offset_left = 280.0
  63. offset_top = 340.0
  64. offset_right = 360.0
  65. offset_bottom = 360.0
  66. size_flags_horizontal = 2
  67. size_flags_vertical = 2
  68. text = "Exit Game"
  69. [node name="Camera2D" type="Camera2D" parent="."]
  70. offset = Vector2(320, 200)
  71. current = true
  72. [connection signal="pressed" from="ExitGame" to="." method="_on_exit_game_pressed"]
  73. [editable path="Player1"]
  74. [editable path="Player2"]