[gd_scene load_steps=5 format=2]

[ext_resource path="res://samagri/coin.png" type="Texture" id=1]
[ext_resource path="res://src/objects/CoinFlip.gd" type="Script" id=2]
[ext_resource path="res://samagri/sfx/coin_pickup.wav" type="AudioStream" id=3]

[sub_resource type="Animation" id=1]
resource_name = "flip"
length = 0.3
tracks/0/type = "value"
tracks/0/path = NodePath("coin:position")
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": 0,
"values": [ Vector2( 0, 0 ), Vector2( 0, -42 ), Vector2( 0, -56 ), Vector2( 0, -84 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("coin:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ 0.0, -180.0, -220.779, -33.9 ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("coin:scale")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 0.1, 1 ), Vector2( 1, 1 ), Vector2( 1, 1 ) ]
}
tracks/3/type = "value"
tracks/3/path = NodePath("coin:self_modulate")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}

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

[node name="coin" type="Sprite" parent="."]
self_modulate = Color( 1, 1, 1, 0 )
position = Vector2( 0, -84 )
rotation = -0.591667
texture = ExtResource( 1 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/flip = SubResource( 1 )

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

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

[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
