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

[ext_resource type="Script" path="res://src/equip/rifle/rifle.gd" id="1_55bob"]
[ext_resource type="Material" uid="uid://dh0kv86unablo" path="res://src/equip/rifle/rifle_metal.tres" id="1_hg6kg"]
[ext_resource type="Material" uid="uid://7a1uvst7oef2" path="res://assets/textures/metal_plate_1k/metal_plate.tres" id="2_lwmbe"]

[sub_resource type="CapsuleMesh" id="CapsuleMesh_r5agj"]
material = ExtResource("1_hg6kg")
radius = 0.4
height = 6.0

[sub_resource type="PrismMesh" id="PrismMesh_vhyv4"]
material = ExtResource("2_lwmbe")
size = Vector3(0.5, 0.2, 5)

[sub_resource type="Animation" id="Animation_udx8y"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Node3D/CannonMesh:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("OmniLight3D:light_energy")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("OmniLight3D:visible")
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_7xhb8"]
resource_name = "charge"
length = 8.0
step = 0.0625
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Node3D/CannonMesh:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector3(0, 0, 0), Vector3(0, 0, -4)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("OmniLight3D:light_energy")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 2, 4, 5, 6, 6.5, 7, 7.25, 7.5, 7.625, 7.75, 7.8125, 7.875, 7.9375, 8),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
"update": 0,
"values": [0.0, 8.0, 0.0, 8.0, 0.0, 8.0, 0.0, 8.0, 0.0, 8.0, 0.0, 8.0, 0.0, 8.0, 8.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("OmniLight3D:visible")
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(8),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [&"_charged", true],
"method": &"set"
}]
}

[sub_resource type="Animation" id="Animation_6kn6d"]
resource_name = "charge"
length = 0.2
step = 0.005
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Node3D/CannonMesh:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.04, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(0, 0, -4), Vector3(0, 0, 0.5), Vector3(0, 0, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("OmniLight3D:light_energy")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.02, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [8.0, 16.0, 0.0]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("OmniLight3D:visible")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [true, false]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_oqhr1"]
_data = {
"RESET": SubResource("Animation_udx8y"),
"charge": SubResource("Animation_7xhb8"),
"fire": SubResource("Animation_6kn6d")
}

[node name="Rifle" type="Node3D"]
script = ExtResource("1_55bob")

[node name="Node3D" type="Node3D" parent="."]

[node name="CannonMesh" type="MeshInstance3D" parent="Node3D"]
transform = Transform3D(0.3, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0)
mesh = SubResource("CapsuleMesh_r5agj")
skeleton = NodePath("../..")

[node name="RailMesh" type="MeshInstance3D" parent="Node3D"]
transform = Transform3D(-4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0, 0, 1, 0.195397, 0, 0)
mesh = SubResource("PrismMesh_vhyv4")

[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.1558)
visible = false
light_energy = 0.0
light_size = 0.1
light_specular = 0.6
omni_range = 10.0

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

[node name="Muzzle" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.5)
