game saving like for real, bad guy movement, player damage, player death, ui with controls labels

This commit is contained in:
RudyIm committed 2025-11-10 21:17:58 -05:00
1 parent b40f2baaa7
commit f772a9e736
18 files changed
+493 -13

No files matched your search

+12 -5
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=21 format=4 uid="uid://cy1i6ucex6m0d"]
[gd_scene load_steps=22 format=4 uid="uid://cy1i6ucex6m0d"]
[ext_resource type="PackedScene" uid="uid://qv8blu8wkqvq" path="res://scenes/crate.tscn" id="1_uwrxv"]
[ext_resource type="Script" uid="uid://barmq4qhp5cvl" path="res://scripts/scene_manager.gd" id="2_p57ef"]
@@ -12,6 +12,7 @@
[ext_resource type="Texture2D" uid="uid://ds2j76cg1r8y2" path="res://assets/graphics/objects/plane.png" id="5_kvpfn"]
[ext_resource type="PackedScene" uid="uid://dxocmoeuu32ex" path="res://scenes/coin.tscn" id="12_dinhu"]
[ext_resource type="PackedScene" uid="uid://ccx1uakpj5143" path="res://scenes/slime.tscn" id="13_kvuet"]
[ext_resource type="PackedScene" uid="uid://ck553kksdq0ku" path="res://scenes/ui.tscn" id="13_trtic"]
[sub_resource type="TileMapPattern" id="TileMapPattern_p57ef"]
tile_data = PackedInt32Array(0, 0, 4, 1, 65536, 4, 2, 65536, 4, 3, 65536, 4, 4, 131072, 4)
@@ -337,11 +338,13 @@ metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D3"]
shape = SubResource("RectangleShape2D_8cj0n")
[node name="Crate" parent="." groups=["explodable", "pushable"] instance=ExtResource("1_uwrxv")]
[node name="Crates" type="Node2D" parent="."]
position = Vector2(114, 175)
[node name="Crate2" parent="." groups=["explodable", "pushable"] instance=ExtResource("1_uwrxv")]
position = Vector2(155.00002, 199)
[node name="Crate" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("1_uwrxv")]
[node name="Crate2" parent="Crates" groups=["explodable", "pushable"] instance=ExtResource("1_uwrxv")]
position = Vector2(41.000015, 24)
rotation = 0.8783198
[node name="Boundary" type="StaticBody2D" parent="."]
@@ -358,7 +361,7 @@ position = Vector2(201, 376)
position = Vector2(62.000015, 278)
intent = "powerup"
[node name="CharacterBody2D" parent="." instance=ExtResource("3_lnu2h")]
[node name="Player" parent="." instance=ExtResource("3_lnu2h")]
position = Vector2(96, 206)
[node name="TimerLabel" type="Label" parent="."]
@@ -376,5 +379,9 @@ position = Vector2(-34, 284)
[node name="Slime" parent="Enemies" instance=ExtResource("13_kvuet")]
position = Vector2(71, 213)
[node name="CanvasLayer" type="CanvasLayer" parent="."]
[node name="UI" parent="CanvasLayer" instance=ExtResource("13_trtic")]
[connection signal="triggerFiredSignal" from="Trigger" to="." method="_on_trigger_fired"]
[connection signal="triggerFiredSignal" from="Trigger2" to="." method="_on_trigger_fired"]
+113 -3
View File
@@ -1,17 +1,75 @@
[gd_scene load_steps=37 format=3 uid="uid://b1yy0sybg66hh"]
[gd_scene load_steps=53 format=3 uid="uid://b1yy0sybg66hh"]
[ext_resource type="Script" uid="uid://bpcy1rfota5tu" path="res://scripts/player.gd" id="1_3vyb7"]
[ext_resource type="Texture2D" uid="uid://c4pynj40whop7" path="res://assets/graphics/player/death/Player Death 64x64.png" id="2_fjrip"]
[ext_resource type="Texture2D" uid="uid://bb6uc2alre1qu" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_g2els"]
[ext_resource type="Texture2D" uid="uid://dr8leuj7yjpmo" path="res://assets/graphics/player/jumpandfall/player jump 48x48.png" id="2_qhqgy"]
[ext_resource type="Texture2D" uid="uid://n60s2ffy25hc" path="res://assets/graphics/player/hurt/Player Hurt 48x48.png" id="3_tuyoq"]
[ext_resource type="Texture2D" uid="uid://gat5giebysdj" path="res://assets/graphics/player/run/player run 48x48.png" id="4_dqkch"]
[ext_resource type="Texture2D" uid="uid://csmss00eyd21r" path="res://assets/graphics/player/shove/Player Punch 64x64.png" id="5_qlg0r"]
[sub_resource type="CircleShape2D" id="CircleShape2D_3vyb7"]
[sub_resource type="AtlasTexture" id="AtlasTexture_jc3p3"]
atlas = ExtResource("2_fjrip")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_hax0n"]
atlas = ExtResource("2_fjrip")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_t4otl"]
atlas = ExtResource("2_fjrip")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_j2b1d"]
atlas = ExtResource("2_fjrip")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_cs1tg"]
atlas = ExtResource("2_fjrip")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_2dvfe"]
atlas = ExtResource("2_fjrip")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_giy8y"]
atlas = ExtResource("2_fjrip")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_fdfoy"]
atlas = ExtResource("2_fjrip")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_hhpqf"]
atlas = ExtResource("2_fjrip")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_g5jhy"]
atlas = ExtResource("2_fjrip")
region = Rect2(432, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_jej6c"]
atlas = ExtResource("2_qhqgy")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_gl8cc"]
atlas = ExtResource("3_tuyoq")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_487ah"]
atlas = ExtResource("3_tuyoq")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_md1ol"]
atlas = ExtResource("3_tuyoq")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_bj30b"]
atlas = ExtResource("3_tuyoq")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
atlas = ExtResource("2_g2els")
region = Rect2(0, 0, 48, 48)
@@ -128,6 +186,41 @@ region = Rect2(448, 0, 64, 64)
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_jc3p3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hax0n")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_t4otl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j2b1d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cs1tg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2dvfe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_giy8y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fdfoy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hhpqf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_g5jhy")
}],
"loop": false,
"name": &"death",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_jej6c")
}],
"loop": false,
@@ -136,6 +229,23 @@ animations = [{
}, {
"frames": [{
"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")
}],
"loop": false,
"name": &"hurt",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qhqgy")
}, {
"duration": 1.0,
@@ -268,9 +378,9 @@ one_shot = true
position = Vector2(1, -3)
scale = Vector2(1, 0.8064177)
sprite_frames = SubResource("SpriteFrames_jej6c")
animation = &"shove"
animation = &"death"
autoplay = "idle"
frame = 7
frame = 9
frame_progress = 1.0
[node name="Camera2D" type="Camera2D" parent="."]
+1 -1
View File
@@ -46,7 +46,7 @@ size = Vector2(14, 14)
texture_filter = 1
script = ExtResource("1_p2gj0")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
[node name="SlimeGraphic" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_fd6lc")
animation = &"idle"
autoplay = "idle"
+47
View File
@@ -0,0 +1,47 @@
[gd_scene load_steps=2 format=3 uid="uid://ck553kksdq0ku"]
[ext_resource type="Script" uid="uid://nc5d7xcrrsgu" path="res://scripts/ui.gd" id="1_nt7q6"]
[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_nt7q6")
[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="MarginContainer2" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="Timer" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer2"]
layout_mode = 2
text = "Timer"
horizontal_alignment = 1
[node name="MarginContainer3" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="Coins" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer3"]
layout_mode = 2
text = "Coins"
horizontal_alignment = 2