mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-14 06:15:54 +00:00
Destroyable chests
This commit is contained in:
parent
f1f542efc4
commit
80e0eda977
14 changed files with 253 additions and 27 deletions
|
|
@ -1,7 +1,10 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://djf0y08ix66fn"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://djf0y08ix66fn"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cqh7bh0s374ac" path="res://Scripts/Chest.cs" id="1_cwpn7"]
|
||||
[ext_resource type="Texture2D" uid="uid://qeh4ai8h6sw5" path="res://Sprites/Chest.png" id="2_w7a1a"]
|
||||
[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"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_ihal6"]
|
||||
radius = 16.0
|
||||
|
|
@ -74,6 +77,9 @@ animations = [{
|
|||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_isrvb"]
|
||||
size = Vector2(12, 10)
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_7lp3q"]
|
||||
radius = 7.0
|
||||
|
||||
[node name="Chest" type="Area2D" groups=["Interactable"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
|
|
@ -96,3 +102,20 @@ gravity_scale = 0.0
|
|||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
|
||||
position = Vector2(0, -3)
|
||||
shape = SubResource("RectangleShape2D_isrvb")
|
||||
|
||||
[node name="DamageReceiver" type="Area2D" parent="." node_paths=PackedStringArray("HealthProvider")]
|
||||
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"
|
||||
MaxResource = 8.0
|
||||
|
||||
[connection signal="area_entered" from="DamageReceiver" to="DamageReceiver" method="_on_damage_hitbox_area_entered"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue