Made initial GameOver & star background

This commit is contained in:
2024-05-13 17:14:48 -04:00
parent 6c32b12a3c
commit bf76938876
8 changed files with 164 additions and 4 deletions

View File

@ -1,8 +1,18 @@
[gd_scene load_steps=4 format=3 uid="uid://bdarunpk3c2eh"]
[gd_scene load_steps=8 format=3 uid="uid://bdarunpk3c2eh"]
[ext_resource type="Script" path="res://scripts/game.gd" id="1_6727i"]
[ext_resource type="PackedScene" uid="uid://cbo47ftx0vcro" path="res://scenes/ship.tscn" id="1_esyqo"]
[ext_resource type="FontFile" uid="uid://bkcxbtx1vcj8w" path="res://assets/fonts/Color Basic.otf" id="2_gwtm0"]
[ext_resource type="PackedScene" uid="uid://0yktrbyp6cr3" path="res://scenes/game_over_screen.tscn" id="3_yy075"]
[ext_resource type="Texture2D" uid="uid://chuygpyfe3y10" path="res://assets/img/star.png" id="4_jc3cg"]
[sub_resource type="Curve" id="Curve_8qyxb"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.606742, 1), 0.052866, 0.052866, 0, 0, Vector2(1, 0.615385), 0.0, 0.0, 0, 0]
point_count = 3
[sub_resource type="Gradient" id="Gradient_rnjki"]
offsets = PackedFloat32Array(0, 0.406667, 0.84)
colors = PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1)
[node name="Game" type="Node2D"]
script = ExtResource("1_6727i")
@ -25,6 +35,9 @@ theme_override_font_sizes/font_size = 32
text = "LEVEL: 1"
horizontal_alignment = 2
[node name="GameOverScreen" parent="UI" instance=ExtResource("3_yy075")]
visible = false
[node name="Background" type="CanvasLayer" parent="."]
layer = -1
@ -37,6 +50,16 @@ grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 1)
[node name="Stars" type="CPUParticles2D" parent="Background"]
amount = 64
lifetime = 5.0
texture = ExtResource("4_jc3cg")
emission_shape = 3
emission_rect_extents = Vector2(1200, 700)
gravity = Vector2(0, 0)
scale_amount_curve = SubResource("Curve_8qyxb")
color_ramp = SubResource("Gradient_rnjki")
[node name="Ship" parent="." instance=ExtResource("1_esyqo")]
z_index = 1
position = Vector2(622, 309)

View File

@ -0,0 +1,87 @@
[gd_scene load_steps=3 format=3 uid="uid://0yktrbyp6cr3"]
[ext_resource type="FontFile" uid="uid://bkcxbtx1vcj8w" path="res://assets/fonts/Color Basic.otf" id="1_lbk85"]
[ext_resource type="Script" path="res://scripts/game_over_screen.gd" id="1_o2tyf"]
[node name="GameOverScreen" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_o2tyf")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0, 0, 0, 0.596078)
[node name="Panel" type="Panel" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -184.0
offset_top = -132.0
offset_right = 192.0
offset_bottom = 124.0
grow_horizontal = 2
grow_vertical = 2
[node name="GameOverLabel" type="Label" parent="Panel"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -55.0
offset_top = 40.0
offset_right = 55.0
offset_bottom = 63.0
grow_horizontal = 2
theme_override_fonts/font = ExtResource("1_lbk85")
theme_override_font_sizes/font_size = 36
text = "game over"
horizontal_alignment = 1
[node name="RetryButton" type="Button" parent="Panel"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -100.0
offset_top = -96.0
offset_right = -30.0
offset_bottom = -65.0
grow_horizontal = 2
grow_vertical = 0
theme_override_fonts/font = ExtResource("1_lbk85")
text = "retry"
[node name="QuitButton" type="Button" parent="Panel"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = 28.0
offset_top = -96.0
offset_right = 98.0
offset_bottom = -65.0
grow_horizontal = 2
grow_vertical = 0
theme_override_fonts/font = ExtResource("1_lbk85")
text = "quit
"
[connection signal="pressed" from="Panel/RetryButton" to="." method="_on_retry_button_pressed"]
[connection signal="pressed" from="Panel/QuitButton" to="." method="_on_quit_button_pressed"]