[gd_scene load_steps=8 format=3 uid="uid://bwoeu7ask0fck"] [ext_resource type="Script" uid="uid://b5cqo12km1nh3" path="res://prefabs/snake_segment.gd" id="1_3ulhv"] [ext_resource type="Texture2D" uid="uid://l8x3dp68yyxr" path="res://assets/segement.png" id="1_6uqch"] [ext_resource type="Script" uid="uid://deq18nev0kwbg" path="res://addons/godot-donut-collision-polygon-2d-7780d026ae3d4a37fe68f43cc1f97ba664dd775d/addons/donut_collision_polygon2D/donut_collision_polygon2D.gd" id="2_3ulhv"] [ext_resource type="Script" uid="uid://be6ituviy74ta" path="res://prefabs/door.gd" id="4_08kyq"] [ext_resource type="Texture2D" uid="uid://cay1k1dp8yf12" path="res://assets/door.png" id="4_34t3n"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_08kyq"] size = Vector2(16, 64) [sub_resource type="CircleShape2D" id="CircleShape2D_08kyq"] radius = 50.0 [node name="SnakeSegment" type="AnimatableBody2D" node_paths=PackedStringArray("door")] script = ExtResource("1_3ulhv") door = NodePath("DoorArm") [node name="Sprite2D" type="Sprite2D" parent="."] texture = ExtResource("1_6uqch") [node name="DonutCollisionPolygon2D" type="CollisionPolygon2D" parent="."] polygon = PackedVector2Array(9.85808e-15, -161, 31.4095, -157.906, 61.612, -148.745, 89.4468, -133.867, 113.844, -113.844, 133.867, -89.4468, 148.745, -61.612, 157.906, -31.4095, 161, 0, 157.906, 31.4095, 148.745, 61.612, 133.867, 89.4468, 113.844, 113.844, 89.4468, 133.867, 61.612, 148.745, 31.4095, 157.906, 9.85808e-15, 161, -31.4095, 157.906, -61.612, 148.745, -89.4468, 133.867, -113.844, 113.844, -133.867, 89.4468, -148.745, 61.612, -157.906, 31.4095, -161, 1.97162e-14, -157.906, -31.4095, -148.745, -61.612, -133.867, -89.4468, -113.844, -113.844, -89.4468, -133.867, -61.612, -148.745, -31.4095, -157.906, -2.95742e-14, -161, -2.92069e-14, -159, -31.0194, -155.945, -60.8467, -146.897, -88.3357, -132.204, -112.43, -112.43, -132.204, -88.3357, -146.897, -60.8467, -155.945, -31.0194, -159, 1.94712e-14, -155.945, 31.0194, -146.897, 60.8467, -132.204, 88.3357, -112.43, 112.43, -88.3357, 132.204, -60.8467, 146.897, -31.0194, 155.945, 9.73562e-15, 159, 31.0194, 155.945, 60.8467, 146.897, 88.3357, 132.204, 112.43, 112.43, 132.204, 88.3357, 146.897, 60.8467, 155.945, 31.0194, 159, 0, 155.945, -31.0194, 146.897, -60.8467, 132.204, -88.3357, 112.43, -112.43, 88.3357, -132.204, 60.8467, -146.897, 31.0194, -155.945, 9.73562e-15, -159, 0.0001, -161) script = ExtResource("2_3ulhv") radius = 160.0 metadata/_custom_type_script = "uid://deq18nev0kwbg" [node name="DoorArm" type="Node2D" parent="." node_paths=PackedStringArray("this_seg", "door_in_node", "door_out_node")] script = ExtResource("4_08kyq") this_seg = NodePath("..") door_in_node = NodePath("Door/DoorIn") door_out_node = NodePath("Door/DoorOut") [node name="Door" type="Node2D" parent="DoorArm"] z_index = 1 position = Vector2(160, 0) [node name="DoorIn" type="Area2D" parent="DoorArm/Door"] position = Vector2(-22, 0) [node name="CollisionShape2D" type="CollisionShape2D" parent="DoorArm/Door/DoorIn"] position = Vector2(6, 0) shape = SubResource("RectangleShape2D_08kyq") [node name="DoorOut" type="Area2D" parent="DoorArm/Door"] position = Vector2(22, 0) rotation = 3.14159 [node name="CollisionShape2D" type="CollisionShape2D" parent="DoorArm/Door/DoorOut"] position = Vector2(6, 1.52111e-05) shape = SubResource("RectangleShape2D_08kyq") [node name="Sprite2D" type="Sprite2D" parent="DoorArm/Door"] texture = ExtResource("4_34t3n") [node name="EatDieBox" type="Area2D" parent="." groups=["snake"]] [node name="CollisionShape2D" type="CollisionShape2D" parent="EatDieBox"] shape = SubResource("CircleShape2D_08kyq") [connection signal="area_entered" from="EatDieBox" to="." method="_on_eat_die_box_area_entered"]