[gd_scene load_steps=9 format=3 uid="uid://cd41woj0pbi3i"]

[ext_resource type="Script" uid="uid://g7xfxov8ken4" path="res://escenas/enemigos/spike_ball.gd" id="1_il0nj"]
[ext_resource type="PackedScene" uid="uid://jbwbta7er8cn" path="res://escenas/enemigos/One_chain.tscn" id="2_4asl6"]
[ext_resource type="Texture2D" uid="uid://cs8qdcsnq0g8b" path="res://assets/Free/Traps/Spiked Ball/Spiked Ball.png" id="2_il0nj"]

[sub_resource type="CircleShape2D" id="CircleShape2D_il0nj"]
radius = 25.079872

[sub_resource type="CircleShape2D" id="CircleShape2D_4asl6"]
radius = 25.019993

[sub_resource type="Animation" id="Animation_il0nj"]
resource_name = "regular_move"
length = 5.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 6.2831855]
}

[sub_resource type="Animation" id="Animation_4asl6"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_hh4xe"]
_data = {
&"RESET": SubResource("Animation_4asl6"),
&"regular_move": SubResource("Animation_il0nj")
}

[node name="SpikeBall" type="Node2D"]
script = ExtResource("1_il0nj")

[node name="OneChain" parent="." instance=ExtResource("2_4asl6")]

[node name="SpikedBall" type="Sprite2D" parent="."]
position = Vector2(0, 25.000002)
scale = Vector2(1.8928572, 1.75)
texture = ExtResource("2_il0nj")

[node name="Area_colision_with_map" type="Area2D" parent="SpikedBall"]
position = Vector2(-2.8312206e-07, -14.5)
scale = Vector2(0.5, 0.5)

[node name="CollisionShape2D" type="CollisionShape2D" parent="SpikedBall/Area_colision_with_map"]
position = Vector2(0, 30)
shape = SubResource("CircleShape2D_il0nj")

[node name="damage_zone" type="Area2D" parent="SpikedBall/Area_colision_with_map"]
collision_layer = 2
collision_mask = 16

[node name="CollisionShape2D" type="CollisionShape2D" parent="SpikedBall/Area_colision_with_map/damage_zone"]
position = Vector2(0, 30)
shape = SubResource("CircleShape2D_4asl6")

[node name="raycast_floor_detection" type="RayCast2D" parent="."]
target_position = Vector2(0, 54)

[node name="safeTime" type="Timer" parent="."]

[node name="animation_rotation" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_hh4xe")
}

[connection signal="body_entered" from="SpikedBall/Area_colision_with_map" to="." method="_on_area_colision_with_map_body_entered"]
[connection signal="timeout" from="safeTime" to="." method="_on_safe_time_timeout"]
