[gd_scene load_steps=21 format=3 uid="uid://c0f4soyktwplm"]

[ext_resource type="Script" path="res://scripts/coin.gd" id="1_qvwa1"]
[ext_resource type="Texture2D" uid="uid://bped01tsjeycn" path="res://assets/sprites/coin.png" id="1_smegh"]
[ext_resource type="AudioStream" uid="uid://hxv3svfwkg67" path="res://assets/sounds/coin.wav" id="3_khddo"]

[sub_resource type="AtlasTexture" id="AtlasTexture_g2ywy"]
atlas = ExtResource("1_smegh")
region = Rect2(0, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_ik3tw"]
atlas = ExtResource("1_smegh")
region = Rect2(16, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_bjy3d"]
atlas = ExtResource("1_smegh")
region = Rect2(32, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_kpo2v"]
atlas = ExtResource("1_smegh")
region = Rect2(48, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_u2kfk"]
atlas = ExtResource("1_smegh")
region = Rect2(64, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_ci3xo"]
atlas = ExtResource("1_smegh")
region = Rect2(80, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_26bph"]
atlas = ExtResource("1_smegh")
region = Rect2(96, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_5mlwc"]
atlas = ExtResource("1_smegh")
region = Rect2(112, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_qbma7"]
atlas = ExtResource("1_smegh")
region = Rect2(128, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_it8gd"]
atlas = ExtResource("1_smegh")
region = Rect2(144, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_5eyw5"]
atlas = ExtResource("1_smegh")
region = Rect2(160, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_cybqp"]
atlas = ExtResource("1_smegh")
region = Rect2(176, 0, 16, 16)

[sub_resource type="SpriteFrames" id="SpriteFrames_l64mr"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_g2ywy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ik3tw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bjy3d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kpo2v")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_u2kfk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ci3xo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_26bph")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5mlwc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qbma7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_it8gd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5eyw5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cybqp")
}],
"loop": true,
"name": &"spinnycoin",
"speed": 10.0
}]

[sub_resource type="CircleShape2D" id="CircleShape2D_hwfwr"]
radius = 5.0

[sub_resource type="Animation" id="Animation_udfc6"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimatedSprite2D:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CollisionShape2D:disabled")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("PickupSound:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}

[sub_resource type="Animation" id="Animation_gfhk0"]
resource_name = "pickup"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimatedSprite2D:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CollisionShape2D:disabled")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("PickupSound:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(1),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_a7gs7"]
_data = {
"RESET": SubResource("Animation_udfc6"),
"pickup": SubResource("Animation_gfhk0")
}

[node name="Coin" type="Area2D"]
collision_mask = 2
script = ExtResource("1_qvwa1")

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_l64mr")
animation = &"spinnycoin"
autoplay = "spinnycoin"

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

[node name="PickupSound" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("3_khddo")
bus = &"SFX"

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

[connection signal="body_entered" from="." to="." method="_on_body_entered"]
