save game, player damage, player death, enemy damage, enemy death

This commit is contained in:
OddlyTimbot committed 2025-09-22 21:07:24 -04:00
1 parent 68b998652c
commit a5fa34bd4a
19 files changed
+422 -26

No files matched your search

+1
View File
@@ -20,4 +20,5 @@ rotation = 3.14159
scale = Vector2(0.06, 0.06)
texture = ExtResource("2_y25gk")
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+4 -1
View File
@@ -482,5 +482,8 @@ position = Vector2(630, 375)
[node name="enemies" type="Node2D" parent="."]
[node name="Slime" parent="enemies" instance=ExtResource("11_dinhu")]
[node name="Slime" parent="enemies" groups=["shootables"] instance=ExtResource("11_dinhu")]
position = Vector2(467, 343)
[node name="Slime2" parent="enemies" groups=["shootables"] instance=ExtResource("11_dinhu")]
position = Vector2(586, 280)
+112 -2
View File
@@ -1,16 +1,74 @@
[gd_scene load_steps=28 format=3 uid="uid://boqg1nyudmkh4"]
[gd_scene load_steps=44 format=3 uid="uid://boqg1nyudmkh4"]
[ext_resource type="Script" uid="uid://b7rahgxxw1yuw" path="res://scripts/player.gd" id="1_3vyb7"]
[ext_resource type="Texture2D" uid="uid://c3uwl6agc6dhb" path="res://assets/graphics/player/jump_fall/player jump 48x48.png" id="2_dqkch"]
[ext_resource type="Texture2D" uid="uid://be0vnx023iw65" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_g2els"]
[ext_resource type="Texture2D" uid="uid://fjan00ormd84" path="res://assets/graphics/player/death/Player Death 64x64.png" id="2_tuyoq"]
[ext_resource type="Texture2D" uid="uid://dmmtik7twhga4" path="res://assets/graphics/player/run/player run 48x48.png" id="3_qhqgy"]
[ext_resource type="Texture2D" uid="uid://djicmvbecbmr8" path="res://assets/graphics/player/hurt/Player Hurt 48x48.png" id="3_qlg0r"]
[sub_resource type="CircleShape2D" id="CircleShape2D_8cj0n"]
[sub_resource type="AtlasTexture" id="AtlasTexture_pf23h"]
atlas = ExtResource("2_tuyoq")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_dt7fs"]
atlas = ExtResource("2_tuyoq")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_wqfne"]
atlas = ExtResource("2_tuyoq")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_wnwbv"]
atlas = ExtResource("2_tuyoq")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_gl8cc"]
atlas = ExtResource("2_tuyoq")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_487ah"]
atlas = ExtResource("2_tuyoq")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_md1ol"]
atlas = ExtResource("2_tuyoq")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_bj30b"]
atlas = ExtResource("2_tuyoq")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_jc3p3"]
atlas = ExtResource("2_tuyoq")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_hax0n"]
atlas = ExtResource("2_tuyoq")
region = Rect2(432, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_i4ail"]
atlas = ExtResource("2_dqkch")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_l71n6"]
atlas = ExtResource("3_qlg0r")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ke2ow"]
atlas = ExtResource("3_qlg0r")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ujl30"]
atlas = ExtResource("3_qlg0r")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_31cv2"]
atlas = ExtResource("3_qlg0r")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
atlas = ExtResource("2_g2els")
region = Rect2(0, 0, 48, 48)
@@ -95,6 +153,41 @@ region = Rect2(336, 0, 48, 48)
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_pf23h")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dt7fs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wqfne")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wnwbv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gl8cc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_487ah")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_md1ol")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bj30b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jc3p3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hax0n")
}],
"loop": false,
"name": &"death",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_i4ail")
}],
"loop": false,
@@ -103,6 +196,23 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_l71n6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ke2ow")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ujl30")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_31cv2")
}],
"loop": false,
"name": &"hurt",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qhqgy")
}, {
"duration": 1.0,
@@ -205,7 +315,7 @@ one_shot = true
texture_filter = 1
position = Vector2(0, -7)
sprite_frames = SubResource("SpriteFrames_jej6c")
animation = &"fall"
animation = &"death"
autoplay = "idle"
[node name="Camera2D" type="Camera2D" parent="."]
+31 -4
View File
@@ -1,10 +1,22 @@
[gd_scene load_steps=9 format=3 uid="uid://dpltbyp8ku2mi"]
[gd_scene load_steps=12 format=3 uid="uid://dpltbyp8ku2mi"]
[ext_resource type="Script" uid="uid://cuaxw7eh73a1i" path="res://scripts/slime.gd" id="1_p2gj0"]
[ext_resource type="Texture2D" uid="uid://dwwlva8pi3da2" path="res://assets/graphics/enemies/slime_purple (1).png" id="2_n6pvg"]
[sub_resource type="CircleShape2D" id="CircleShape2D_pjw23"]
[sub_resource type="AtlasTexture" id="AtlasTexture_p2gj0"]
atlas = ExtResource("2_n6pvg")
region = Rect2(24, 48, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_n6pvg"]
atlas = ExtResource("2_n6pvg")
region = Rect2(48, 48, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_pjw23"]
atlas = ExtResource("2_n6pvg")
region = Rect2(72, 48, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_2npkn"]
atlas = ExtResource("2_n6pvg")
region = Rect2(0, 24, 24, 24)
@@ -25,6 +37,20 @@ region = Rect2(72, 24, 24, 24)
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_p2gj0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_n6pvg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pjw23")
}],
"loop": false,
"name": &"hurt",
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_2npkn")
}, {
"duration": 1.0,
@@ -37,7 +63,7 @@ animations = [{
"texture": SubResource("AtlasTexture_v5wyi")
}],
"loop": true,
"name": &"default",
"name": &"idle",
"speed": 12.0
}]
@@ -53,8 +79,8 @@ debug_color = Color(0.932998, 0.222862, 0.34393, 0.42)
texture_filter = 1
position = Vector2(0, -3)
sprite_frames = SubResource("SpriteFrames_0l8pv")
autoplay = "default"
frame_progress = 0.665587
animation = &"idle"
autoplay = "idle"
[node name="RightCast" type="RayCast2D" parent="."]
target_position = Vector2(13, 0)
@@ -71,3 +97,4 @@ position = Vector2(8, 0)
target_position = Vector2(0, 10)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="animation_finished" from="SlimeGraphic" to="." method="_on_slime_graphic_animation_finished"]