Refactor scene structure and resource paths; add death and game over screens
This commit is contained in:
@@ -6,4 +6,5 @@
|
||||
|
||||
[node name="Background Music" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("1_fuc3i")
|
||||
autoplay = true
|
||||
parameters/looping = true
|
||||
|
@@ -1,12 +1,8 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dtjrpkhssq32a"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dtjrpkhssq32a"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://t7mulx3226o0" path="res://sprites/backgrounds/Background_2.png" id="1_w23vv"]
|
||||
[ext_resource type="Texture2D" uid="uid://c7i1ariim7idx" path="res://sprites/backgrounds/Background_1.png" id="2_pm10e"]
|
||||
[ext_resource type="Texture2D" uid="uid://bnsghs5y3pw5s" path="res://sprites/backgrounds/8.png" id="3_cvs3x"]
|
||||
[ext_resource type="Texture2D" uid="uid://tk2bj7w1jxgj" path="res://sprites/backgrounds/background1.png" id="4_4j3tt"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwxbabw207t3r" path="res://sprites/backgrounds/background2.png" id="5_mgjfj"]
|
||||
[ext_resource type="Texture2D" uid="uid://j0d5cqrrftjj" path="res://sprites/backgrounds/background3.png" id="6_le8kl"]
|
||||
[ext_resource type="Texture2D" uid="uid://cj2yaw03r4q82" path="res://sprites/backgrounds/background4a.png" id="7_nkaxn"]
|
||||
|
||||
[node name="BG" type="Node2D"]
|
||||
metadata/_edit_group_ = true
|
||||
@@ -20,23 +16,3 @@ texture = ExtResource("2_pm10e")
|
||||
[node name="8" type="Sprite2D" parent="."]
|
||||
position = Vector2(-30, -25)
|
||||
texture = ExtResource("3_cvs3x")
|
||||
|
||||
[node name="Background1" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(14, 335)
|
||||
texture = ExtResource("4_4j3tt")
|
||||
|
||||
[node name="Background2" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(14, 335)
|
||||
texture = ExtResource("5_mgjfj")
|
||||
|
||||
[node name="Background3" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(10, 355)
|
||||
texture = ExtResource("6_le8kl")
|
||||
|
||||
[node name="Background4a" type="Sprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(10, 355)
|
||||
texture = ExtResource("7_nkaxn")
|
||||
|
40
objects/parallax_background.tscn
Normal file
40
objects/parallax_background.tscn
Normal file
@@ -0,0 +1,40 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://bva54p1fxomu2"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://d2f4ooucvrjcc" path="res://sprites/backgrounds/plains/1.png" id="1_rfutu"]
|
||||
[ext_resource type="Texture2D" uid="uid://cdgk3fi8owc6o" path="res://sprites/backgrounds/plains/2.png" id="2_uysv2"]
|
||||
[ext_resource type="Texture2D" uid="uid://p0bt2k2lihlx" path="res://sprites/backgrounds/plains/3.png" id="3_l6n33"]
|
||||
[ext_resource type="Texture2D" uid="uid://bcahm7wqdbn6n" path="res://sprites/backgrounds/plains/4.png" id="4_jkhju"]
|
||||
|
||||
[node name="ParallaxBackground" type="ParallaxBackground"]
|
||||
|
||||
[node name="Sky" type="ParallaxLayer" parent="."]
|
||||
motion_scale = Vector2(0, 0)
|
||||
motion_mirroring = Vector2(480, 0)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Sky"]
|
||||
texture = ExtResource("1_rfutu")
|
||||
centered = false
|
||||
|
||||
[node name="Clouds" type="ParallaxLayer" parent="."]
|
||||
motion_scale = Vector2(0.1, 0.1)
|
||||
motion_mirroring = Vector2(480, 0)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Clouds"]
|
||||
texture = ExtResource("2_uysv2")
|
||||
centered = false
|
||||
|
||||
[node name="Hills" type="ParallaxLayer" parent="."]
|
||||
motion_scale = Vector2(0.2, 0.2)
|
||||
motion_mirroring = Vector2(480, 0)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Hills"]
|
||||
texture = ExtResource("3_l6n33")
|
||||
centered = false
|
||||
|
||||
[node name="Ground" type="ParallaxLayer" parent="."]
|
||||
motion_scale = Vector2(0.3, 0.3)
|
||||
motion_mirroring = Vector2(480, 0)
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="Ground"]
|
||||
texture = ExtResource("4_jkhju")
|
||||
centered = false
|
@@ -1,17 +1,22 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dulkm3ah4tm0u"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dulkm3ah4tm0u"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b3d1p21sviww4" path="res://scripts/ui/death_screen.gd" id="1_eaoak"]
|
||||
[ext_resource type="Texture2D" uid="uid://jix7wdn0isr3" path="res://sprites/ppc_icon.png" id="1_m30em"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eaoak"]
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="DeathScreen" type="Control"]
|
||||
[node name="DeathScreen" type="Control" node_paths=PackedStringArray("death_screen_root", "current_level_label", "lives_left_label")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_eaoak")
|
||||
death_screen_root = NodePath(".")
|
||||
current_level_label = NodePath("PanelContainer/MarginContainer/VBoxContainer/LevelName")
|
||||
lives_left_label = NodePath("PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/LivesLeft")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
|
@@ -1,15 +1,21 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://wmw6gaisyrvx"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://wmw6gaisyrvx"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bkd7o2u4psu4p" path="res://scripts/ui/game_over_screen.gd" id="1_v1o0m"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mtg1b"]
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="GameOverScreen" type="Control"]
|
||||
[node name="GameOverScreen" type="Control" node_paths=PackedStringArray("game_over_screen", "restart_button", "main_menu_button")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_v1o0m")
|
||||
game_over_screen = NodePath(".")
|
||||
restart_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/RestartLevelButton")
|
||||
main_menu_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/MenuButton")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
|
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://byxf45ukq82pe"]
|
||||
|
||||
[ext_resource type="LabelSettings" uid="uid://rvn5ivivfvv6" path="res://resources/ui/hud_label_settings.tres" id="1_4dsh5"]
|
||||
[ext_resource type="Script" uid="uid://c3pde84b3kdco" path="res://scripts/hud.gd" id="1_ueofj"]
|
||||
[ext_resource type="Script" uid="uid://c3pde84b3kdco" path="res://scripts/ui/hud.gd" id="1_ueofj"]
|
||||
[ext_resource type="FontFile" uid="uid://xm0vbusjr7b7" path="res://fonts/PressStart2P-Regular.ttf" id="1_ygmwt"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mmcdi"]
|
||||
|
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cvfsbiy5ggrpg"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bxpr4m7lq7clh" path="res://objects/ui/input_button.tscn" id="1_h8s4o"]
|
||||
[ext_resource type="Script" uid="uid://dppwl7xie2mh" path="res://scripts/input_settings.gd" id="1_v2gus"]
|
||||
[ext_resource type="Script" uid="uid://dppwl7xie2mh" path="res://scripts/ui/input_settings.gd" id="1_v2gus"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_se25o"]
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://dlm2ri562fynd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://duifmqjarjpuv" path="res://scripts/marketplace.gd" id="1_ncpyg"]
|
||||
[ext_resource type="Script" uid="uid://duifmqjarjpuv" path="res://scripts/ui/marketplace.gd" id="1_ncpyg"]
|
||||
[ext_resource type="FontFile" uid="uid://xm0vbusjr7b7" path="res://fonts/PressStart2P-Regular.ttf" id="2_ho1tm"]
|
||||
[ext_resource type="Script" uid="uid://bya240e627ti6" path="res://scripts/resources/skill_data.gd" id="2_pg4mc"]
|
||||
[ext_resource type="Resource" uid="uid://dw5ee2lpeypnb" path="res://resources/skills/brick_throw.tres" id="3_bk5yi"]
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://i6mnjbjcoqe5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cugifchx6jhuk" path="res://scripts/pause_menu.gd" id="1_aktha"]
|
||||
[ext_resource type="Script" uid="uid://cugifchx6jhuk" path="res://scripts/ui/pause_menu.gd" id="1_aktha"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g4ivv"]
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
|
@@ -1,11 +1,11 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://y0ae6e7t70fj"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c506rigcjlm6x" path="res://scripts/settings_menu.gd" id="1_lt6q2"]
|
||||
[ext_resource type="Script" uid="uid://c506rigcjlm6x" path="res://scripts/ui/settings_menu.gd" id="1_lt6q2"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wgbcl"]
|
||||
bg_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Settings menu" type="Control" node_paths=PackedStringArray("settings_menu_control")]
|
||||
[node name="Settings menu" type="Control" node_paths=PackedStringArray("settings_menu_control", "input_settings_button", "audio_settings_button", "display_settings_button", "gameplay_settings_button")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
@@ -14,6 +14,10 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_lt6q2")
|
||||
settings_menu_control = NodePath(".")
|
||||
input_settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Input Settings Button")
|
||||
audio_settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Audio Settings Button")
|
||||
display_settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Display Settings Button")
|
||||
gameplay_settings_button = NodePath("PanelContainer/MarginContainer/VBoxContainer/Gameplay Settings Button")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
|
Reference in New Issue
Block a user