[gd_scene format=3 uid="uid://dcnueh1qtnvgh"] [ext_resource type="Script" uid="uid://rtq2bo02xen7" path="res://scene/code/block_damage.gd" id="1_1oqap"] [ext_resource type="Texture2D" uid="uid://05qf4yx10qc" path="res://Free/Traps/Rock Head/Blink (42x42).png" id="1_eh2y1"] [ext_resource type="Texture2D" uid="uid://cchy4b1qbnamx" path="res://Free/Traps/Rock Head/Bottom Hit (42x42).png" id="2_xbdxa"] [ext_resource type="Texture2D" uid="uid://02eok5r7h1xi" path="res://Free/Traps/Rock Head/Idle.png" id="3_1oqap"] [sub_resource type="AtlasTexture" id="AtlasTexture_qnsxg"] atlas = ExtResource("1_eh2y1") region = Rect2(0, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_hbt8y"] atlas = ExtResource("1_eh2y1") region = Rect2(42, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_lugia"] atlas = ExtResource("1_eh2y1") region = Rect2(84, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_v5kt5"] atlas = ExtResource("1_eh2y1") region = Rect2(126, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_07jbt"] atlas = ExtResource("2_xbdxa") region = Rect2(126, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_8mo0w"] atlas = ExtResource("2_xbdxa") region = Rect2(84, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_7xf5o"] atlas = ExtResource("2_xbdxa") region = Rect2(42, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_kc8jy"] atlas = ExtResource("2_xbdxa") region = Rect2(0, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_ukd6c"] atlas = ExtResource("3_1oqap") region = Rect2(0, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_xbdxa"] atlas = ExtResource("1_eh2y1") region = Rect2(126, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_1oqap"] atlas = ExtResource("1_eh2y1") region = Rect2(84, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_n7kpi"] atlas = ExtResource("1_eh2y1") region = Rect2(42, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_b7vjl"] atlas = ExtResource("1_eh2y1") region = Rect2(0, 0, 42, 42) [sub_resource type="AtlasTexture" id="AtlasTexture_nyn3m"] atlas = ExtResource("1_eh2y1") region = Rect2(0, 0, 42, 42) [sub_resource type="SpriteFrames" id="SpriteFrames_rby76"] animations = [{ "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_qnsxg") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_hbt8y") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_lugia") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_v5kt5") }], "loop": 0, "name": &"BLINK", "speed": 5.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_07jbt") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_8mo0w") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_7xf5o") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_kc8jy") }], "loop": 0, "name": &"HIT", "speed": 15.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_ukd6c") }], "loop": 0, "name": &"IDLE", "speed": 5.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_xbdxa") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_1oqap") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_n7kpi") }, { "duration": 1.0, "texture": SubResource("AtlasTexture_b7vjl") }], "loop": 0, "name": &"NOBLINK", "speed": 5.0 }, { "frames": [{ "duration": 1.0, "texture": SubResource("AtlasTexture_nyn3m") }], "loop": 1, "name": &"SLEEP", "speed": 5.0 }] [sub_resource type="GDScript" id="GDScript_xbdxa"] script/source = "extends Area2D # Called when the node enters the scene tree for the first time. func _ready() -> void: pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: pass " [sub_resource type="RectangleShape2D" id="RectangleShape2D_rby76"] size = Vector2(550, 348) [sub_resource type="RectangleShape2D" id="RectangleShape2D_ymnsx"] size = Vector2(78, 243) [sub_resource type="RectangleShape2D" id="RectangleShape2D_2cec8"] size = Vector2(32, 32) [sub_resource type="RectangleShape2D" id="RectangleShape2D_njdnk"] size = Vector2(34, 34) [node name="Block_damage" type="CharacterBody2D" unique_id=369538996] script = ExtResource("1_1oqap") [node name="Block_damage_animation" type="AnimatedSprite2D" parent="." unique_id=1724791440] sprite_frames = SubResource("SpriteFrames_rby76") animation = &"NOBLINK" [node name="Area2D_observe" type="Area2D" parent="." unique_id=310497332] collision_mask = 3 script = SubResource("GDScript_xbdxa") [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D_observe" unique_id=569498363] position = Vector2(0, 108) shape = SubResource("RectangleShape2D_rby76") [node name="Area2D_damage" type="Area2D" parent="." unique_id=805391396] collision_mask = 3 [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D_damage" unique_id=1319230308] modulate = Color(1, 1, 0.1764706, 1) position = Vector2(0, 106.5) shape = SubResource("RectangleShape2D_ymnsx") [node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1529567861] shape = SubResource("RectangleShape2D_2cec8") [node name="Area2D_take_damage" type="Area2D" parent="." unique_id=141371173] collision_mask = 3 [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D_take_damage" unique_id=612959925] shape = SubResource("RectangleShape2D_njdnk") debug_color = Color(0.8259426, 0.0015975559, 0.95522326, 0.41960785) [connection signal="body_entered" from="Area2D_observe" to="." method="_on_area_2d_observe_body_entered"] [connection signal="body_exited" from="Area2D_observe" to="." method="_on_area_2d_observe_body_exited"] [connection signal="body_entered" from="Area2D_damage" to="." method="_on_area_2d_damage_body_entered"] [connection signal="body_entered" from="Area2D_take_damage" to="." method="_on_area_2d_take_damage_body_entered"]