started death screen

This commit is contained in:
Florian 2025-09-16 19:34:30 +02:00
parent 87b1c2c9ba
commit ace2285c80
11 changed files with 93 additions and 6 deletions

View file

@ -13,7 +13,6 @@ shader_parameter/cell_height = 300.0
shader_parameter/num_cells = 60
[node name="Building" type="Node2D"]
modulate = Color(0.3529412, 0, 0.007843138, 0.007843138)
script = ExtResource("1_5j34s")
[node name="Sprite2D" type="Sprite2D" parent="."]

View file

@ -27,3 +27,4 @@ script = ExtResource("4_bl5jt")
[node name="EnemyList" type="Node2D" parent="."]
[node name="Ghost" parent="EnemyList" instance=ExtResource("5_23fi7")]
position = Vector2(115, -74.99999)

View file

@ -0,0 +1,52 @@
[gd_scene load_steps=2 format=3 uid="uid://dpdn2php3ydsv"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_aam3l"]
bg_color = Color(0.5671965, 0.085610785, 0.1369414, 1)
border_width_left = 10
border_width_top = 10
border_width_right = 10
border_width_bottom = 10
border_color = Color(0, 0, 0, 1)
border_blend = true
corner_radius_top_left = 20
corner_radius_top_right = 20
corner_radius_bottom_right = 20
corner_radius_bottom_left = 20
[node name="death_screen" type="MarginContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 50
theme_override_constants/margin_top = 50
theme_override_constants/margin_right = 50
theme_override_constants/margin_bottom = 50
[node name="PanelContainer" type="PanelContainer" parent="."]
custom_minimum_size = Vector2(700, 200)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 0
theme_override_styles/panel = SubResource("StyleBoxFlat_aam3l")
[node name="RichTextLabel" type="RichTextLabel" parent="PanelContainer"]
layout_mode = 2
text = "YOU DIED"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 8
[node name="Button_Retry" type="Button" parent="HBoxContainer"]
layout_mode = 2
[node name="Button_Main_Menu" type="Button" parent="HBoxContainer"]
layout_mode = 2
[node name="Button_Quit_Forever" type="Button" parent="HBoxContainer"]
layout_mode = 2

View file

@ -16,11 +16,19 @@ script = ExtResource("2_lquwl")
[node name="Ghost" parent="." instance=ExtResource("3_h2yge")]
position = Vector2(0, -3200)
[node name="Debug_Camera" type="Camera2D" parent="."]
scale = Vector2(41.020004, 41.020004)
zoom = Vector2(0.15, 0.15)
[node name="Player" parent="." instance=ExtResource("2_1bvp3")]
unique_name_in_owner = true
position = Vector2(500, -3100)
scale = Vector2(3, 3)
[node name="Camera2D" type="Camera2D" parent="Player"]
position = Vector2(0, -50)
ignore_rotation = false
[node name="Building Generator" type="Node" parent="."]
script = ExtResource("4_1bvp3")

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 2.png-5dea4fdec55fa43e26680e08090fd654.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 3.png-27890c0cb512383b8ecbd848c73efee1.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 4.png-232b1eae2acf3ad82130431014262cde.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 5.png-cfb8eb15ace876127c083283fe74cdc0.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Walk 6.png-f243f98e182be67eb8681a11d34ee554.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false

View file

@ -19,6 +19,7 @@ var air_jumps_current = 1;
# HP and Iframes
signal health_changed(new_health : int)
signal player_died
var current_hp = 5:
set(new_hp):
@ -112,5 +113,5 @@ func hurt(dmg: int, dir: Vector2 = Vector2.ZERO):
func die():
if not dead:
print("You Died") # Placeholder
player_died.emit()
dead = true

View file

@ -53,10 +53,6 @@ sprite_frames = SubResource("SpriteFrames_dw050")
animation = &"walk"
frame_progress = 0.433977
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2(0, -50)
ignore_rotation = false
[node name="EarthAligner" parent="." instance=ExtResource("3_i3pqv")]
[node name="Sword" parent="." instance=ExtResource("4_yw30f")]