add weapon switcher; todo: ammo

This commit is contained in:
Michael Campbell 2026-02-19 01:09:36 -05:00
parent 045faf2333
commit 53b8cf6118
5 changed files with 33 additions and 4 deletions

View file

@ -17,11 +17,12 @@ size = Vector3(2, 0.1, 0.1)
[sub_resource type="SphereMesh" id="SphereMesh_4flbx"]
[node name="Player" type="CharacterBody3D" unique_id=1904432250]
[node name="Player" type="CharacterBody3D" unique_id=1904432250 node_paths=PackedStringArray("guns")]
collision_layer = 2
collision_mask = 13
script = ExtResource("1_4flbx")
shake_noise = SubResource("FastNoiseLite_onrkg")
guns = [NodePath("Guns/BasicGun"), NodePath("Guns/MiniGun"), NodePath("Guns/Mortar")]
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=204505475]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
@ -90,6 +91,19 @@ offset_right = 196.0
offset_bottom = -4.0
text = "Stamina"
[node name="GunLabel" type="Label" parent="CanvasLayer" unique_id=220052210]
unique_name_in_owner = true
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -23.0
grow_horizontal = 2
grow_vertical = 0
theme_override_font_sizes/font_size = 32
text = "BasicGun"
horizontal_alignment = 2
[node name="Guns" type="Node3D" parent="." unique_id=2018109083]
[node name="BasicGun" type="Node3D" parent="Guns" unique_id=1677055720]
@ -104,4 +118,4 @@ fire_rate = 800.0
[node name="Mortar" type="Node3D" parent="Guns" unique_id=1321220525]
unique_name_in_owner = true
script = ExtResource("5_qjkh3")
fire_rate = 250.0
fire_rate = 160.0