player damage, player death, bad guy dictionary, bad guy damage, bad guy death, ui, player damage animation, player death animation

This commit is contained in:
AutumnMayes committed 2025-07-07 21:01:52 -04:00
1 parent 92e989c331
commit c10beb5635
22 files changed
+397 -29

No files matched your search

+115 -4
View File
@@ -1,16 +1,74 @@
[gd_scene load_steps=28 format=3 uid="uid://bu8e4iyw8pc03"]
[gd_scene load_steps=44 format=3 uid="uid://bu8e4iyw8pc03"]
[ext_resource type="Script" uid="uid://dsryf6gxqcm1k" path="res://Scripts/character_body_2d.gd" id="1_0y7nr"]
[ext_resource type="Texture2D" uid="uid://dpv7hte6i8kui" path="res://Assets/Graphics/Player/Jump/player jump 48x48.png" id="2_dewec"]
[ext_resource type="Texture2D" uid="uid://dl452cit6hmxl" path="res://Assets/Graphics/Player/Idle/Player Idle 48x48.png" id="2_kyqiw"]
[ext_resource type="Texture2D" uid="uid://35h3pfqene6g" path="res://Assets/Graphics/Player/Death/Player Death 64x64.png" id="2_nn08x"]
[ext_resource type="Texture2D" uid="uid://bmrxpbm2roq7s" path="res://Assets/Graphics/Player/Run/player run 48x48.png" id="3_gntrk"]
[ext_resource type="Texture2D" uid="uid://npog4kgvtnlo" path="res://Assets/Graphics/Player/Hurt/Player Hurt 48x48.png" id="4_52ee3"]
[sub_resource type="CircleShape2D" id="CircleShape2D_2poj3"]
[sub_resource type="AtlasTexture" id="AtlasTexture_qidb7"]
atlas = ExtResource("2_nn08x")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_70hv0"]
atlas = ExtResource("2_nn08x")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_8flut"]
atlas = ExtResource("2_nn08x")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_u7x0b"]
atlas = ExtResource("2_nn08x")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_utwlt"]
atlas = ExtResource("2_nn08x")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_kih0c"]
atlas = ExtResource("2_nn08x")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_lyrkg"]
atlas = ExtResource("2_nn08x")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_c43xd"]
atlas = ExtResource("2_nn08x")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_avx33"]
atlas = ExtResource("2_nn08x")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_rxg2u"]
atlas = ExtResource("2_nn08x")
region = Rect2(432, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_5v66d"]
atlas = ExtResource("2_dewec")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_xixlo"]
atlas = ExtResource("4_52ee3")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_bfbt0"]
atlas = ExtResource("4_52ee3")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_wosd6"]
atlas = ExtResource("4_52ee3")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_hkrn1"]
atlas = ExtResource("4_52ee3")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_gntrk"]
atlas = ExtResource("2_kyqiw")
region = Rect2(0, 0, 48, 48)
@@ -95,6 +153,41 @@ region = Rect2(336, 0, 48, 48)
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qidb7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_70hv0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8flut")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_u7x0b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_utwlt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kih0c")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lyrkg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_c43xd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_avx33")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rxg2u")
}],
"loop": false,
"name": &"death",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_5v66d")
}],
"loop": true,
@@ -103,6 +196,23 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_xixlo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bfbt0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wosd6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hkrn1")
}],
"loop": false,
"name": &"hurt",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_gntrk")
}, {
"duration": 1.0,
@@ -178,6 +288,7 @@ animations = [{
}]
[node name="CharacterBody2D" type="CharacterBody2D"]
position = Vector2(2, -1)
script = ExtResource("1_0y7nr")
metadata/_edit_group_ = true
@@ -192,16 +303,16 @@ target_position = Vector2(16, 0)
target_position = Vector2(-16, 0)
[node name="RightSpawn" type="Node2D" parent="."]
position = Vector2(17, -8)
position = Vector2(17, -3)
[node name="LeftSpawn" type="Node2D" parent="."]
position = Vector2(-14, -9)
position = Vector2(-14, -3)
[node name="PlayerGraphic" type="AnimatedSprite2D" parent="."]
texture_filter = 1
position = Vector2(0, -6)
sprite_frames = SubResource("SpriteFrames_miouo")
animation = &"falling"
animation = &"hurt"
autoplay = "idle"
[node name="Camera2D" type="Camera2D" parent="."]
+2
View File
@@ -21,3 +21,5 @@ texture_filter = 1
position = Vector2(0.5, 0)
shape = SubResource("RectangleShape2D_oduel")
debug_color = Color(0.995859, 0, 0.197667, 0.42)
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
+3 -1
View File
@@ -1,10 +1,12 @@
[gd_scene load_steps=3 format=3 uid="uid://cd7fv3pwgr880"]
[gd_scene load_steps=4 format=3 uid="uid://cd7fv3pwgr880"]
[ext_resource type="Script" uid="uid://b546t5rmhjwiu" path="res://Scripts/crate.gd" id="1_i4r3v"]
[ext_resource type="Texture2D" uid="uid://m685ffchmchr" path="res://Assets/Graphics/Objects/crate.png" id="1_wp72f"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ebmjs"]
[node name="RigidBody2D3" type="RigidBody2D"]
script = ExtResource("1_i4r3v")
metadata/_edit_group_ = true
[node name="Sprite2D" type="Sprite2D" parent="."]
+9 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=4 uid="uid://c6mxse0hqjro7"]
[gd_scene load_steps=19 format=4 uid="uid://c6mxse0hqjro7"]
[ext_resource type="Texture2D" uid="uid://mfcyrgamj3cc" path="res://Assets/Graphics/Terrains/Terrain (32x32).png" id="2_1l0tm"]
[ext_resource type="Script" uid="uid://bs4frobn6kxne" path="res://Scripts/scene_manager.gd" id="2_i6g32"]
@@ -12,6 +12,7 @@
[ext_resource type="PackedScene" uid="uid://b5d8himq5sttt" path="res://Scenes/trigger.tscn" id="4_wowpa"]
[ext_resource type="PackedScene" uid="uid://cat3n1unb05u6" path="res://Scenes/slime.tscn" id="12_rfjv2"]
[ext_resource type="PackedScene" uid="uid://dr1mp5x0cmbhw" path="res://Scenes/coin.tscn" id="12_rku1e"]
[ext_resource type="PackedScene" uid="uid://k42k25w6fsbo" path="res://Scenes/ui.tscn" id="13_rfjv2"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v158k"]
texture = ExtResource("2_1l0tm")
@@ -488,8 +489,15 @@ position = Vector2(483, 365)
[node name="Enemies" type="Node2D" parent="."]
[node name="Slime2" parent="Enemies" instance=ExtResource("12_rfjv2")]
position = Vector2(275, 370)
[node name="Slime" parent="Enemies" instance=ExtResource("12_rfjv2")]
position = Vector2(641, 340)
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="UI" parent="CanvasLayer" instance=ExtResource("13_rfjv2")]
[connection signal="areatrigger" from="Triggers/Area2D2" to="." method="_on_areatrigger"]
[connection signal="areatrigger" from="Triggers/Area2D3" to="." method="_on_areatrigger"]
+6 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=17 format=4 uid="uid://bcray1583u4e6"]
[gd_scene load_steps=18 format=4 uid="uid://bcray1583u4e6"]
[ext_resource type="Texture2D" uid="uid://c0aoaemjratj1" path="res://Assets/Graphics/Terrains/forestsky.png" id="1_mtqcm"]
[ext_resource type="Texture2D" uid="uid://cugs4plceapu2" path="res://Assets/Graphics/Terrains/forestbackground.png" id="2_mmf1u"]
@@ -11,6 +11,7 @@
[ext_resource type="PackedScene" uid="uid://cd7fv3pwgr880" path="res://Scenes/crate.tscn" id="9_051s1"]
[ext_resource type="PackedScene" uid="uid://b5d8himq5sttt" path="res://Scenes/trigger.tscn" id="10_in4v8"]
[ext_resource type="PackedScene" uid="uid://dr1mp5x0cmbhw" path="res://Scenes/coin.tscn" id="11_mu7lp"]
[ext_resource type="PackedScene" uid="uid://k42k25w6fsbo" path="res://Scenes/ui.tscn" id="12_mmf1u"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v158k"]
texture = ExtResource("4_r8hce")
@@ -486,5 +487,9 @@ position = Vector2(952, 174)
[node name="Enemies" type="Node2D" parent="."]
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="UI" parent="CanvasLayer" instance=ExtResource("12_mmf1u")]
[connection signal="areatrigger" from="Triggers/Area2D2" to="." method="_on_areatrigger"]
[connection signal="areatrigger" from="Triggers/Area2D3" to="." method="_on_areatrigger"]
+6 -1
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=17 format=4 uid="uid://kqvn8jpvyrej"]
[gd_scene load_steps=18 format=4 uid="uid://kqvn8jpvyrej"]
[ext_resource type="Texture2D" uid="uid://c0aoaemjratj1" path="res://Assets/Graphics/Terrains/forestsky.png" id="1_h6p24"]
[ext_resource type="Texture2D" uid="uid://cugs4plceapu2" path="res://Assets/Graphics/Terrains/forestbackground.png" id="2_vn7r1"]
@@ -11,6 +11,7 @@
[ext_resource type="PackedScene" uid="uid://cd7fv3pwgr880" path="res://Scenes/crate.tscn" id="9_p2sx0"]
[ext_resource type="PackedScene" uid="uid://b5d8himq5sttt" path="res://Scenes/trigger.tscn" id="10_tc3ri"]
[ext_resource type="PackedScene" uid="uid://dr1mp5x0cmbhw" path="res://Scenes/coin.tscn" id="11_3nkac"]
[ext_resource type="PackedScene" uid="uid://k42k25w6fsbo" path="res://Scenes/ui.tscn" id="12_vn7r1"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v158k"]
texture = ExtResource("4_fpsp3")
@@ -486,5 +487,9 @@ position = Vector2(896, 372)
[node name="Enemies" type="Node2D" parent="."]
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="UI" parent="CanvasLayer" instance=ExtResource("12_vn7r1")]
[connection signal="areatrigger" from="Triggers/Area2D2" to="." method="_on_areatrigger"]
[connection signal="areatrigger" from="Triggers/Area2D3" to="." method="_on_areatrigger"]
+37 -4
View File
@@ -1,8 +1,24 @@
[gd_scene load_steps=9 format=3 uid="uid://cat3n1unb05u6"]
[gd_scene load_steps=13 format=3 uid="uid://cat3n1unb05u6"]
[ext_resource type="Texture2D" uid="uid://1qmvigexa3to" path="res://Assets/Graphics/Enemies/slime_purple.png" id="1_jokqx"]
[ext_resource type="Script" uid="uid://vjdcp0a4i0j8" path="res://Scripts/slime.gd" id="1_swwnm"]
[sub_resource type="AtlasTexture" id="AtlasTexture_5gljc"]
atlas = ExtResource("1_jokqx")
region = Rect2(0, 48, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_vblni"]
atlas = ExtResource("1_jokqx")
region = Rect2(24, 48, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_e388w"]
atlas = ExtResource("1_jokqx")
region = Rect2(48, 48, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_r4o34"]
atlas = ExtResource("1_jokqx")
region = Rect2(72, 48, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_swwnm"]
atlas = ExtResource("1_jokqx")
region = Rect2(0, 24, 24, 24)
@@ -23,6 +39,23 @@ region = Rect2(72, 24, 24, 24)
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_5gljc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vblni")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e388w")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r4o34")
}],
"loop": false,
"name": &"hurt",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_swwnm")
}, {
"duration": 1.0,
@@ -49,10 +82,10 @@ metadata/_edit_group_ = true
[node name="slimeGraphic" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_5gljc")
animation = &"idle"
animation = &"hurt"
autoplay = "idle"
frame = 1
frame_progress = 0.885206
frame = 3
frame_progress = 1.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 4)
+47
View File
@@ -0,0 +1,47 @@
[gd_scene load_steps=2 format=3 uid="uid://k42k25w6fsbo"]
[ext_resource type="Script" uid="uid://cw51scv08wj72" path="res://ui.gd" id="1_m1v6r"]
[node name="UI" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_m1v6r")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="Health" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer"]
layout_mode = 2
text = "Health"
[node name="MarginContainer3" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="Timer" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer3"]
layout_mode = 2
text = "Timer"
horizontal_alignment = 1
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="Coins" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer2"]
layout_mode = 2
text = "Coins"
horizontal_alignment = 2