pong.tscn 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. [gd_scene load_steps=5 format=2]
  2. [ext_resource path="res://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="separator" type="Sprite" parent="."]
  9. position = Vector2( 320, 200 )
  10. texture = ExtResource( 2 )
  11. [node name="player1" parent="." instance=ExtResource( 3 )]
  12. position = Vector2( 32.49, 188.622 )
  13. [node name="sprite" parent="player1"]
  14. self_modulate = Color( 1, 0, 0.960938, 1 )
  15. [node name="player2" parent="." instance=ExtResource( 3 )]
  16. position = Vector2( 608.88, 188.622 )
  17. [node name="sprite" parent="player2"]
  18. self_modulate = Color( 0, 0.929688, 1, 1 )
  19. [node name="ball" parent="." instance=ExtResource( 4 )]
  20. position = Vector2( 320.387, 189.525 )
  21. [node name="score_left" type="Label" parent="."]
  22. anchor_left = 0.0
  23. anchor_top = 0.0
  24. anchor_right = 0.0
  25. anchor_bottom = 0.0
  26. margin_left = 240.0
  27. margin_top = 10.0
  28. margin_right = 280.0
  29. margin_bottom = 30.0
  30. rect_pivot_offset = Vector2( 0, 0 )
  31. rect_clip_content = false
  32. mouse_filter = 2
  33. size_flags_horizontal = 2
  34. size_flags_vertical = 0
  35. text = "0"
  36. align = 1
  37. percent_visible = 1.0
  38. lines_skipped = 0
  39. max_lines_visible = -1
  40. [node name="score_right" type="Label" parent="."]
  41. anchor_left = 0.0
  42. anchor_top = 0.0
  43. anchor_right = 0.0
  44. anchor_bottom = 0.0
  45. margin_left = 360.0
  46. margin_top = 10.0
  47. margin_right = 400.0
  48. margin_bottom = 30.0
  49. rect_pivot_offset = Vector2( 0, 0 )
  50. rect_clip_content = false
  51. mouse_filter = 2
  52. size_flags_horizontal = 2
  53. size_flags_vertical = 0
  54. text = "0"
  55. align = 1
  56. percent_visible = 1.0
  57. lines_skipped = 0
  58. max_lines_visible = -1
  59. [node name="winner_left" type="Label" parent="."]
  60. visible = false
  61. anchor_left = 0.0
  62. anchor_top = 0.0
  63. anchor_right = 0.0
  64. anchor_bottom = 0.0
  65. margin_left = 190.0
  66. margin_top = 170.0
  67. margin_right = 267.0
  68. margin_bottom = 184.0
  69. rect_pivot_offset = Vector2( 0, 0 )
  70. rect_clip_content = false
  71. mouse_filter = 2
  72. size_flags_horizontal = 2
  73. size_flags_vertical = 0
  74. text = "The Winner!"
  75. percent_visible = 1.0
  76. lines_skipped = 0
  77. max_lines_visible = -1
  78. [node name="winner_right" type="Label" parent="."]
  79. visible = false
  80. anchor_left = 0.0
  81. anchor_top = 0.0
  82. anchor_right = 0.0
  83. anchor_bottom = 0.0
  84. margin_left = 380.0
  85. margin_top = 170.0
  86. margin_right = 457.0
  87. margin_bottom = 184.0
  88. rect_pivot_offset = Vector2( 0, 0 )
  89. rect_clip_content = false
  90. mouse_filter = 2
  91. size_flags_horizontal = 2
  92. size_flags_vertical = 0
  93. text = "The Winner!"
  94. percent_visible = 1.0
  95. lines_skipped = 0
  96. max_lines_visible = -1
  97. [node name="exit_game" type="Button" parent="."]
  98. visible = false
  99. anchor_left = 0.0
  100. anchor_top = 0.0
  101. anchor_right = 0.0
  102. anchor_bottom = 0.0
  103. margin_left = 280.0
  104. margin_top = 340.0
  105. margin_right = 360.0
  106. margin_bottom = 360.0
  107. rect_pivot_offset = Vector2( 0, 0 )
  108. rect_clip_content = false
  109. mouse_filter = 0
  110. size_flags_horizontal = 2
  111. size_flags_vertical = 2
  112. toggle_mode = false
  113. enabled_focus_mode = 2
  114. shortcut = null
  115. group = null
  116. text = "Exit Game"
  117. flat = false
  118. [connection signal="pressed" from="exit_game" to="." method="_on_exit_game_pressed"]
  119. [editable path="player1"]
  120. [editable path="player2"]