cirnogodot/Scenes/Interactable/Chest.tscn

121 lines
3.5 KiB
Text
Raw Permalink Normal View History

2025-03-12 22:01:45 +01:00
[gd_scene load_steps=16 format=3 uid="uid://djf0y08ix66fn"]
2025-01-28 14:05:38 +01:00
2025-02-24 11:37:45 +01:00
[ext_resource type="Script" uid="uid://cqh7bh0s374ac" path="res://Scripts/Chest.cs" id="1_cwpn7"]
2025-01-28 14:05:38 +01:00
[ext_resource type="Texture2D" uid="uid://qeh4ai8h6sw5" path="res://Sprites/Chest.png" id="2_w7a1a"]
2025-03-12 22:01:45 +01:00
[ext_resource type="Script" uid="uid://cqwvssstkrdmw" path="res://Scripts/Components/Actors/ActorResourceProvider.cs" id="3_s8kek"]
[ext_resource type="Script" uid="uid://cq3hkweplldbr" path="res://Scripts/Components/Actors/GenericDamageReceiver.cs" id="3_u7mm1"]
[ext_resource type="PackedScene" uid="uid://b57ep58h4bs3l" path="res://Scenes/Props/Chest_Broken.tscn" id="4_7lp3q"]
2025-01-28 14:05:38 +01:00
2025-01-29 14:54:01 +01:00
[sub_resource type="CircleShape2D" id="CircleShape2D_ihal6"]
radius = 16.0
2025-01-28 14:05:38 +01:00
[sub_resource type="AtlasTexture" id="AtlasTexture_elja3"]
atlas = ExtResource("2_w7a1a")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_nyoe2"]
atlas = ExtResource("2_w7a1a")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_f10r8"]
atlas = ExtResource("2_w7a1a")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_faho7"]
atlas = ExtResource("2_w7a1a")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_yfpr1"]
atlas = ExtResource("2_w7a1a")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_x1bfm"]
atlas = ExtResource("2_w7a1a")
region = Rect2(16, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_cirgn"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_elja3")
}],
2025-01-30 17:43:39 +01:00
"loop": false,
2025-01-28 14:05:38 +01:00
"name": &"Closed",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_nyoe2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f10r8")
}],
2025-01-30 17:43:39 +01:00
"loop": false,
2025-01-28 14:05:38 +01:00
"name": &"Closing",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_faho7")
}],
2025-01-30 17:43:39 +01:00
"loop": false,
2025-01-28 14:05:38 +01:00
"name": &"Open",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_yfpr1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_x1bfm")
}],
2025-01-30 17:43:39 +01:00
"loop": false,
2025-01-28 14:05:38 +01:00
"name": &"Opening",
"speed": 5.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_isrvb"]
size = Vector2(12, 10)
2025-03-12 22:01:45 +01:00
[sub_resource type="CircleShape2D" id="CircleShape2D_7lp3q"]
radius = 7.0
[node name="Chest" type="Area2D" groups=["Interactable"]]
2025-01-29 14:54:01 +01:00
collision_layer = 4
collision_mask = 2
script = ExtResource("1_cwpn7")
2025-01-29 14:54:01 +01:00
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
2025-02-24 18:35:27 +01:00
visible = false
2025-01-29 14:54:01 +01:00
shape = SubResource("CircleShape2D_ihal6")
2025-01-28 14:05:38 +01:00
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_cirgn")
animation = &"Closed"
2025-04-10 12:00:08 +02:00
[node name="RigidBody2D" type="StaticBody2D" parent="."]
2025-02-24 18:35:27 +01:00
visible = false
2025-01-28 14:05:38 +01:00
collision_layer = 64
collision_mask = 10
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
position = Vector2(0, -3)
shape = SubResource("RectangleShape2D_isrvb")
2025-03-12 22:01:45 +01:00
[node name="DamageReceiver" type="Area2D" parent="." node_paths=PackedStringArray("HealthProvider")]
2025-03-17 13:10:14 +01:00
visible = false
2025-03-12 22:01:45 +01:00
collision_layer = 64
collision_mask = 136
script = ExtResource("3_u7mm1")
HealthProvider = NodePath("Health")
Debris = ExtResource("4_7lp3q")
[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageReceiver"]
shape = SubResource("CircleShape2D_7lp3q")
[node name="Health" type="Node2D" parent="DamageReceiver"]
script = ExtResource("3_s8kek")
ResourceName = "Health"
2025-03-22 17:47:24 +01:00
_maxResource = 8.0
2025-03-12 22:01:45 +01:00
[connection signal="area_entered" from="DamageReceiver" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]