[gd_scene load_steps=10 format=3 uid="uid://cblsayfgirexr"]

[ext_resource type="PackedScene" uid="uid://ynbeag63q0c5" path="res://assets/models/characters/umineko/umineko.gltf" id="1_05f5o"]
[ext_resource type="Script" path="res://src/characters/umineko/umineko.gd" id="2_l2m5i"]
[ext_resource type="Script" path="res://src/util/random_timer.gd" id="3_1csih"]

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_v712c"]
animation = &"flap"

[sub_resource type="AnimationNodeOneShot" id="AnimationNodeOneShot_bsmxe"]
fadein_time = 0.1
fadeout_time = 0.1

[sub_resource type="AnimationNodeAdd2" id="AnimationNodeAdd2_illtt"]

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

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_342v6"]
animation = &"wingtip_wind"

[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_8a2qb"]
graph_offset = Vector2(-850, -26)
nodes/flap_anim/node = SubResource("AnimationNodeAnimation_v712c")
nodes/flap_anim/position = Vector2(-160, 300)
nodes/flap_trigger/node = SubResource("AnimationNodeOneShot_bsmxe")
nodes/flap_trigger/position = Vector2(120, 140)
nodes/idle_add/node = SubResource("AnimationNodeAdd2_illtt")
nodes/idle_add/position = Vector2(-160, 60)
nodes/idle_anim/node = SubResource("AnimationNodeAnimation_ami58")
nodes/idle_anim/position = Vector2(-380, 20)
nodes/output/position = Vector2(340, 160)
nodes/wingtip_anim/node = SubResource("AnimationNodeAnimation_342v6")
nodes/wingtip_anim/position = Vector2(-400, 200)
node_connections = [&"flap_trigger", 0, &"idle_add", &"flap_trigger", 1, &"flap_anim", &"idle_add", 0, &"idle_anim", &"idle_add", 1, &"wingtip_anim", &"output", 0, &"flap_trigger"]

[node name="Umineko" instance=ExtResource("1_05f5o")]
script = ExtResource("2_l2m5i")

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

[node name="Skeleton3D" parent="Armature" index="0"]
bones/0/rotation = Quaternion(0.707107, -5.33851e-08, -5.33851e-08, 0.707107)
bones/1/rotation = Quaternion(-1.12526e-07, 3.65963e-15, -0.745227, 0.66681)
bones/1/scale = Vector3(1, 1, 1)
bones/2/rotation = Quaternion(-1.21153e-08, 5.90286e-15, -0.0802357, 0.996776)
bones/3/rotation = Quaternion(-2.30725e-08, -1.76517e-14, -0.152802, 0.988257)
bones/4/rotation = Quaternion(-2.06306e-08, 9.3445e-15, -0.13663, 0.990622)
bones/5/position = Vector3(1.46719, 0.319025, -2.26868e-07)
bones/5/rotation = Quaternion(1.45288e-07, 2.54822e-14, 0.9622, -0.272343)
bones/5/scale = Vector3(1, 1, 1)
bones/6/position = Vector3(-3.69807e-09, 1, 4.25861e-10)
bones/6/rotation = Quaternion(1.78182e-14, 1.00686e-07, 0.745227, 0.66681)
bones/6/scale = Vector3(1, 1, 1)
bones/7/rotation = Quaternion(-1.21153e-08, -4.65491e-15, 0.0802357, 0.996776)
bones/8/rotation = Quaternion(-2.30725e-08, 2.32662e-14, 0.152802, 0.988257)
bones/9/rotation = Quaternion(-2.06306e-08, -1.98297e-14, 0.13663, 0.990622)
bones/10/position = Vector3(-1.46719, 0.319025, 2.16212e-07)
bones/10/rotation = Quaternion(-3.65961e-14, 4.11227e-08, 0.9622, 0.272343)
bones/10/scale = Vector3(1, 1, 1)

[node name="AnimationTree" type="AnimationTree" parent="." index="2"]
tree_root = SubResource("AnimationNodeBlendTree_8a2qb")
anim_player = NodePath("../AnimationPlayer")
parameters/flap_trigger/active = false
parameters/flap_trigger/internal_active = false
parameters/flap_trigger/request = 0
parameters/idle_add/add_amount = 0.5

[node name="FlapTimer" type="Timer" parent="." index="3"]
autostart = true
script = ExtResource("3_1csih")
mean_time = 8.0
st_dev_time = 3.0
minimum_time = 1.8

[connection signal="timeout" from="FlapTimer" to="." method="_on_flap_timer_timeout"]
