[gd_scene load_steps=16 format=3 uid="uid://d3gnwmvds4ors"]

[ext_resource type="Script" uid="uid://bmi5fmguqbdyh" path="res://Scripts/Classes/Entities/Items/SpinningRedCoin.gd" id="1_2dih8"]
[ext_resource type="Texture2D" uid="uid://c8wpxm7b5tgiq" path="res://Assets/Sprites/Items/RedCoin.png" id="2_1ws6h"]
[ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_ke76m"]
[ext_resource type="Script" uid="uid://5octqlf4ohel" path="res://Scripts/Classes/Components/ScoreNoteSpawner.gd" id="3_oosg8"]
[ext_resource type="Script" uid="uid://caq1qiwmy0mox" path="res://Scripts/Parts/BetterAnimatedSprite.gd" id="3_rnpac"]
[ext_resource type="JSON" path="res://Assets/Sprites/Items/RedCoin.json" id="4_rnpac"]

[sub_resource type="AtlasTexture" id="AtlasTexture_lwdcj"]
atlas = ExtResource("2_1ws6h")
region = Rect2(0, 16, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_onh0k"]
atlas = ExtResource("2_1ws6h")
region = Rect2(16, 16, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_1w0wa"]
atlas = ExtResource("2_1ws6h")
region = Rect2(32, 16, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_4qu2r"]
atlas = ExtResource("2_1ws6h")
region = Rect2(48, 16, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_0xloa"]
atlas = ExtResource("2_1ws6h")
region = Rect2(0, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_0r8d3"]
atlas = ExtResource("2_1ws6h")
region = Rect2(16, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_0fjrw"]
atlas = ExtResource("2_1ws6h")
region = Rect2(32, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_ppl3b"]
atlas = ExtResource("2_1ws6h")
region = Rect2(48, 0, 16, 16)

[sub_resource type="SpriteFrames" id="SpriteFrames_oosg8"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_lwdcj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_onh0k")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1w0wa")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4qu2r")
}],
"loop": true,
"name": &"Collected",
"speed": 8.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_0xloa")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0r8d3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0fjrw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ppl3b")
}],
"loop": true,
"name": &"Idle",
"speed": 8.0
}]

[node name="SpinningCoin" type="Node2D"]
visibility_layer = 3
script = ExtResource("1_2dih8")

[node name="Sprite" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -8)
sprite_frames = SubResource("SpriteFrames_oosg8")
animation = &"Idle"
autoplay = "Idle"
frame_progress = 0.49333584
speed_scale = 2.5
script = ExtResource("3_rnpac")
metadata/_custom_type_script = "uid://caq1qiwmy0mox"

[node name="ResourceSetterNew" type="Node" parent="Sprite" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_ke76m")
node_to_affect = NodePath("..")
property_name = "sprite_frames"
resource_json = ExtResource("4_rnpac")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

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

[node name="ScoreNoteSpawner" type="Node" parent="."]
script = ExtResource("3_oosg8")
metadata/_custom_type_script = "uid://5octqlf4ohel"

[connection signal="timeout" from="Timer" to="." method="vanish"]
[connection signal="timeout" from="Timer" to="ScoreNoteSpawner" method="spawn_note" binds= [0, 200]]
