[gd_scene load_steps=42 format=3 uid="uid://crbrniwi6kd3p"]

[ext_resource type="PackedScene" uid="uid://dpmbimh6m4ari" path="res://scenes/player_mesh.tscn" id="1_3vyb7"]
[ext_resource type="Script" uid="uid://50vv0ta67tgl" path="res://src/player.gd" id="1_qhqgy"]
[ext_resource type="Script" uid="uid://cngjp2wws4ld2" path="res://src/player_input.gd" id="3_dqkch"]
[ext_resource type="Script" uid="uid://c3wlcxy4vnm2i" path="res://src/interactor.gd" id="4_dqkch"]

[sub_resource type="SphereShape3D" id="SphereShape3D_qhqgy"]

[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_g2els"]

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_smehm"]
animation = &"Aim"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_d2wvv"]
animation = &"Run"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3v2ag"]
animation = &"PistolIdle"

[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_jej6c"]
filter_enabled = true
filters = ["AuxScene/Scene/Armature/Skeleton3D:mixamorigHips", "AuxScene/Scene/Armature/Skeleton3D:mixamorigHips001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftFoot", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftLeg", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftLeg001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftToeBase", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftUpLeg", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftUpLeg001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightFoot", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightLeg", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightLeg001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightToeBase", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightUpLeg", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightUpLeg001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigSpine", "AuxScene/Scene/Armature/Skeleton3D:mixamorigSpine1"]

[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_f1ej7"]
graph_offset = Vector2(-828.243, 9.73114)
nodes/Animation/node = SubResource("AnimationNodeAnimation_3v2ag")
nodes/Animation/position = Vector2(-200, 140)
"nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_d2wvv")
"nodes/Animation 2/position" = Vector2(-200, 320)
nodes/Blend2/node = SubResource("AnimationNodeBlend2_jej6c")
nodes/Blend2/position = Vector2(60, 140)
nodes/output/position = Vector2(300, 140)
node_connections = [&"Blend2", 0, &"Animation", &"Blend2", 1, &"Animation 2", &"output", 0, &"Blend2"]

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ur7pv"]
animation = &"Fire"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_y4r1p"]
animation = &"PistolIdle"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_tuyoq"]
animation = &"PistolIdle"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_fjrip"]
animation = &"Walk"

[sub_resource type="AnimationNodeBlend2" id="AnimationNodeBlend2_smehm"]
filter_enabled = true
filters = ["", "AuxScene/Scene/Armature/Skeleton3D:mixamorigHead", "AuxScene/Scene/Armature/Skeleton3D:mixamorigHead001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftArm", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftArm001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftForeArm", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftForeArm001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHand", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHand001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandIndex1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandIndex1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandIndex2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandIndex2001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandIndex3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandIndex4001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandMiddle1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandMiddle1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandMiddle2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandMiddle2001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandMiddle3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandMiddle3001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandMiddle4001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandPinky1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandPinky1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandPinky2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandPinky2001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandPinky3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandPinky3001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandPinky4", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandPinky4001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandRing1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandRing1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandRing2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandRing2001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandRing3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandRing3001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandRing4", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandRing4001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandThumb1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandThumb1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandThumb2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandThumb2001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandThumb3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandThumb3001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftHandThumb4", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftShoulder", "AuxScene/Scene/Armature/Skeleton3D:mixamorigLeftShoulder001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigNeck", "AuxScene/Scene/Armature/Skeleton3D:mixamorigNeck001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightArm", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightArm001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightForeArm", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightForeArm001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHand", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHand001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandIndex1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandIndex1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandIndex2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandIndex2001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandIndex3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandIndex3001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandMiddle1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandMiddle1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandMiddle2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandMiddle2001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandMiddle3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandMiddle4001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandPinky1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandPinky1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandPinky2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandPinky2001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandPinky3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandPinky3001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandPinky4", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandPinky4001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandRing1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandRing1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandRing2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandRing3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandRing3001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandRing4", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandRing4001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandThumb1", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandThumb1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandThumb2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandThumb3", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightHandThumb3001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightShoulder", "AuxScene/Scene/Armature/Skeleton3D:mixamorigRightShoulder001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigSpine001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigSpine1001", "AuxScene/Scene/Armature/Skeleton3D:mixamorigSpine2", "AuxScene/Scene/Armature/Skeleton3D:mixamorigSpine2001"]

[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_ur7pv"]
graph_offset = Vector2(-319.616, 91.8118)
nodes/Animation/node = SubResource("AnimationNodeAnimation_fjrip")
nodes/Animation/position = Vector2(-140, 120)
"nodes/Animation 2/node" = SubResource("AnimationNodeAnimation_tuyoq")
"nodes/Animation 2/position" = Vector2(-140, 300)
nodes/Blend2/node = SubResource("AnimationNodeBlend2_smehm")
nodes/Blend2/position = Vector2(80, 120)
node_connections = [&"Blend2", 0, &"Animation", &"Blend2", 1, &"Animation 2", &"output", 0, &"Blend2"]

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

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_y4r1p"]
advance_mode = 2
advance_expression = "velocity"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_d2wvv"]
advance_mode = 2
advance_expression = "not velocity"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_oprun"]
advance_mode = 2
advance_expression = "is_weapon_ready"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_a8ls1"]
advance_mode = 2
advance_expression = "is_firing"

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

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fulsm"]
advance_mode = 2
advance_expression = "not is_weapon_ready"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_4r5pv"]
advance_mode = 2
advance_expression = "is_running"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_60mlk"]
advance_mode = 2
advance_expression = "not is_running"

[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_d2wvv"]
states/Aim/node = SubResource("AnimationNodeAnimation_smehm")
states/Aim/position = Vector2(327, 194)
states/BlendTree/node = SubResource("AnimationNodeBlendTree_f1ej7")
states/BlendTree/position = Vector2(653, 100)
states/End/position = Vector2(890, 40)
states/Fire/node = SubResource("AnimationNodeAnimation_ur7pv")
states/Fire/position = Vector2(462, 194)
states/PistolIdle/node = SubResource("AnimationNodeAnimation_y4r1p")
states/PistolIdle/position = Vector2(327, 100)
states/Walk/node = SubResource("AnimationNodeBlendTree_ur7pv")
states/Walk/position = Vector2(488, 100)
transitions = ["Start", "PistolIdle", SubResource("AnimationNodeStateMachineTransition_ur7pv"), "PistolIdle", "Walk", SubResource("AnimationNodeStateMachineTransition_y4r1p"), "Walk", "PistolIdle", SubResource("AnimationNodeStateMachineTransition_d2wvv"), "PistolIdle", "Aim", SubResource("AnimationNodeStateMachineTransition_oprun"), "Aim", "Fire", SubResource("AnimationNodeStateMachineTransition_a8ls1"), "Fire", "Aim", SubResource("AnimationNodeStateMachineTransition_qfm1y"), "Aim", "PistolIdle", SubResource("AnimationNodeStateMachineTransition_fulsm"), "Walk", "BlendTree", SubResource("AnimationNodeStateMachineTransition_4r5pv"), "BlendTree", "Walk", SubResource("AnimationNodeStateMachineTransition_60mlk")]

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_qhqgy"]
animation = &"Idle"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dqkch"]
animation = &"Run"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_qlg0r"]
animation = &"Walk"

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

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_fjrip"]
advance_mode = 2
advance_expression = "velocity"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_smehm"]
advance_mode = 2
advance_expression = "is_running"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_qhqgy"]
advance_mode = 2
advance_expression = "not is_running"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_dqkch"]
advance_mode = 2
advance_expression = "not velocity"

[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_ur7pv"]
states/Idle/node = SubResource("AnimationNodeAnimation_qhqgy")
states/Idle/position = Vector2(334, 100)
states/Run/node = SubResource("AnimationNodeAnimation_dqkch")
states/Run/position = Vector2(576, 100)
states/Walk/node = SubResource("AnimationNodeAnimation_qlg0r")
states/Walk/position = Vector2(447, 100)
transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_tuyoq"), "Idle", "Walk", SubResource("AnimationNodeStateMachineTransition_fjrip"), "Walk", "Run", SubResource("AnimationNodeStateMachineTransition_smehm"), "Run", "Walk", SubResource("AnimationNodeStateMachineTransition_qhqgy"), "Walk", "Idle", SubResource("AnimationNodeStateMachineTransition_dqkch")]

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_qlg0r"]
advance_mode = 2
advance_expression = "not is_carrying_item"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_3v2ag"]
advance_mode = 2
advance_expression = "is_carrying_item"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_jej6c"]
advance_mode = 2
advance_expression = "not is_carrying_item"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_f1ej7"]
advance_mode = 2
advance_expression = "is_carrying_item"

[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_y4r1p"]
states/Handgun/node = SubResource("AnimationNodeStateMachine_d2wvv")
states/Handgun/position = Vector2(356, 153)
states/Unarmed/node = SubResource("AnimationNodeStateMachine_ur7pv")
states/Unarmed/position = Vector2(356, 50)
transitions = ["Start", "Unarmed", SubResource("AnimationNodeStateMachineTransition_qlg0r"), "Start", "Handgun", SubResource("AnimationNodeStateMachineTransition_3v2ag"), "Handgun", "Unarmed", SubResource("AnimationNodeStateMachineTransition_jej6c"), "Unarmed", "Handgun", SubResource("AnimationNodeStateMachineTransition_f1ej7")]

[node name="Player" type="CharacterBody3D" groups=["persist"]]
script = ExtResource("1_qhqgy")

[node name="Input" type="Node" parent="."]
script = ExtResource("3_dqkch")

[node name="Interactor" type="Node3D" parent="." node_paths=PackedStringArray("area")]
script = ExtResource("4_dqkch")
area = NodePath("Area3D")

[node name="Area3D" type="Area3D" parent="Interactor"]
collision_mask = 2

[node name="CollisionShape3D" type="CollisionShape3D" parent="Interactor/Area3D"]
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 1.5, 1.25)
shape = SubResource("SphereShape3D_qhqgy")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1.2, 0, 0, 0, 1.2, 0, 0, 0, 1.2, 0, 1, 0)
shape = SubResource("CapsuleShape3D_g2els")

[node name="Mesh" parent="." instance=ExtResource("1_3vyb7")]

[node name="AnimationTree" type="AnimationTree" parent="."]
root_node = NodePath("../Mesh")
tree_root = SubResource("AnimationNodeStateMachine_y4r1p")
advance_expression_base_node = NodePath("..")
anim_player = NodePath("../Mesh/AnimationPlayer")
parameters/Handgun/BlendTree/Blend2/blend_amount = 1.0
parameters/Handgun/Walk/Blend2/blend_amount = 1.0

[editable path="Mesh"]
