[gd_scene load_steps=22 format=3 uid="uid://1s3gywmoi20e"]

[ext_resource type="PackedScene" uid="uid://ha6jxf4v5845" path="res://assets/models/characters/gfolf_girl/gfolf_girl.gltf" id="1_j80rr"]
[ext_resource type="Script" path="res://src/characters/player_characters/gfolf_girl/gfolf_girl.gd" id="2_y16an"]
[ext_resource type="Script" path="res://src/util/random_timer.gd" id="3_ex68g"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fokhu"]
albedo_color = Color(0.226707, 0.226707, 0.226707, 1)

[sub_resource type="BoxMesh" id="BoxMesh_363n0"]
material = SubResource("StandardMaterial3D_fokhu")
size = Vector3(0.1, 3.7, 0.1)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bnr0u"]
albedo_color = Color(0.29219, 0.29219, 0.29219, 1)
metallic = 1.0

[sub_resource type="BoxMesh" id="BoxMesh_oll6x"]
material = SubResource("StandardMaterial3D_bnr0u")
size = Vector3(0.1, 0.3, 0.5)

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_f1ltw"]
animation = &"downswing"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_w2lmp"]
animation = &"idle"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_t5rm5"]
animation = &"stand_to_idle"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_mlacs"]
animation = &"upswing"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_xk15a"]
advance_mode = 2

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_gtsjq"]
switch_mode = 2
advance_mode = 2

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_apb2k"]

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_h5bcf"]
xfade_time = 0.4

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ox862"]

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_oblek"]
switch_mode = 2

[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_yepp7"]
states/End/position = Vector2(1028, 100)
states/downswing/node = SubResource("AnimationNodeAnimation_f1ltw")
states/downswing/position = Vector2(862, 100)
states/idle/node = SubResource("AnimationNodeAnimation_w2lmp")
states/idle/position = Vector2(540, 100)
states/stand_to_idle/node = SubResource("AnimationNodeAnimation_t5rm5")
states/stand_to_idle/position = Vector2(367, 100)
states/upswing/node = SubResource("AnimationNodeAnimation_mlacs")
states/upswing/position = Vector2(703, 100)
transitions = ["Start", "stand_to_idle", SubResource("AnimationNodeStateMachineTransition_xk15a"), "stand_to_idle", "idle", SubResource("AnimationNodeStateMachineTransition_gtsjq"), "idle", "upswing", SubResource("AnimationNodeStateMachineTransition_apb2k"), "upswing", "idle", SubResource("AnimationNodeStateMachineTransition_h5bcf"), "upswing", "downswing", SubResource("AnimationNodeStateMachineTransition_ox862"), "downswing", "End", SubResource("AnimationNodeStateMachineTransition_oblek")]

[sub_resource type="Animation" id="Animation_kuw5f"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Armature/Skeleton3D/Eyes_Closed: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("Armature/Skeleton3D/Eyes_Open:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}

[sub_resource type="Animation" id="Animation_vjm4y"]
resource_name = "blink"
length = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Armature/Skeleton3D/Eyes_Closed:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.0666667),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Armature/Skeleton3D/Eyes_Open:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.0666667),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_3te1k"]
_data = {
"RESET": SubResource("Animation_kuw5f"),
"blink": SubResource("Animation_vjm4y")
}

[node name="GfolfGirl" instance=ExtResource("1_j80rr")]
script = ExtResource("2_y16an")

[node name="Armature" parent="." index="0"]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0)

[node name="Skeleton3D" parent="Armature" index="0"]
bones/2/rotation = Quaternion(-0.0810866, 1.18817e-07, -9.66627e-09, 0.996707)
bones/2/scale = Vector3(1, 1, 1)
bones/3/rotation = Quaternion(0.109598, 5.74113e-14, 2.61301e-08, 0.993976)
bones/3/scale = Vector3(1, 1, 1)
bones/4/rotation = Quaternion(-0.378114, -0.327388, -0.582774, 0.640486)
bones/4/scale = Vector3(1, 1, 1)
bones/5/rotation = Quaternion(0.016166, 0.00322388, -0.0373428, 0.999167)
bones/6/rotation = Quaternion(-0.0278617, 0.563825, -0.0134439, 0.825315)
bones/6/scale = Vector3(1, 1, 1)
bones/7/position = Vector3(2.5177, 0.946917, -0.235743)
bones/7/rotation = Quaternion(0.0351418, 0.076921, -0.71429, 0.694721)
bones/8/position = Vector3(0.0273073, -0.885686, -1.18049)
bones/8/scale = Vector3(1, 1, 1)
bones/9/rotation = Quaternion(-0.37636, 0.32557, 0.583804, 0.641506)
bones/10/rotation = Quaternion(0.0161656, -0.00322384, 0.037342, 0.999167)
bones/11/rotation = Quaternion(-0.0277614, -0.56142, 0.0134281, 0.826956)
bones/11/scale = Vector3(1, 1, 1)
bones/12/position = Vector3(-2.5177, 0.946917, -0.235744)
bones/12/rotation = Quaternion(0.0351417, -0.0769212, 0.71429, 0.694721)
bones/12/scale = Vector3(1, 1, 1)
bones/13/position = Vector3(-0.028872, -0.905219, -0.835685)
bones/13/scale = Vector3(1, 1, 1)
bones/14/rotation = Quaternion(-0.0450049, 0.0679843, 0.995348, -0.0513393)
bones/15/rotation = Quaternion(-0.0580143, 0.0014095, -0.0404488, 0.997495)
bones/16/rotation = Quaternion(-0.00817251, -0.0457521, -0.0136595, 0.998826)
bones/17/rotation = Quaternion(0.0450049, 0.0679843, 0.995348, 0.0513393)
bones/18/rotation = Quaternion(-0.0580143, -0.0014095, 0.0404488, 0.997495)
bones/19/rotation = Quaternion(-0.00817251, 0.0457521, 0.0136595, 0.998826)
bones/20/rotation = Quaternion(-0.000314788, 0, 1, 0)
bones/20/scale = Vector3(1, 1, 1)
bones/21/rotation = Quaternion(-0.000222673, 0.707107, 0.707107, 0.000222504)
bones/21/scale = Vector3(1, 1, 1)
bones/22/rotation = Quaternion(0.000314788, 0, 1, 0)
bones/22/scale = Vector3(1, 1, 1)
bones/23/rotation = Quaternion(0.000222673, 0.707107, 0.707107, -0.000222504)
bones/23/scale = Vector3(1, 1, 1)

[node name="Eyes_Closed" parent="Armature/Skeleton3D" index="1"]
visible = false

[node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D" index="6"]
transform = Transform3D(-0.0322548, -0.997872, -0.0566729, 0.999469, -0.0324597, 0.00269911, -0.00453275, -0.0565558, 0.998389, -2.5177, 5.22011, -0.51637)
bone_name = "Hand.R"
bone_idx = 11

[node name="RightHandGrip" type="Node3D" parent="Armature/Skeleton3D/BoneAttachment3D" index="0"]
unique_name_in_owner = true
transform = Transform3D(0.934826, 0.266239, -0.23498, -0.336326, 0.876157, -0.345298, 0.113948, 0.401823, 0.908599, -0.0340219, 0.535822, -0.0310692)

[node name="ReferenceClub" type="MeshInstance3D" parent="Armature/Skeleton3D/BoneAttachment3D/RightHandGrip" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.205, 0)
mesh = SubResource("BoxMesh_363n0")
skeleton = NodePath("../..")

[node name="MeshInstance3D" type="MeshInstance3D" parent="Armature/Skeleton3D/BoneAttachment3D/RightHandGrip/ReferenceClub" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.705, 0.3)
mesh = SubResource("BoxMesh_oll6x")

[node name="AnimationTree" type="AnimationTree" parent="." index="2"]
tree_root = SubResource("AnimationNodeStateMachine_yepp7")
anim_player = NodePath("../AnimationPlayer")

[node name="EyeAnimation" type="AnimationPlayer" parent="." index="3"]
unique_name_in_owner = true
libraries = {
"": SubResource("AnimationLibrary_3te1k")
}

[node name="BlinkTimer" type="Timer" parent="EyeAnimation" index="0"]
autostart = true
script = ExtResource("3_ex68g")
mean_time = 4.0
st_dev_time = 2.0
minimum_time = 0.1

[connection signal="timeout" from="EyeAnimation/BlinkTimer" to="." method="_on_blink_timer_timeout"]
