tempknife

This commit is contained in:
Rendo 2025-11-30 02:16:24 +05:00
commit f5a7a84c84
4 changed files with 55 additions and 8 deletions

View file

@ -290,6 +290,7 @@ grow_horizontal = 2
grow_vertical = 2
[node name="PanelContainer" type="PanelContainer" parent="HUD"]
visible = false
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
@ -446,7 +447,7 @@ spawn_path = NodePath("..")
[node name="StartingWeaponSpawner" type="Node" parent="WeaponSystem" node_paths=PackedStringArray("weapon_spawner")]
script = ExtResource("17_ownlk")
starting_pistol = &"uid://djwjl8xll53vn"
starting_knife = &"uid://djwjl8xll53vn"
starting_knife = &"uid://ts4xccpkjd3g"
weapon_spawner = NodePath("../WeaponSpawner")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]

46
scenes/weapons/knife.tscn Normal file
View file

@ -0,0 +1,46 @@
[gd_scene load_steps=8 format=3 uid="uid://ts4xccpkjd3g"]
[ext_resource type="Script" uid="uid://e6lqknfl4ngt" path="res://scripts/weapon_system/weapon_substate_machine.gd" id="1_2xf1r"]
[ext_resource type="Script" uid="uid://ofv4e3dsfe8" path="res://scripts/weapon_system/gun/idle_state.gd" id="2_c20fe"]
[ext_resource type="Script" uid="uid://vj13r83l3xyq" path="res://scripts/weapon_system/gun/semi_auto_shoot_state.gd" id="3_qf5yf"]
[ext_resource type="Script" uid="uid://hmekwp8444ao" path="res://scripts/weapon_system/gun/reload_state.gd" id="4_ndam4"]
[ext_resource type="Script" uid="uid://bmj0bwy2tlian" path="res://scripts/weapon_system/gun/intro_state.gd" id="5_qa48d"]
[sub_resource type="Curve" id="Curve_6djxj"]
_limits = [0.0, 0.1, 0.0, 20.0]
metadata/_snap_enabled = true
metadata/_snap_count = 8
[sub_resource type="Curve" id="Curve_qb62r"]
_limits = [-0.02, 0.02, 0.0, 20.0]
[node name="Knife" type="Node" node_paths=PackedStringArray("enter_state")]
script = ExtResource("1_2xf1r")
animation_prefix = &"baked_sp_"
visibility_target = &"sp"
max_ammo = 1000000000
ammo_mags = 0
slot = &"knife"
enter_state = NodePath("Intro")
metadata/_custom_type_script = "uid://e6lqknfl4ngt"
[node name="Idle" type="Node" parent="."]
script = ExtResource("2_c20fe")
[node name="Shoot" type="Node" parent="." node_paths=PackedStringArray("fire_timer")]
script = ExtResource("3_qf5yf")
vertical_curve = SubResource("Curve_6djxj")
horizontal_curve = SubResource("Curve_qb62r")
damage = 50
shoot_distance = 2.0
fire_timer = NodePath("../FireTimer")
[node name="Reload" type="Node" parent="."]
script = ExtResource("4_ndam4")
[node name="Intro" type="Node" parent="."]
script = ExtResource("5_qa48d")
[node name="FireTimer" type="Timer" parent="."]
wait_time = 0.15
one_shot = true