[gd_scene load_steps=8 format=2]

[ext_resource path="res://assets/obstacle object/SpikyMinePlant.png" type="Texture" id=1]
[ext_resource path="res://src/ObstacleObjects/Mine.gd" type="Script" id=2]

[sub_resource type="Animation" id=2]
length = 0.001
tracks/0/type = "value"
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 4.0 ]
}

[sub_resource type="Animation" id=8]
resource_name = "armed"
length = 1.6
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 22, 23, 24, 25, 26, 27, 28, 29 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ 7.0 ]
}

[sub_resource type="Animation" id=6]
resource_name = "arming"
length = 1.4
tracks/0/type = "value"
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.802038, 0.902195, 1.00219, 1.10219, 1.20219, 1.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.00519588, 0.698901 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ 4.0, 7.0 ]
}

[sub_resource type="Animation" id=3]
resource_name = "unarmed"
length = 0.9
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("../Area2D/CollisionShape2D:shape:radius")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ 4.0 ]
}

[sub_resource type="CircleShape2D" id=7]
resource_local_to_scene = true
radius = 4.0

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

[node name="Sprite" type="Sprite" parent="."]
position = Vector2( -0.5, 0 )
texture = ExtResource( 1 )
hframes = 30

[node name="AnimationPlayer" type="AnimationPlayer" parent="Sprite"]
autoplay = "unarmed"
anims/RESET = SubResource( 2 )
anims/armed = SubResource( 8 )
anims/arming = SubResource( 6 )
anims/unarmed = SubResource( 3 )

[node name="Area2D" type="Area2D" parent="."]
collision_layer = 64

[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 7 )

[node name="Timer" type="Timer" parent="."]
wait_time = 0.1
one_shot = true

[connection signal="animation_finished" from="Sprite/AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]
[connection signal="area_exited" from="Area2D" to="." method="_on_Area2D_area_exited"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
