pong.tscn 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. [gd_scene load_steps=5 format=2]
  2. [ext_resource path="res://logic/Pong.cs" type="Script" id=1]
  3. [ext_resource path="res://separator.png" type="Texture2D" id=2]
  4. [ext_resource path="res://paddle.tscn" type="PackedScene" id=3]
  5. [ext_resource path="res://ball.tscn" type="PackedScene" 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. color = Color(0.141176, 0.152941, 0.164706, 1)
  12. __meta__ = {
  13. "_edit_use_anchors_": false
  14. }
  15. [node name="Separator" type="Sprite2D" parent="."]
  16. position = Vector2(320, 200)
  17. texture = ExtResource( 2 )
  18. [node name="Player1" parent="." instance=ExtResource( 3 )]
  19. modulate = Color(0, 1, 1, 1)
  20. position = Vector2(32.49, 188.622)
  21. _left = true
  22. [node name="Player2" parent="." instance=ExtResource( 3 )]
  23. modulate = Color(1, 0, 1, 1)
  24. position = Vector2(608.88, 188.622)
  25. [node name="Ball" parent="." instance=ExtResource( 4 )]
  26. position = Vector2(320.206, 184)
  27. [node name="ScoreLeft" type="Label" parent="."]
  28. offset_left = 240.0
  29. offset_top = 10.0
  30. offset_right = 280.0
  31. offset_bottom = 30.0
  32. size_flags_horizontal = 2
  33. size_flags_vertical = 0
  34. text = "0"
  35. align = 1
  36. [node name="ScoreRight" type="Label" parent="."]
  37. offset_left = 360.0
  38. offset_top = 10.0
  39. offset_right = 400.0
  40. offset_bottom = 30.0
  41. size_flags_horizontal = 2
  42. size_flags_vertical = 0
  43. text = "0"
  44. align = 1
  45. [node name="WinnerLeft" type="Label" parent="."]
  46. visible = false
  47. offset_left = 190.0
  48. offset_top = 170.0
  49. offset_right = 267.0
  50. offset_bottom = 184.0
  51. size_flags_horizontal = 2
  52. size_flags_vertical = 0
  53. text = "The Winner!"
  54. [node name="WinnerRight" type="Label" parent="."]
  55. visible = false
  56. offset_left = 380.0
  57. offset_top = 170.0
  58. offset_right = 457.0
  59. offset_bottom = 184.0
  60. size_flags_horizontal = 2
  61. size_flags_vertical = 0
  62. text = "The Winner!"
  63. [node name="ExitGame" type="Button" parent="."]
  64. visible = false
  65. offset_left = 280.0
  66. offset_top = 340.0
  67. offset_right = 360.0
  68. offset_bottom = 360.0
  69. size_flags_horizontal = 2
  70. size_flags_vertical = 2
  71. text = "Exit Game"
  72. [node name="Camera2D" type="Camera2D" parent="."]
  73. offset = Vector2(320, 200)
  74. current = true
  75. [connection signal="pressed" from="ExitGame" to="." method="OnExitGamePressed"]
  76. [editable path="Player1"]
  77. [editable path="Player2"]