[gd_scene load_steps=5 format=2]

[ext_resource path="res://assets/Tiles/spikes_trap.png" type="Texture" id=1]
[ext_resource path="res://src/Hazards/Spike.gd" type="Script" id=2]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 8, 6 )

[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 8, 2 )

[node name="Spike" type="Node2D"]
script = ExtResource( 2 )

[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -8 )
texture = ExtResource( 1 )
flip_v = true

[node name="CollisionBody" type="StaticBody2D" parent="."]
collision_layer = 4

[node name="CollisionShape2D" type="CollisionShape2D" parent="CollisionBody"]
position = Vector2( 0, -6 )
shape = SubResource( 1 )

[node name="DangerZone" type="Area2D" parent="."]

[node name="CollisionShape2D" type="CollisionShape2D" parent="DangerZone"]
position = Vector2( 0, -14 )
shape = SubResource( 2 )
one_way_collision = true
[connection signal="body_entered" from="DangerZone" to="." method="_on_DangerZone_body_entered"]
