pong.tscn 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. [gd_scene load_steps=5 format=2]
  2. [ext_resource path="res://logic/pong.gd" type="Script" id=1]
  3. [ext_resource path="res://separator.png" type="Texture" 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. margin_right = 640.0
  10. margin_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="Sprite" 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.387, 189.525 )
  27. [node name="ScoreLeft" type="Label" parent="."]
  28. margin_left = 240.0
  29. margin_top = 10.0
  30. margin_right = 280.0
  31. margin_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. margin_left = 360.0
  38. margin_top = 10.0
  39. margin_right = 400.0
  40. margin_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. margin_left = 190.0
  48. margin_top = 170.0
  49. margin_right = 267.0
  50. margin_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. margin_left = 380.0
  57. margin_top = 170.0
  58. margin_right = 457.0
  59. margin_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. margin_left = 280.0
  66. margin_top = 340.0
  67. margin_right = 360.0
  68. margin_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="_on_exit_game_pressed"]
  76. [editable path="Player1"]
  77. [editable path="Player2"]