[gd_scene load_steps=6 format=2]

[ext_resource path="res://assets/Traps/mask_trap.png" type="Texture" id=1]
[ext_resource path="res://src/Hazards/MaskTrap.gd" type="Script" id=2]

[sub_resource type="Animation" id=1]
resource_name = "armed"
length = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite: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": 1,
"values": [ 1 ]
}

[sub_resource type="Animation" id=2]
resource_name = "fire"
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite: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 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 1, 2, 3, 4 ]
}
tracks/1/type = "method"
tracks/1/path = NodePath(".")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.1, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [  ],
"method": "play_sfx"
}, {
"args": [  ],
"method": "_on_fire_animation_ended"
} ]
}

[sub_resource type="Animation" id=3]
resource_name = "idle"
length = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite: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": 1,
"values": [ 0 ]
}

[node name="MaskTrap" type="Node2D"]
z_index = 1
script = ExtResource( 2 )

[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 7, -8 )
texture = ExtResource( 1 )
hframes = 6
frame = 3

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "armed"
anims/armed = SubResource( 1 )
anims/fire = SubResource( 2 )
anims/idle = SubResource( 3 )

[node name="TopRayCast" type="RayCast2D" parent="."]
position = Vector2( 3, -14 )
enabled = true
cast_to = Vector2( 150, 0 )
collision_mask = 9

[node name="BottomRayCast" type="RayCast2D" parent="."]
position = Vector2( 3, -2 )
enabled = true
cast_to = Vector2( 150, 0 )
collision_mask = 9

[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
position = Vector2( 7, -8 )

[node name="TimeoutTimer" type="Timer" parent="."]
one_shot = true
[connection signal="timeout" from="TimeoutTimer" to="." method="_on_TimeoutTimer_timeout"]
