Add player health, lives, death, and cutscene system

Added player damage, invulnerability frames, knockback, and death handling. Enemies stop attacking after player death and player controls are disabled. Added a persistent three-life system with ambulance cutscenes after the first two deaths and a final Game Over cutscene after the third death.
This commit is contained in:
doctorbatmanwho-creator committed 2026-08-27 21:31:58 -04:00
1 parent 13f95562a7
commit 53fd05c165
19 files changed
+195 -20

No files matched your search

+1 -1
View File
@@ -716,7 +716,7 @@ z_index = 10
texture_filter = 1
position = Vector2(0, -6)
sprite_frames = SubResource("SpriteFrames_nn08x")
animation = &"idle"
animation = &"death"
autoplay = "idle"
[node name="ChildGraphic" type="AnimatedSprite2D" parent="."]
+25
View File
@@ -0,0 +1,25 @@
[gd_scene load_steps=3 format=3 uid="uid://ci5nqe61278ke"]
[ext_resource type="VideoStream" uid="uid://l34f82rsegd6" path="res://Assets/Cut Scenes/Weewoo.ogv" id="1_3dlu2"]
[ext_resource type="Script" uid="uid://basrxhaxblk5q" path="res://Scripts/ambulance_cutscene.gd" id="1_yn2le"]
[node name="AmbulanceCutscene" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_right = 960.0
offset_bottom = 540.0
script = ExtResource("1_yn2le")
[node name="VideoStreamPlayer" type="VideoStreamPlayer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
scale = Vector2(0.34, 0.34)
stream = ExtResource("1_3dlu2")
autoplay = true
expand = true
[connection signal="finished" from="VideoStreamPlayer" to="." method="_on_video_stream_player_finished"]
+21
View File
@@ -0,0 +1,21 @@
[gd_scene load_steps=2 format=3 uid="uid://dofx2pgo5xgla"]
[ext_resource type="VideoStream" uid="uid://b41725daretoj" path="res://Assets/Cut Scenes/Game over video.ogv" id="1_h6d1g"]
[node name="FinalDeathCutscene" type="Control"]
layout_mode = 3
anchors_preset = 0
offset_right = 960.0
offset_bottom = 540.0
[node name="VideoStreamPlayer" type="VideoStreamPlayer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
scale = Vector2(0.34, 0.34)
stream = ExtResource("1_h6d1g")
autoplay = true
expand = true