[gd_scene load_steps=5 format=2]

[ext_resource path="res://objects/key/key.gd" type="Script" id=2]
[ext_resource path="res://objects/key/assets/key.wav" type="AudioStream" id=3]

[sub_resource type="Animation" id=1]
resource_name = "default"
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath(".:offset")
tracks/0/interp = 1
tracks/0/loop_wrap = false
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5, 1 ),
"transitions": PoolRealArray( 0.5, 0.5, 0 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( 0, -10 ), Vector2( 0, 0 ) ]
}

[sub_resource type="CircleShape2D" id=2]
radius = 35.0

[node name="Key" type="StaticBody2D"]
z_index = -10
collision_layer = 8
collision_mask = 0
script = ExtResource( 2 )

[node name="Sprite" type="Sprite" parent="."]

[node name="AnimationPlayer" type="AnimationPlayer" parent="Sprite"]
anims/default = SubResource( 1 )

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

[node name="PlayerCollision" type="Area2D" parent="."]
collision_layer = 8

[node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerCollision"]
shape = SubResource( 2 )

[node name="SoundCollected" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 3 )
volume_db = -12.0

[connection signal="body_entered" from="PlayerCollision" to="." method="_on_PlayerCollision"]
[connection signal="finished" from="SoundCollected" to="." method="_on_SoundCollected_finished"]
