Implement skeleton combat and memory piece progression

- Created Skeleton enemy scene with idle, walk, attack, hurt, and death animations
- Added player detection and enemy pursuit AI
- Implemented skeleton attack system and player damage
- Added player punch attack for adult character
- Implemented enemy damage and health system
- Added skeleton death handling
- Connected MemoryPiece spawning to defeated skeletons
- Added configurable memory piece textures and wardrobe assignments
- Implemented memory piece collection and return-to-graveyard workflow
- Added interact action to Input Map
- Continued development of Wardrobe 1 combat encounter
- Fixed multiple collision, hitbox, and animation issues
This commit is contained in:
doctorbatmanwho-creator committed 2026-06-15 14:05:40 -04:00
1 parent 89c109b26f
commit 0f7889adfb
21 files changed
+908 -29

No files matched your search

+9 -8
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=45 format=4 uid="uid://8n6472fqqmcc"]
[gd_scene load_steps=46 format=4 uid="uid://8n6472fqqmcc"]
[ext_resource type="Texture2D" uid="uid://bu6brcro3ydwf" path="res://Assets/Graphics/Terrains/Background/Graveyard/parallax-grave-bg.png" id="2_3f4w8"]
[ext_resource type="Texture2D" uid="uid://cpie2yxwj2phl" path="res://Assets/Graphics/Terrains/Background/Graveyard/parallax-grave-midder-trees.png" id="3_vi1do"]
@@ -26,6 +26,7 @@
[ext_resource type="Texture2D" uid="uid://b0g2yq4wolooy" path="res://Assets/Graphics/Terrains/Background/Memories/Memory2.png" id="23_8qp07"]
[ext_resource type="Texture2D" uid="uid://d3u7nur0ua1vb" path="res://Assets/Graphics/Terrains/Background/Memories/Memory5.png" id="25_6kan1"]
[ext_resource type="Texture2D" uid="uid://cwlxblkouwtxr" path="res://Assets/Graphics/Terrains/Background/Memories/Memory4.png" id="25_8elfy"]
[ext_resource type="PackedScene" uid="uid://0lyd0y14s0w4" path="res://Scenes/Skeleton.tscn" id="26_pyeu7"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_3jtcq"]
texture = ExtResource("7_tpoa3")
@@ -829,13 +830,6 @@ position = Vector2(3033, 212)
[node name="MemoryPieces" type="Node2D" parent="."]
position = Vector2(3784, 1095)
[node name="MemoryPiece1" parent="MemoryPieces" node_paths=PackedStringArray("return_spawn", "wardrobe") instance=ExtResource("10_3jtcq")]
z_index = 10
position = Vector2(-3232, -134)
memory_texture = ExtResource("16_3jtcq")
return_spawn = NodePath("../../ReturnSpawns/ReturnSpawn1")
wardrobe = NodePath("../../Wardrobes/Wardrobe1")
[node name="MemoryPiece2" parent="MemoryPieces" node_paths=PackedStringArray("return_spawn", "wardrobe") instance=ExtResource("10_3jtcq")]
z_index = 10
position = Vector2(87, -275)
@@ -933,6 +927,13 @@ position = Vector2(2194, 239.00002)
scale = Vector2(0.15, 0.15)
texture = ExtResource("16_dvm4i")
[node name="Skeleton" parent="Decor" node_paths=PackedStringArray("memory_return_spawn", "memory_wardrobe") instance=ExtResource("26_pyeu7")]
position = Vector2(396, 1111)
memory_piece_scene = ExtResource("10_3jtcq")
memory_texture = ExtResource("16_3jtcq")
memory_return_spawn = NodePath("../../ReturnSpawns/ReturnSpawn1")
memory_wardrobe = NodePath("../../Wardrobes/Wardrobe1")
[node name="Boundaries" type="Node2D" parent="."]
position = Vector2(574, 596)
+14 -4
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=102 format=3 uid="uid://bu8e4iyw8pc03"]
[gd_scene load_steps=103 format=3 uid="uid://bu8e4iyw8pc03"]
[ext_resource type="Script" uid="uid://dsryf6gxqcm1k" path="res://Scripts/player.gd" id="1_0y7nr"]
[ext_resource type="Texture2D" uid="uid://rltv4cun6tyw" path="res://Assets/Graphics/Player/Death/adult death.png" id="2_nn08x"]
@@ -14,6 +14,9 @@
[ext_resource type="Texture2D" uid="uid://lvcdluia0nr3" path="res://Assets/Graphics/Player/Child/Run/Child_run.png" id="11_1e7my"]
[ext_resource type="Texture2D" uid="uid://g7bg5bcbegtv" path="res://Assets/Graphics/Player/Child/Punch/Child_punch.png" id="12_o3h8g"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_miouo"]
size = Vector2(71, 30)
[sub_resource type="AtlasTexture" id="AtlasTexture_teras"]
atlas = ExtResource("2_nn08x")
region = Rect2(0, 0, 123, 122)
@@ -319,7 +322,7 @@ animations = [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_6626w")
}],
"loop": true,
"loop": false,
"name": &"punch",
"speed": 12.0
}, {
@@ -693,6 +696,14 @@ position = Vector2(2, -1)
script = ExtResource("1_0y7nr")
metadata/_edit_group_ = true
[node name="PunchHitbox" type="Area2D" parent="."]
monitoring = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="PunchHitbox"]
position = Vector2(50.5, -5)
shape = SubResource("RectangleShape2D_miouo")
debug_color = Color(0.97765833, 0.1351085, 0.16903454, 0.41960785)
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2(-7, -43)
@@ -701,9 +712,8 @@ z_index = 10
texture_filter = 1
position = Vector2(0, -6)
sprite_frames = SubResource("SpriteFrames_nn08x")
animation = &"punch"
animation = &"idle"
autoplay = "idle"
frame_progress = 0.25973
[node name="ChildGraphic" type="AnimatedSprite2D" parent="."]
visible = false
+397
View File
@@ -0,0 +1,397 @@
[gd_scene load_steps=57 format=3 uid="uid://0lyd0y14s0w4"]
[ext_resource type="Script" uid="uid://f88hycnuf3m5" path="res://Scripts/skeleton.gd" id="1_abfcy"]
[ext_resource type="Texture2D" uid="uid://dcukplq3ykd13" path="res://Assets/Graphics/Enemies/Skeleton/Skeleton_01_White_Idle.png" id="1_vif15"]
[ext_resource type="Texture2D" uid="uid://cy3t1xgbpcx1t" path="res://Assets/Graphics/Enemies/Skeleton/Skeleton_01_White_Attack1.png" id="2_yek4v"]
[ext_resource type="Texture2D" uid="uid://den6xknhkm8d" path="res://Assets/Graphics/Enemies/Skeleton/Skeleton_01_White_Die.png" id="3_2bjux"]
[ext_resource type="Texture2D" uid="uid://cxmvtyalmav26" path="res://Assets/Graphics/Enemies/Skeleton/Skeleton_01_White_Hurt.png" id="4_rtppx"]
[ext_resource type="Texture2D" uid="uid://dilf6h30fxxw4" path="res://Assets/Graphics/Enemies/Skeleton/Skeleton_01_White_Walk.png" id="6_k2wj7"]
[sub_resource type="AtlasTexture" id="AtlasTexture_87cwn"]
atlas = ExtResource("2_yek4v")
region = Rect2(0, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_lxoki"]
atlas = ExtResource("2_yek4v")
region = Rect2(96, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_xneb1"]
atlas = ExtResource("2_yek4v")
region = Rect2(192, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ci2ge"]
atlas = ExtResource("2_yek4v")
region = Rect2(288, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ma653"]
atlas = ExtResource("2_yek4v")
region = Rect2(384, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ecs23"]
atlas = ExtResource("2_yek4v")
region = Rect2(480, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_0ftre"]
atlas = ExtResource("2_yek4v")
region = Rect2(576, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_lii7c"]
atlas = ExtResource("2_yek4v")
region = Rect2(672, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_10q1y"]
atlas = ExtResource("2_yek4v")
region = Rect2(768, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_tfme2"]
atlas = ExtResource("2_yek4v")
region = Rect2(864, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_b70gm"]
atlas = ExtResource("3_2bjux")
region = Rect2(0, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_t5rxt"]
atlas = ExtResource("3_2bjux")
region = Rect2(96, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_y8jxr"]
atlas = ExtResource("3_2bjux")
region = Rect2(192, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_7p4ha"]
atlas = ExtResource("3_2bjux")
region = Rect2(288, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_jlfek"]
atlas = ExtResource("3_2bjux")
region = Rect2(384, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_rsssq"]
atlas = ExtResource("3_2bjux")
region = Rect2(480, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_y1shx"]
atlas = ExtResource("3_2bjux")
region = Rect2(576, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_omjhr"]
atlas = ExtResource("3_2bjux")
region = Rect2(672, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_8lo8o"]
atlas = ExtResource("3_2bjux")
region = Rect2(768, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ijbhh"]
atlas = ExtResource("3_2bjux")
region = Rect2(864, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ddipo"]
atlas = ExtResource("3_2bjux")
region = Rect2(960, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_353gq"]
atlas = ExtResource("3_2bjux")
region = Rect2(1056, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_ix6k6"]
atlas = ExtResource("3_2bjux")
region = Rect2(1152, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_hdu5v"]
atlas = ExtResource("4_rtppx")
region = Rect2(0, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_vips4"]
atlas = ExtResource("4_rtppx")
region = Rect2(96, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_jdpkg"]
atlas = ExtResource("4_rtppx")
region = Rect2(192, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_5xlrn"]
atlas = ExtResource("4_rtppx")
region = Rect2(288, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_0i2gx"]
atlas = ExtResource("4_rtppx")
region = Rect2(384, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_abfcy"]
atlas = ExtResource("1_vif15")
region = Rect2(0, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_4ie6e"]
atlas = ExtResource("1_vif15")
region = Rect2(96, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_iuen5"]
atlas = ExtResource("1_vif15")
region = Rect2(192, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_rxd7e"]
atlas = ExtResource("1_vif15")
region = Rect2(288, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_yek4v"]
atlas = ExtResource("1_vif15")
region = Rect2(384, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_2bjux"]
atlas = ExtResource("1_vif15")
region = Rect2(480, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_rtppx"]
atlas = ExtResource("1_vif15")
region = Rect2(576, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_k2wj7"]
atlas = ExtResource("1_vif15")
region = Rect2(672, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_wx38x"]
atlas = ExtResource("6_k2wj7")
region = Rect2(0, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_mvwdc"]
atlas = ExtResource("6_k2wj7")
region = Rect2(96, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_whxj0"]
atlas = ExtResource("6_k2wj7")
region = Rect2(192, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_2hcwm"]
atlas = ExtResource("6_k2wj7")
region = Rect2(288, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_u2tho"]
atlas = ExtResource("6_k2wj7")
region = Rect2(384, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_14y5s"]
atlas = ExtResource("6_k2wj7")
region = Rect2(480, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_xuc1f"]
atlas = ExtResource("6_k2wj7")
region = Rect2(576, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_pdd2a"]
atlas = ExtResource("6_k2wj7")
region = Rect2(672, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_1xayb"]
atlas = ExtResource("6_k2wj7")
region = Rect2(768, 0, 96, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_0ba4d"]
atlas = ExtResource("6_k2wj7")
region = Rect2(864, 0, 96, 64)
[sub_resource type="SpriteFrames" id="SpriteFrames_87cwn"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_87cwn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lxoki")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xneb1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ci2ge")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ma653")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ecs23")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0ftre")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lii7c")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_10q1y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tfme2")
}],
"loop": false,
"name": &"attack",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_b70gm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_t5rxt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_y8jxr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7p4ha")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jlfek")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rsssq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_y1shx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_omjhr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8lo8o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ijbhh")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ddipo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_353gq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ix6k6")
}],
"loop": false,
"name": &"death",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_hdu5v")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vips4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jdpkg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5xlrn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0i2gx")
}],
"loop": false,
"name": &"hurt",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_abfcy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4ie6e")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_iuen5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rxd7e")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yek4v")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2bjux")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rtppx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_k2wj7")
}],
"loop": true,
"name": &"idle",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_wx38x")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mvwdc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_whxj0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2hcwm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_u2tho")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_14y5s")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xuc1f")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pdd2a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1xayb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0ba4d")
}],
"loop": true,
"name": &"walk",
"speed": 12.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_yek4v"]
height = 72.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_yek4v"]
size = Vector2(371, 71)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2bjux"]
size = Vector2(452, 33)
[node name="Skeleton" type="CharacterBody2D"]
z_index = 10
script = ExtResource("1_abfcy")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
scale = Vector2(1.5, 1.5)
sprite_frames = SubResource("SpriteFrames_87cwn")
animation = &"idle"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
texture_filter = 1
position = Vector2(-5, 12)
shape = SubResource("CapsuleShape2D_yek4v")
debug_color = Color(0.61885023, 0.36088452, 0.99050516, 0.41960785)
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(12.5, 13.5)
shape = SubResource("RectangleShape2D_yek4v")
debug_color = Color(0.51556015, 0.56157154, 0.37343058, 0.41960785)
[node name="AttackHitbox" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="AttackHitbox"]
position = Vector2(37, 0.5)
shape = SubResource("RectangleShape2D_2bjux")
debug_color = Color(0.9785972, 0.11901257, 0.22291586, 0.41960785)