Added trash object savestate

This commit is contained in:
2025-12-16 15:03:27 +01:00
parent 7f58aeae76
commit 13fcf059e9
5 changed files with 85 additions and 25 deletions
+6 -3
View File
@@ -1,7 +1,8 @@
[gd_scene load_steps=17 format=3 uid="uid://sbf12hin4kes"]
[gd_scene load_steps=18 format=3 uid="uid://sbf12hin4kes"]
[ext_resource type="Texture2D" uid="uid://bylgmr0skwtrs" path="res://art/farm/farming/farmobjekte/broken tools atlas.png" id="1_k4ca3"]
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="2_gcgfd"]
[ext_resource type="Script" uid="uid://c2cgj153m05sp" path="res://scripts/CSharp/Common/Interactables/TrashObject.cs" id="2_u7jgg"]
[ext_resource type="AudioStream" uid="uid://be6g8b3v3u1ai" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PickUp_01.wav" id="3_ktmp7"]
[ext_resource type="AudioStream" uid="uid://cgjsajsdrrn0j" path="res://audio/sfx/Kitchen/SFX_Cooking_Knife_PutDown_01.wav" id="4_ic616"]
[ext_resource type="AudioStream" uid="uid://br4drgupled6c" path="res://audio/sfx/Kitchen/SFX_Cooking_Pot_01.wav" id="5_dx175"]
@@ -29,13 +30,15 @@ stream_7/stream = ExtResource("10_aqih4")
stream_8/stream = ExtResource("11_kb03l")
stream_9/stream = ExtResource("12_kka6u")
[node name="trashObject" type="Sprite2D"]
[node name="trashObject" type="Sprite2D" groups=["Saveable"]]
z_index = 1
y_sort_enabled = true
texture = ExtResource("1_k4ca3")
offset = Vector2(1, -215)
region_enabled = true
region_rect = Rect2(44, 479, 356, 503)
script = ExtResource("2_u7jgg")
metadata/SaveID = ""
[node name="InteractionArea" parent="." node_paths=PackedStringArray("_spritesToOutline") instance=ExtResource("2_gcgfd")]
position = Vector2(0, -172)
@@ -51,6 +54,6 @@ script = ExtResource("13_wswkg")
script = ExtResource("14_dx175")
_eventResources = Array[Object]([ExtResource("15_u7jgg")])
[connection signal="Interacted" from="InteractionArea" to="." method="queue_free"]
[connection signal="Interacted" from="InteractionArea" to="." method="Collect"]
[connection signal="Interacted" from="InteractionArea" to="AudioStreamPlayer2D" method="PlayOneShot"]
[connection signal="Interacted" from="InteractionArea" to="PickupAnimationEventRaiser" method="RaiseEvents"]