mtd/Scenes/Weapons/weapon.tscn

66 lines
1.8 KiB
Plaintext
Raw Normal View History

[gd_scene load_steps=5 format=3 uid="uid://b7nargdyg28fj"]
[ext_resource type="Script" path="res://Scripts/Weapons/weapon.gd" id="1_yo2gh"]
[sub_resource type="Animation" id="Animation_5krlx"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite3D:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="Animation" id="Animation_0rgpe"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite3D:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_fs82p"]
_data = {
"RESET": SubResource("Animation_5krlx"),
"shoot": SubResource("Animation_0rgpe")
}
[node name="Weapon" type="Node3D" node_paths=PackedStringArray("animator", "audio_player", "recharge_timer")]
script = ExtResource("1_yo2gh")
animator = NodePath("AnimationPlayer")
audio_player = NodePath("AudioStreamPlayer3D")
recharge_timer = NodePath("Timer")
[node name="Sprite3D" type="Sprite3D" parent="."]
layers = 2
billboard = 1
texture_filter = 0
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_fs82p")
}
[node name="Timer" type="Timer" parent="."]
wait_time = 3.0
one_shot = true
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
bus = &"SFX"
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]