Adding initial game files.
This commit is contained in:
parent
8a5d7f634c
commit
c5615cbdd8
12 changed files with 229 additions and 0 deletions
82
game.tscn
Normal file
82
game.tscn
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://ct7v3x7imstlk"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dd0cxfceqwxca" path="res://prefabs/paddle.tscn" id="1_80nbo"]
|
||||
[ext_resource type="Script" uid="uid://wrequpaalk7f" path="res://ball.gd" id="2_e2o6t"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mwb40"]
|
||||
size = Vector2(1200, 20)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_feb5d"]
|
||||
|
||||
[node name="Root" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = 2.0
|
||||
offset_bottom = 2.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.184063, 0.191379, 0.203873, 1)
|
||||
|
||||
[node name="MiddleLine" type="ColorRect" parent="."]
|
||||
custom_minimum_size = Vector2(4, 0)
|
||||
layout_mode = 1
|
||||
anchors_preset = 13
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.938114, 0.940897, 0.945648, 1)
|
||||
|
||||
[node name="TopWall" type="StaticBody2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="TopWall"]
|
||||
position = Vector2(571, 0)
|
||||
shape = SubResource("RectangleShape2D_mwb40")
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="TopWall"]
|
||||
polygon = PackedVector2Array(-30, -10, -30, 10, 1172, 10, 1172, -10)
|
||||
|
||||
[node name="BottomWall" type="StaticBody2D" parent="."]
|
||||
position = Vector2(0, 649)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="BottomWall"]
|
||||
position = Vector2(571, 0)
|
||||
shape = SubResource("RectangleShape2D_mwb40")
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="BottomWall"]
|
||||
polygon = PackedVector2Array(-30, -10, -30, 10, 1172, 10, 1172, -10)
|
||||
|
||||
[node name="Paddle-0" parent="." instance=ExtResource("1_80nbo")]
|
||||
position = Vector2(40, 273)
|
||||
|
||||
[node name="Paddle-1" parent="." instance=ExtResource("1_80nbo")]
|
||||
position = Vector2(1078, 273)
|
||||
player_id = 1
|
||||
|
||||
[node name="Ball" type="CharacterBody2D" parent="."]
|
||||
position = Vector2(134, 72)
|
||||
motion_mode = 1
|
||||
script = ExtResource("2_e2o6t")
|
||||
|
||||
[node name="Polygon2D" type="Polygon2D" parent="Ball"]
|
||||
polygon = PackedVector2Array(100, 75, 120, 75, 120, 95, 100, 95)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ball"]
|
||||
position = Vector2(110, 85)
|
||||
shape = SubResource("RectangleShape2D_feb5d")
|
||||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="Ball"]
|
||||
position = Vector2(110, 85)
|
||||
|
||||
[connection signal="screen_exited" from="Ball/VisibleOnScreenNotifier2D" to="Ball" method="_on_screen_exited"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue