[gd_scene load_steps=4 format=3 uid="uid://d0okbjqyaoe0w"]

[ext_resource type="Script" uid="uid://cn4hlmm4qa8fg" path="res://Scripts/snake_part.gd" id="1_iuiyg"]
[ext_resource type="Texture2D" uid="uid://b0can5myhke8s" path="res://Sprites/snake_straight.png" id="2_hf2pu"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_hf2pu"]
size = Vector2(18, 18)

[node name="SnakePart" type="Area2D" groups=["BlocksSpawn"]]
script = ExtResource("1_iuiyg")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_hf2pu")

[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_hf2pu")

[node name="DownRayCast2D" type="RayCast2D" parent="."]
target_position = Vector2(0, 60)
collide_with_areas = true

[node name="LeftRayCast2D" type="RayCast2D" parent="."]
target_position = Vector2(-60, 0)
collide_with_areas = true

[node name="UpRayCast2D" type="RayCast2D" parent="."]
target_position = Vector2(0, -60)
collide_with_areas = true

[node name="RightRayCast2D" type="RayCast2D" parent="."]
target_position = Vector2(60, 0)
collide_with_areas = true
