Paddle-Ball/scenes/main.tscn

171 lines
5.4 KiB
Plaintext
Raw Permalink Normal View History

2024-07-17 03:00:08 +00:00
[gd_scene load_steps=17 format=3 uid="uid://bfhusxown7y62"]
[ext_resource type="Texture2D" uid="uid://cxaoi5koptij5" path="res://assets/Bg.png" id="1_ryt67"]
[ext_resource type="FontFile" uid="uid://bk2qwj2aovtrp" path="res://assets/pixel_font.ttf" id="2_aa451"]
[ext_resource type="Script" path="res://scenes/main.gd" id="2_lh4wf"]
[ext_resource type="Script" path="res://scenes/Player.gd" id="3_g8n25"]
[ext_resource type="Script" path="res://scenes/Ball.gd" id="4_6kej0"]
[ext_resource type="Script" path="res://scenes/CPU.gd" id="4_tr43r"]
[ext_resource type="PackedScene" uid="uid://tof3b3hl57pc" path="res://scenes/pauseMenu/pause_menu.tscn" id="7_v2uy6"]
[ext_resource type="AudioStream" uid="uid://b2vdw4b4pqkk7" path="res://assets/audio/score.wav" id="8_pp1l6"]
[ext_resource type="AudioStream" uid="uid://dyqk8c7pv87ec" path="res://assets/audio/scoreCPU.wav" id="9_o8ttd"]
[ext_resource type="AudioStream" uid="uid://dnke8jfo0ptyc" path="res://assets/audio/ballCollisionSound.wav" id="10_soomi"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_c8b7f"]
size = Vector2(20, 120)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_pie6m"]
size = Vector2(10, 10)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_cqt4o"]
size = Vector2(1152, 64)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ns60v"]
size = Vector2(1152, 56)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_kiuk5"]
size = Vector2(64, 648)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_kwmsh"]
size = Vector2(64, 648)
[node name="Main" type="Sprite2D"]
texture_filter = 1
texture = ExtResource("1_ryt67")
centered = false
script = ExtResource("2_lh4wf")
[node name="Player" type="StaticBody2D" parent="."]
position = Vector2(50, 324)
script = ExtResource("3_g8n25")
[node name="ColorRect" type="ColorRect" parent="Player"]
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_top = -60.0
offset_right = 20.0
offset_bottom = 60.0
grow_vertical = 2
color = Color(0.85098, 0.85098, 0.85098, 1)
metadata/_edit_use_anchors_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
position = Vector2(10, 0)
shape = SubResource("RectangleShape2D_c8b7f")
[node name="CPU" type="StaticBody2D" parent="."]
position = Vector2(1082, 324)
script = ExtResource("4_tr43r")
[node name="ColorRect" type="ColorRect" parent="CPU"]
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_top = -60.0
offset_right = 20.0
offset_bottom = 60.0
grow_vertical = 2
color = Color(0.85098, 0.85098, 0.85098, 1)
metadata/_edit_use_anchors_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="CPU"]
position = Vector2(10, 0)
shape = SubResource("RectangleShape2D_c8b7f")
[node name="Ball" type="CharacterBody2D" parent="."]
position = Vector2(576, 324)
collision_mask = 3
script = ExtResource("4_6kej0")
[node name="ColorRect" type="ColorRect" parent="Ball"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -5.0
offset_top = -5.0
offset_right = 5.0
offset_bottom = 5.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.262745, 1, 1, 1)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Ball"]
shape = SubResource("RectangleShape2D_pie6m")
[node name="Borders" type="StaticBody2D" parent="."]
collision_layer = 2
[node name="Top" type="CollisionShape2D" parent="Borders"]
position = Vector2(576, -32)
shape = SubResource("RectangleShape2D_cqt4o")
[node name="Bottom" type="CollisionShape2D" parent="Borders"]
position = Vector2(576, 676)
shape = SubResource("RectangleShape2D_ns60v")
[node name="ScoreLeft" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="ScoreLeft"]
position = Vector2(-32, 324)
shape = SubResource("RectangleShape2D_kiuk5")
[node name="ScoreRight" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="ScoreRight"]
position = Vector2(1184, 324)
shape = SubResource("RectangleShape2D_kwmsh")
[node name="Hud" type="CanvasLayer" parent="."]
[node name="PlayerScore" type="Label" parent="Hud"]
offset_left = 465.0
offset_top = 5.0
offset_right = 515.0
offset_bottom = 55.0
theme_override_fonts/font = ExtResource("2_aa451")
theme_override_font_sizes/font_size = 50
text = "0
"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CPUScore" type="Label" parent="Hud"]
offset_left = 648.0
offset_top = 5.0
offset_right = 698.0
offset_bottom = 55.0
theme_override_fonts/font = ExtResource("2_aa451")
theme_override_font_sizes/font_size = 50
text = "0
"
horizontal_alignment = 1
vertical_alignment = 1
[node name="ballTimer" type="Timer" parent="."]
one_shot = true
autostart = true
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="PauseMenu" parent="CanvasLayer" instance=ExtResource("7_v2uy6")]
[node name="scorePlayer" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("8_pp1l6")
volume_db = -3.0
pitch_scale = 3.39
[node name="scoreCPU" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("9_o8ttd")
volume_db = -3.0
pitch_scale = 2.8
[node name="ballCollisionSound" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("10_soomi")
[connection signal="body_entered" from="ScoreLeft" to="." method="_on_score_left_body_entered"]
[connection signal="body_entered" from="ScoreRight" to="." method="_on_score_right_body_entered"]
[connection signal="timeout" from="ballTimer" to="." method="_on_ball_timer_timeout"]