[gd_scene load_steps=55 format=3 uid="uid://bpg6ye1abah3g"] [ext_resource type="Script" path="res://Scenes/Entities/Enemies/Snake.gd" id="1_h5f33"] [ext_resource type="Texture2D" uid="uid://cypaci6jxhxsj" path="res://Assets/Enemies/Snake_down_01.png" id="2_en6kb"] [ext_resource type="Texture2D" uid="uid://bn5ueyfn3asnc" path="res://Assets/Enemies/Snake_death.png" id="2_hsp6b"] [ext_resource type="Texture2D" uid="uid://b5rvgttltyven" path="res://Assets/Enemies/Snake_down_02.png" id="3_gjbw3"] [ext_resource type="Texture2D" uid="uid://cpl4n4jmgiwrv" path="res://Assets/Enemies/Enemy_death_01_01.png" id="3_wuqrr"] [ext_resource type="Texture2D" uid="uid://cive10sqmjo2m" path="res://Assets/Enemies/Snake_down_03.png" id="4_c5itv"] [ext_resource type="Texture2D" uid="uid://d2gk5amafhctu" path="res://Assets/Enemies/Enemy_death_01_02.png" id="4_eidva"] [ext_resource type="Texture2D" uid="uid://dqwxq3g3aph4i" path="res://Assets/Enemies/Enemy_death_01_03.png" id="5_sfv8a"] [ext_resource type="Texture2D" uid="uid://csuf0rfj4hk3j" path="res://Assets/Enemies/Snake_left_01.png" id="5_sg6fb"] [ext_resource type="Texture2D" uid="uid://uoj5222vlq8q" path="res://Assets/Enemies/Enemy_death_01_04.png" id="6_jbbsf"] [ext_resource type="Texture2D" uid="uid://dqfoqshawtnwm" path="res://Assets/Enemies/Snake_left_02.png" id="6_sc476"] [ext_resource type="Texture2D" uid="uid://cwyhl4ykqy0n7" path="res://Assets/Enemies/Snake_left_03.png" id="7_40rym"] [ext_resource type="Texture2D" uid="uid://cxx2vv1ohiw07" path="res://Assets/Enemies/Enemy_death_01_05.png" id="7_guf5s"] [ext_resource type="Texture2D" uid="uid://cswrpv58ren4f" path="res://Assets/Enemies/Snake_right_01.png" id="8_7lycw"] [ext_resource type="Texture2D" uid="uid://b2rl0d5ivdvn4" path="res://Assets/Enemies/Snake_right_02.png" id="9_jalnm"] [ext_resource type="Texture2D" uid="uid://n8uednsjk6b1" path="res://Assets/Enemies/Snake_right_03.png" id="10_ecduy"] [ext_resource type="Texture2D" uid="uid://bi2u8uf22x66v" path="res://Assets/Enemies/Snake_up_01.png" id="11_rtkup"] [ext_resource type="Texture2D" uid="uid://33h3hla14uqm" path="res://Assets/Enemies/Snake_bite_down_01.png" id="11_y0yuq"] [ext_resource type="Texture2D" uid="uid://xxi1cq4pvdl" path="res://Assets/Enemies/Snake_bite_down_02.png" id="12_4h16w"] [ext_resource type="Texture2D" uid="uid://b8ld0ln4iquhc" path="res://Assets/Enemies/Snake_up_02.png" id="12_eyhtl"] [ext_resource type="Texture2D" uid="uid://dpc8aoe5as3vb" path="res://Assets/Enemies/Snake_bite_down_03.png" id="13_pfxrj"] [ext_resource type="Texture2D" uid="uid://osy613yub321" path="res://Assets/Enemies/Snake_up_03.png" id="13_y6ve5"] [ext_resource type="Texture2D" uid="uid://dssta2jqwe8o" path="res://Assets/Enemies/Snake_bite_down_04.png" id="14_5apeq"] [ext_resource type="PackedScene" uid="uid://cq7yj2av01tqd" path="res://Scenes/Entities/Enemies/Components/Movement.tscn" id="14_ab70e"] [ext_resource type="PackedScene" uid="uid://ce3vv2pod6auc" path="res://Scenes/Entities/Enemies/Components/Collision.tscn" id="15_mm88w"] [ext_resource type="Texture2D" uid="uid://ljutjpsw6jv7" path="res://Assets/Enemies/Snake_full_down_01.png" id="15_x3mge"] [ext_resource type="PackedScene" uid="uid://b3i372vgdbxk" path="res://Scenes/Entities/Enemies/Components/Health.tscn" id="16_0dow6"] [ext_resource type="Texture2D" uid="uid://l5du3vt4nusk" path="res://Assets/Enemies/Snake_full_down_02.png" id="16_vjet0"] [ext_resource type="Texture2D" uid="uid://ogb404prqs4w" path="res://Assets/Enemies/Snake_full_down_03.png" id="17_1qbr6"] [ext_resource type="Texture2D" uid="uid://ds34ow5ju743x" path="res://Assets/Enemies/Snake_shrink_down.png" id="18_ybkp8"] [ext_resource type="Texture2D" uid="uid://byrg1wwnx2j76" path="res://Assets/Enemies/Snake_bite_left_01.png" id="22_mtrrd"] [ext_resource type="Texture2D" uid="uid://dpp2ug4a647uj" path="res://Assets/Enemies/Snake_bite_left_02.png" id="23_1576u"] [ext_resource type="Texture2D" uid="uid://dem758o6o7wkc" path="res://Assets/Enemies/Snake_bite_left_03.png" id="24_stadt"] [ext_resource type="Texture2D" uid="uid://oxilj52s31pr" path="res://Assets/Enemies/Snake_full_left_01.png" id="25_2ntrh"] [ext_resource type="Texture2D" uid="uid://c6htr1keocnh8" path="res://Assets/Enemies/Snake_full_left_02.png" id="26_vp11f"] [ext_resource type="Texture2D" uid="uid://b8xoqf1mn0msw" path="res://Assets/Enemies/Snake_full_left_03.png" id="27_6np6x"] [ext_resource type="Texture2D" uid="uid://dign0a7vhai7v" path="res://Assets/Enemies/Snake_shrink_left.png" id="28_7fu21"] [ext_resource type="Texture2D" uid="uid://v74mnwccruy5" path="res://Assets/Enemies/Snake_bite_right_01.png" id="32_gsu2j"] [ext_resource type="Texture2D" uid="uid://bgpygm3dhfnke" path="res://Assets/Enemies/Snake_bite_right_02.png" id="33_2qv3t"] [ext_resource type="Texture2D" uid="uid://brj0tvwn6yqpn" path="res://Assets/Enemies/Snake_bite_right_03.png" id="34_gf2fa"] [ext_resource type="Texture2D" uid="uid://dwp484rrsq6rd" path="res://Assets/Enemies/Snake_full_right_01.png" id="35_6rebf"] [ext_resource type="Texture2D" uid="uid://cep7jpug03ju7" path="res://Assets/Enemies/Snake_full_right_02.png" id="36_f8mis"] [ext_resource type="Texture2D" uid="uid://dv0rhkw7012nf" path="res://Assets/Enemies/Snake_full_right_03.png" id="37_rsbv2"] [ext_resource type="Texture2D" uid="uid://bta6ffkouymtr" path="res://Assets/Enemies/Snake_shrink_right.png" id="38_mxcmv"] [ext_resource type="Texture2D" uid="uid://p1wwaipiidpk" path="res://Assets/Enemies/Snake_bite_up_01.png" id="42_gg2ke"] [ext_resource type="Texture2D" uid="uid://lyocxvmujulv" path="res://Assets/Enemies/Snake_bite_up_02.png" id="43_x72jq"] [ext_resource type="Texture2D" uid="uid://dlu76im4x6ih5" path="res://Assets/Enemies/Snake_bite_up_03.png" id="44_xrna7"] [ext_resource type="Texture2D" uid="uid://bvd14glih8rp7" path="res://Assets/Enemies/Snake_full_up_01.png" id="45_f3csq"] [ext_resource type="Texture2D" uid="uid://2hf7tus6n73i" path="res://Assets/Enemies/Snake_full_up_02.png" id="46_n7us6"] [ext_resource type="Texture2D" uid="uid://05siba3xdcnn" path="res://Assets/Enemies/Snake_full_up_03.png" id="47_kwyk6"] [ext_resource type="Texture2D" uid="uid://co4dwdeo3su3g" path="res://Assets/Enemies/Snake_shrink_up.png" id="48_w8b5g"] [sub_resource type="SpriteFrames" id="SpriteFrames_jpiqi"] animations = [{ "frames": [{ "duration": 1.0, "texture": ExtResource("2_hsp6b") }], "loop": false, "name": &"death", "speed": 1.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("3_wuqrr") }, { "duration": 1.0, "texture": ExtResource("4_eidva") }, { "duration": 1.0, "texture": ExtResource("5_sfv8a") }, { "duration": 1.0, "texture": ExtResource("6_jbbsf") }, { "duration": 1.0, "texture": ExtResource("7_guf5s") }], "loop": false, "name": &"death_post", "speed": 5.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("2_en6kb") }, { "duration": 1.0, "texture": ExtResource("3_gjbw3") }, { "duration": 1.0, "texture": ExtResource("4_c5itv") }, { "duration": 1.0, "texture": ExtResource("3_gjbw3") }], "loop": true, "name": &"down", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("11_y0yuq") }, { "duration": 1.0, "texture": ExtResource("12_4h16w") }, { "duration": 1.0, "texture": ExtResource("13_pfxrj") }, { "duration": 1.0, "texture": ExtResource("14_5apeq") }], "loop": false, "name": &"down_bite", "speed": 3.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("15_x3mge") }, { "duration": 1.0, "texture": ExtResource("16_vjet0") }, { "duration": 1.0, "texture": ExtResource("17_1qbr6") }, { "duration": 1.0, "texture": ExtResource("16_vjet0") }], "loop": true, "name": &"down_full", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("17_1qbr6") }, { "duration": 1.0, "texture": ExtResource("18_ybkp8") }, { "duration": 1.0, "texture": ExtResource("4_c5itv") }], "loop": false, "name": &"down_shrink", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("5_sg6fb") }, { "duration": 1.0, "texture": ExtResource("6_sc476") }, { "duration": 1.0, "texture": ExtResource("7_40rym") }, { "duration": 1.0, "texture": ExtResource("6_sc476") }], "loop": true, "name": &"left", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("22_mtrrd") }, { "duration": 1.0, "texture": ExtResource("23_1576u") }, { "duration": 1.0, "texture": ExtResource("24_stadt") }], "loop": false, "name": &"left_bite", "speed": 3.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("25_2ntrh") }, { "duration": 1.0, "texture": ExtResource("26_vp11f") }, { "duration": 1.0, "texture": ExtResource("27_6np6x") }, { "duration": 1.0, "texture": ExtResource("26_vp11f") }], "loop": true, "name": &"left_full", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("26_vp11f") }, { "duration": 1.0, "texture": ExtResource("28_7fu21") }, { "duration": 1.0, "texture": ExtResource("6_sc476") }], "loop": false, "name": &"left_shrink", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("8_7lycw") }, { "duration": 1.0, "texture": ExtResource("9_jalnm") }, { "duration": 1.0, "texture": ExtResource("10_ecduy") }, { "duration": 1.0, "texture": ExtResource("9_jalnm") }], "loop": true, "name": &"right", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("32_gsu2j") }, { "duration": 1.0, "texture": ExtResource("33_2qv3t") }, { "duration": 1.0, "texture": ExtResource("34_gf2fa") }], "loop": false, "name": &"right_bite", "speed": 3.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("35_6rebf") }, { "duration": 1.0, "texture": ExtResource("36_f8mis") }, { "duration": 1.0, "texture": ExtResource("37_rsbv2") }, { "duration": 1.0, "texture": ExtResource("36_f8mis") }], "loop": true, "name": &"right_full", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("36_f8mis") }, { "duration": 1.0, "texture": ExtResource("38_mxcmv") }, { "duration": 1.0, "texture": ExtResource("9_jalnm") }], "loop": false, "name": &"right_shrink", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("11_rtkup") }, { "duration": 1.0, "texture": ExtResource("12_eyhtl") }, { "duration": 1.0, "texture": ExtResource("13_y6ve5") }, { "duration": 1.0, "texture": ExtResource("12_eyhtl") }], "loop": true, "name": &"up", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("42_gg2ke") }, { "duration": 1.0, "texture": ExtResource("43_x72jq") }, { "duration": 1.0, "texture": ExtResource("44_xrna7") }], "loop": false, "name": &"up_bite", "speed": 3.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("45_f3csq") }, { "duration": 1.0, "texture": ExtResource("46_n7us6") }, { "duration": 1.0, "texture": ExtResource("47_kwyk6") }, { "duration": 1.0, "texture": ExtResource("46_n7us6") }], "loop": true, "name": &"up_full", "speed": 6.0 }, { "frames": [{ "duration": 1.0, "texture": ExtResource("45_f3csq") }, { "duration": 1.0, "texture": ExtResource("48_w8b5g") }, { "duration": 1.0, "texture": ExtResource("12_eyhtl") }], "loop": false, "name": &"up_shrink", "speed": 6.0 }] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_1dh0q"] radius = 6.0 height = 14.0 [sub_resource type="RectangleShape2D" id="RectangleShape2D_7ji0i"] [node name="Snake" type="CharacterBody2D"] collision_layer = 16 collision_mask = 188 script = ExtResource("1_h5f33") [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] sprite_frames = SubResource("SpriteFrames_jpiqi") animation = &"down" [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CapsuleShape2D_1dh0q") [node name="Rays" type="Node2D" parent="."] [node name="Down" type="RayCast2D" parent="Rays"] target_position = Vector2(0, 56) collision_mask = 12 [node name="Up" type="RayCast2D" parent="Rays"] target_position = Vector2(0, -56) collision_mask = 12 [node name="Left" type="RayCast2D" parent="Rays"] target_position = Vector2(-56, 0) collision_mask = 12 [node name="Right" type="RayCast2D" parent="Rays"] target_position = Vector2(56, 0) collision_mask = 12 [node name="DetectionArea" type="Area2D" parent="."] collision_layer = 0 collision_mask = 4 [node name="CollisionShape2D" type="CollisionShape2D" parent="DetectionArea"] shape = SubResource("RectangleShape2D_7ji0i") [node name="Movement" parent="." instance=ExtResource("14_ab70e")] entityPath = NodePath("..") spritePath = NodePath("../AnimatedSprite2D") timer_time = 2.0 follows = true follow_chance = 80 [node name="Collision" parent="." instance=ExtResource("15_mm88w")] entityPath = NodePath("..") collision_shape_path = NodePath("../CollisionShape2D") component_health_path = NodePath("../Health") [node name="Health" parent="." instance=ExtResource("16_0dow6")] entityPath = NodePath("..") spritePath = NodePath("../AnimatedSprite2D") component_movement_path = NodePath("../Movement") health = 1 drop_chance = 50 [node name="Timer" type="Timer" parent="."] wait_time = 5.0 one_shot = true [connection signal="body_entered" from="DetectionArea" to="." method="_on_detection_area_body_entered"] [connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]