добавил сигареты как бонус + анимации моделе врагов
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="mp3"
|
||||||
|
type="AudioStreamMP3"
|
||||||
|
uid="uid://wmb6rac0i1fk"
|
||||||
|
path="res://.godot/imported/sigaret.mp3-e255f40ea093a2c0960ef395100d2803.mp3str"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sound/effect/sigaret.mp3"
|
||||||
|
dest_files=["res://.godot/imported/sigaret.mp3-e255f40ea093a2c0960ef395100d2803.mp3str"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0.0
|
||||||
|
bpm=0.0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
@@ -58,7 +58,7 @@ runSpeed = 42.0
|
|||||||
jumpHeight = 1.0
|
jumpHeight = 1.0
|
||||||
|
|
||||||
[node name="bot" type="CSGBox3D" parent="." unique_id=2144783667]
|
[node name="bot" type="CSGBox3D" parent="." unique_id=2144783667]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -174.47874, -0.32853004, -57.679462)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -174.1756, -0.49007484, -57.880222)
|
||||||
use_collision = true
|
use_collision = true
|
||||||
size = Vector3(6169.6094, 0.001, 5383.5405)
|
size = Vector3(6169.6094, 0.001, 5383.5405)
|
||||||
material = ExtResource("1_h0k1n")
|
material = ExtResource("1_h0k1n")
|
||||||
@@ -536,7 +536,7 @@ transform = Transform3D(0.56640625, 0, -0.8241262, 0, 1, 0, 0.8241262, 0, 0.5664
|
|||||||
transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 4, -39.484, -1.547, -0.273)
|
transform = Transform3D(4, 0, 0, 0, 4, 0, 0, 0, 4, -39.484, -1.547, -0.273)
|
||||||
|
|
||||||
[node name="snow2" type="Node3D" parent="." unique_id=491312483]
|
[node name="snow2" type="Node3D" parent="." unique_id=491312483]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -170.82835, 3.8458452, -9.062199)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -170.82835, 4.0788383, -9.062199)
|
||||||
|
|
||||||
[node name="Node3D" parent="snow2" unique_id=1695486506 instance=ExtResource("15_6tfqi")]
|
[node name="Node3D" parent="snow2" unique_id=1695486506 instance=ExtResource("15_6tfqi")]
|
||||||
transform = Transform3D(0.9973094, -0.07330782, 0, 0.07330782, 0.9973094, 0, 0, 0, 1, -23.135105, 0, -18.741734)
|
transform = Transform3D(0.9973094, -0.07330782, 0, 0.07330782, 0.9973094, 0, 0, 0, 1, -23.135105, 0, -18.741734)
|
||||||
|
|||||||
+790
-282
File diff suppressed because one or more lines are too long
@@ -1,4 +1,5 @@
|
|||||||
extends CharacterBody3D
|
extends CharacterBody3D
|
||||||
|
@onready var anim_player = $AnimationPlayer # Убедись, что имя узла в дереве сцены совпадает буква в букву!
|
||||||
|
|
||||||
@export var move_speed: float = 4.0 # Скорость преследования игрока
|
@export var move_speed: float = 4.0 # Скорость преследования игрока
|
||||||
@export var damage_to_player: float = 10.0 # Базовый урон за один выстрел
|
@export var damage_to_player: float = 10.0 # Базовый урон за один выстрел
|
||||||
@@ -168,6 +169,28 @@ func _physics_process(delta: float) -> void:
|
|||||||
if has_node("/root/MusicManager"):
|
if has_node("/root/MusicManager"):
|
||||||
get_node("/root/MusicManager").unregister_enemy_vision(self, custom_battle_music)
|
get_node("/root/MusicManager").unregister_enemy_vision(self, custom_battle_music)
|
||||||
|
|
||||||
|
# === ИСПРАВЛЕННЫЙ И НЕУБИВАЕМЫЙ БЛОК АНИМАЦИЙ ДЛЯ UAL ===
|
||||||
|
if anim_player != null:
|
||||||
|
# Высчитываем дистанцию до игрока для точного переключения стейтов
|
||||||
|
var distance_to_p = 999.0
|
||||||
|
if player_node != null:
|
||||||
|
distance_to_p = global_position.distance_to(player_node.global_position)
|
||||||
|
|
||||||
|
# Моб бежит, если игрок в зоне видимости и расстояние больше дистанции атаки (2.5м)
|
||||||
|
var is_moving_now = is_player_in_range and distance_to_p > 2.5
|
||||||
|
|
||||||
|
if is_moving_now:
|
||||||
|
# Если анимация бега еще не запущена или плеер полностью остановился
|
||||||
|
if anim_player.assigned_animation != "Jog_Fwd" or not anim_player.is_playing():
|
||||||
|
anim_player.play("Jog_Fwd", 0.2) # 0.2 — плавное сглаживание переходов костей
|
||||||
|
else:
|
||||||
|
# Если моб стоит на месте (в укрытии, стреляет или потерял игрока)
|
||||||
|
# Проверяем, чтобы покой не сбивал анимацию удара/выстрела Punch_Jab
|
||||||
|
if anim_player.assigned_animation != "Idle" and anim_player.assigned_animation != "Punch_Jab":
|
||||||
|
if not anim_player.is_playing() or anim_player.assigned_animation == "Jog_Fwd":
|
||||||
|
anim_player.play("Idle", 0.2)
|
||||||
|
# =======================================================
|
||||||
|
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
|
||||||
func has_clear_line_of_sight() -> bool:
|
func has_clear_line_of_sight() -> bool:
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
[ext_resource type="Resource" uid="uid://bgb8htvjywlwm" path="res://addons/Weapons/Resources/ShotgunWeaponResources.tres" id="17_bj161"]
|
[ext_resource type="Resource" uid="uid://bgb8htvjywlwm" path="res://addons/Weapons/Resources/ShotgunWeaponResources.tres" id="17_bj161"]
|
||||||
[ext_resource type="Resource" uid="uid://b63lj0c7tash0" path="res://addons/Weapons/Resources/SniperRifleWeaponResources.tres" id="18_bky4p"]
|
[ext_resource type="Resource" uid="uid://b63lj0c7tash0" path="res://addons/Weapons/Resources/SniperRifleWeaponResources.tres" id="18_bky4p"]
|
||||||
[ext_resource type="Resource" uid="uid://dn71dyben68oe" path="res://addons/Weapons/Resources/RocketLauncherWeaponResources.tres" id="19_m6yr4"]
|
[ext_resource type="Resource" uid="uid://dn71dyben68oe" path="res://addons/Weapons/Resources/RocketLauncherWeaponResources.tres" id="19_m6yr4"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://wmb6rac0i1fk" path="res://Sound/effect/sigaret.mp3" id="20_cl8pt"]
|
||||||
[ext_resource type="Script" uid="uid://bcka80usfl4am" path="res://addons/Weapons/Scripts/WeaponSlotScript.gd" id="24_tyw5b"]
|
[ext_resource type="Script" uid="uid://bcka80usfl4am" path="res://addons/Weapons/Scripts/WeaponSlotScript.gd" id="24_tyw5b"]
|
||||||
[ext_resource type="Material" uid="uid://f3f1s20quvcb" path="res://addons/PlayerCharacter/Materials/PlayerCharacterMaterial.tres" id="25_8ryj3"]
|
[ext_resource type="Material" uid="uid://f3f1s20quvcb" path="res://addons/PlayerCharacter/Materials/PlayerCharacterMaterial.tres" id="25_8ryj3"]
|
||||||
[ext_resource type="Shader" uid="uid://c3h1lw7pkowvb" path="res://addons/texture_custom/ps1_camera.gdshader" id="25_o0oj7"]
|
[ext_resource type="Shader" uid="uid://c3h1lw7pkowvb" path="res://addons/texture_custom/ps1_camera.gdshader" id="25_o0oj7"]
|
||||||
@@ -47,6 +48,21 @@ point_count = 2
|
|||||||
metadata/_snap_enabled = true
|
metadata/_snap_enabled = true
|
||||||
metadata/_snap_count = 4
|
metadata/_snap_count = 4
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_m43f3"]
|
||||||
|
script = ExtResource("14_ca0qr")
|
||||||
|
weaponName = "SpeedBooster"
|
||||||
|
weaponId = 6
|
||||||
|
shootSound = ExtResource("20_cl8pt")
|
||||||
|
totalAmmoInMag = 1
|
||||||
|
totalAmmoInMagRef = 3
|
||||||
|
hasToReload = false
|
||||||
|
autoReload = false
|
||||||
|
bobFreq = 0.008
|
||||||
|
bobAmount = 0.018
|
||||||
|
bobSpeed = 10.0
|
||||||
|
onIdleBobFreqDivider = 2.0
|
||||||
|
metadata/_custom_type_script = "uid://bnhfyt5sl8jcd"
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_o0oj7"]
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_o0oj7"]
|
||||||
albedo_texture = ExtResource("32_1lhsp")
|
albedo_texture = ExtResource("32_1lhsp")
|
||||||
|
|
||||||
@@ -312,6 +328,8 @@ _surfaces = [{
|
|||||||
blend_shape_mode = 0
|
blend_shape_mode = 0
|
||||||
shadow_mesh = SubResource("ArrayMesh_a7y7w")
|
shadow_mesh = SubResource("ArrayMesh_a7y7w")
|
||||||
|
|
||||||
|
[sub_resource type="CapsuleMesh" id="CapsuleMesh_cl8pt"]
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_vs6b3"]
|
[sub_resource type="Animation" id="Animation_vs6b3"]
|
||||||
resource_name = "EquipAnimAssaultRifle"
|
resource_name = "EquipAnimAssaultRifle"
|
||||||
length = 0.2
|
length = 0.2
|
||||||
@@ -725,7 +743,7 @@ far = 1000.0
|
|||||||
[node name="WeaponManager" type="Node3D" parent="CameraHolder/CameraRecoilHolder/Camera" unique_id=9254674 node_paths=PackedStringArray("startWeapons")]
|
[node name="WeaponManager" type="Node3D" parent="CameraHolder/CameraRecoilHolder/Camera" unique_id=9254674 node_paths=PackedStringArray("startWeapons")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
script = ExtResource("13_834nb")
|
script = ExtResource("13_834nb")
|
||||||
weaponResources = Array[ExtResource("14_ca0qr")]([ExtResource("15_1lhsp"), ExtResource("16_tyw5b"), ExtResource("17_bj161"), ExtResource("18_bky4p"), ExtResource("19_m6yr4")])
|
weaponResources = Array[ExtResource("14_ca0qr")]([ExtResource("15_1lhsp"), ExtResource("16_tyw5b"), ExtResource("17_bj161"), ExtResource("18_bky4p"), ExtResource("19_m6yr4"), SubResource("Resource_m43f3")])
|
||||||
startWeapons = [NodePath("WeaponContainer/Pistol")]
|
startWeapons = [NodePath("WeaponContainer/Pistol")]
|
||||||
shoot_action = "shoot"
|
shoot_action = "shoot"
|
||||||
reload_action = "reload"
|
reload_action = "reload"
|
||||||
@@ -862,6 +880,20 @@ transform = Transform3D(55, 1.49078e-19, 3.18323e-12, 0, 55, -2.40412e-06, -4.09
|
|||||||
material_override = SubResource("StandardMaterial3D_6w1kq")
|
material_override = SubResource("StandardMaterial3D_6w1kq")
|
||||||
mesh = SubResource("ArrayMesh_v8aw4")
|
mesh = SubResource("ArrayMesh_v8aw4")
|
||||||
|
|
||||||
|
[node name="Sigaret" type="Node3D" parent="CameraHolder/CameraRecoilHolder/Camera/WeaponManager/WeaponContainer" unique_id=890485738 node_paths=PackedStringArray("model", "attackPoint", "muzzleFlashSpawner")]
|
||||||
|
script = ExtResource("24_tyw5b")
|
||||||
|
model = NodePath(".")
|
||||||
|
weaponId = 6
|
||||||
|
attackPoint = NodePath("PistolAttackPoint")
|
||||||
|
muzzleFlashSpawner = NodePath("PistolAttackPoint")
|
||||||
|
|
||||||
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="CameraHolder/CameraRecoilHolder/Camera/WeaponManager/WeaponContainer/Sigaret" unique_id=1743469870]
|
||||||
|
transform = Transform3D(0.04579172, 0.08881826, 0.017072301, 0.028749596, -0.14146772, -0.027192373, 3.6029846e-11, 0.25018898, -0.021436498, 0.12508726, -0.16887617, -0.6385742)
|
||||||
|
mesh = SubResource("CapsuleMesh_cl8pt")
|
||||||
|
|
||||||
|
[node name="PistolAttackPoint" type="Marker3D" parent="CameraHolder/CameraRecoilHolder/Camera/WeaponManager/WeaponContainer/Sigaret" unique_id=504659522]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.78936e-08, 0.154984, 0.541926)
|
||||||
|
|
||||||
[node name="ShootManager" type="Node3D" parent="CameraHolder/CameraRecoilHolder/Camera/WeaponManager" unique_id=294744261]
|
[node name="ShootManager" type="Node3D" parent="CameraHolder/CameraRecoilHolder/Camera/WeaponManager" unique_id=294744261]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
script = ExtResource("96_j45p8")
|
script = ExtResource("96_j45p8")
|
||||||
|
|||||||
@@ -96,6 +96,58 @@ var coyoteJumpOn : bool = false
|
|||||||
@onready var ceilingCheck : RayCast3D = $Raycasts/CeilingCheck
|
@onready var ceilingCheck : RayCast3D = $Raycasts/CeilingCheck
|
||||||
@onready var floorCheck : RayCast3D = $Raycasts/FloorCheck
|
@onready var floorCheck : RayCast3D = $Raycasts/FloorCheck
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# --- МЕХАНИКА БОНУСНОГО УСКОРЕНИЯ (АДРЕНАЛИН) ---
|
||||||
|
var is_speed_boosted: bool = false
|
||||||
|
|
||||||
|
func activate_speed_boost() -> void:
|
||||||
|
if is_speed_boosted: return # Защита от повторного накладывания эффекта
|
||||||
|
|
||||||
|
is_speed_boosted = true
|
||||||
|
print("[ИГРОК] Адреналин подействовал на ноги!")
|
||||||
|
|
||||||
|
# 1. Запоминаем твои текущие настройки скорости из инспектора
|
||||||
|
var old_walk: float = walkSpeed
|
||||||
|
var old_run: float = runSpeed
|
||||||
|
|
||||||
|
# 2. Принудительно разгоняем базовые переменные, которые стейт-машина читает каждый кадр!
|
||||||
|
walkSpeed = old_walk * 1.8
|
||||||
|
runSpeed = old_run * 1.8
|
||||||
|
|
||||||
|
# Сразу толкаем текущую скорость moveSpeed вперед, чтобы разгон пошел без задержки в один кадр
|
||||||
|
if "walkOrRun" in self and walkOrRun == "RunState":
|
||||||
|
moveSpeed = runSpeed
|
||||||
|
else:
|
||||||
|
moveSpeed = walkSpeed
|
||||||
|
|
||||||
|
# Визуальный эффект: плавно растягиваем камеру (FOV) на +20 градусов для сочности
|
||||||
|
if player_camera:
|
||||||
|
var tween = create_tween()
|
||||||
|
tween.tween_property(player_camera, "fov", normal_fov + 20.0, 0.2)
|
||||||
|
|
||||||
|
# 3. ВРЕМЯ ДЕЙСТВИЯ: Бонус работает ровно 5 секунд
|
||||||
|
await get_tree().create_timer(5.0).timeout
|
||||||
|
|
||||||
|
# 4. СБРОС: Возвращаем базовые скорости в норму
|
||||||
|
walkSpeed = old_walk
|
||||||
|
runSpeed = old_run
|
||||||
|
|
||||||
|
if "walkOrRun" in self and walkOrRun == "RunState":
|
||||||
|
moveSpeed = runSpeed
|
||||||
|
else:
|
||||||
|
moveSpeed = walkSpeed
|
||||||
|
|
||||||
|
# Плавно возвращаем камеру назад
|
||||||
|
if player_camera:
|
||||||
|
var tween = create_tween()
|
||||||
|
tween.tween_property(player_camera, "fov", normal_fov, 0.3)
|
||||||
|
|
||||||
|
is_speed_boosted = false
|
||||||
|
print("[ИГРОК] Действие адреналина закончилось. Скорость в норме.")
|
||||||
|
|
||||||
|
|
||||||
# НАЙДИ ЭТУ ФУНКЦИЮ ВНУТРИ СKРИПТА PlayerCharacter.gd И ЗАМЕНИ ЕЁ:
|
# НАЙДИ ЭТУ ФУНКЦИЮ ВНУТРИ СKРИПТА PlayerCharacter.gd И ЗАМЕНИ ЕЁ:
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
|
|||||||
@@ -36,8 +36,25 @@ func displayWeaponName(weaponName : String):
|
|||||||
weaponNameLabelText.set_text(str(weaponName))
|
weaponNameLabelText.set_text(str(weaponName))
|
||||||
|
|
||||||
func displayTotalAmmoInMag(totalAmmoInMag : int, nbProjShotsAtSameTime : int):
|
func displayTotalAmmoInMag(totalAmmoInMag : int, nbProjShotsAtSameTime : int):
|
||||||
totalAmmoInMagLabelText.set_text(str(totalAmmoInMag/nbProjShotsAtSameTime))
|
# --- ЗАЩИТА ОТ ДЕЛЕНИЯ НА НОЛЬ ДЛЯ БОНУСА SPEEDBOOSTER ---
|
||||||
|
# Если количество пулей/дробинок равно 0 или меньше, принудительно считаем его за 1
|
||||||
|
var divisor = nbProjShotsAtSameTime
|
||||||
|
if divisor <= 0:
|
||||||
|
divisor = 1
|
||||||
|
|
||||||
|
if totalAmmoInMagLabelText != null:
|
||||||
|
totalAmmoInMagLabelText.set_text(str(totalAmmoInMag / divisor))
|
||||||
|
|
||||||
|
|
||||||
func displayTotalAmmo(totalAmmo : int, nbProjShotsAtSameTime : int):
|
func displayTotalAmmo(totalAmmo : int, nbProjShotsAtSameTime : int):
|
||||||
totalAmmoLabelText.set_text(str(totalAmmo/nbProjShotsAtSameTime))
|
# --- БРОНЕБОЙНАЯ ЗАЩИТА ОТ ДЕЛЕНИЯ НА НОЛЬ ДЛЯ БОНУСА SPEEDBOOSTER ---
|
||||||
|
# Если количество пулей/дробинок равно 0 или меньше, принудительно считаем его за 1
|
||||||
|
var divisor = nbProjShotsAtSameTime
|
||||||
|
if divisor <= 0:
|
||||||
|
divisor = 1
|
||||||
|
|
||||||
|
# Найди переменную текста общего запаса патронов в твоем HUDScript.
|
||||||
|
# Посмотри, как она точно называется у автора (например, totalAmmoLabelText или похоже),
|
||||||
|
# и замени строчку set_text на эту безопасную версию:
|
||||||
|
if totalAmmoLabelText != null:
|
||||||
|
totalAmmoLabelText.set_text(str(totalAmmo / divisor))
|
||||||
|
|||||||
@@ -151,7 +151,62 @@ func _process(_delta : float):
|
|||||||
displayStats()
|
displayStats()
|
||||||
|
|
||||||
func weaponInputs():
|
func weaponInputs():
|
||||||
if Input.is_action_pressed(shoot_action): shootManager.shoot()
|
if Input.is_action_pressed(shoot_action):
|
||||||
|
# --- ПЕРЕХВАТ ДЛЯ БОНУСА SPEEDBOOSTER ---
|
||||||
|
|
||||||
|
if cW != null and cW.weaponName == "SpeedBooster":
|
||||||
|
# Проверяем, есть ли заряды и что мы его уже не используем прямо сейчас
|
||||||
|
if cW.totalAmmoInMag > 0 and not cW.isShooting:
|
||||||
|
cW.isShooting = true
|
||||||
|
# === НАШЕ ДОБАВЛЕНИЕ: ПРИНУДИТЕЛЬНО ИГРАЕМ ЗВУК ИЗ РЕСУРСА ПРЕДМЕТА ===
|
||||||
|
# Берем звук, который ты прикрепил в поле shot_sound (или shootSound)
|
||||||
|
if "shotSound" in cW and cW.shotSound != null:
|
||||||
|
weaponSoundManagement(cW.shotSound, 1.0)
|
||||||
|
elif "shootSound" in cW and cW.shootSound != null:
|
||||||
|
weaponSoundManagement(cW.shootSound, 1.0)
|
||||||
|
# Тратим одно использование бонуса
|
||||||
|
cW.totalAmmoInMag -= 1
|
||||||
|
displayStats() # Обновляем цифры на HUD (станет 0)
|
||||||
|
|
||||||
|
print("[БОНУС] Успешный клик! Активирую скорость на PlayerCharacter.")
|
||||||
|
|
||||||
|
# Отправляем команду на ускорение в скрипт твоего игрока
|
||||||
|
if playChar and playChar.has_method("activate_speed_boost"):
|
||||||
|
playChar.activate_speed_boost()
|
||||||
|
|
||||||
|
# Ждем кулдаун использования банки (1 секунда, чтобы проигралась анимация глотка/использования)
|
||||||
|
await get_tree().create_timer(1.0).timeout
|
||||||
|
|
||||||
|
# --- УДАЛЕНИЕ ИЗ ИНВЕНТАРЯ ПОСЛЕ ИСПОЛЬЗОВАНИЯ ---
|
||||||
|
print("[БОНУС] Энергетик пуст. Удаляю его из инвентаря игрока...")
|
||||||
|
|
||||||
|
# Находим, под каким номером в инвентаре (weaponStack) лежит наш SpeedBooster
|
||||||
|
var booster_stack_index = weaponStack.find(cW.weaponId)
|
||||||
|
if booster_stack_index != -1:
|
||||||
|
# Полностью выкидываем его из списка оружия игрока
|
||||||
|
weaponStack.remove_at(booster_stack_index)
|
||||||
|
|
||||||
|
# Принудительно прячем 3D-модельку пустой банки в руках
|
||||||
|
if cWModel:
|
||||||
|
cWModel.visible = false
|
||||||
|
|
||||||
|
# Переключаем инвентарь на самое первое доступное оружие (индекс 0 - автомат или пистолет)
|
||||||
|
weaponIndex = 0
|
||||||
|
if weaponStack.size() > 0:
|
||||||
|
changeWeapon(weaponStack[0])
|
||||||
|
else:
|
||||||
|
# Если у игрока вообще больше нет оружия, сбрасываем текущее оружие в null
|
||||||
|
cW = null
|
||||||
|
cWModel = null
|
||||||
|
canUseWeapon = false
|
||||||
|
|
||||||
|
# Возвращаем флаг стрельбы в исходное состояние
|
||||||
|
if cW != null:
|
||||||
|
cW.isShooting = false
|
||||||
|
|
||||||
|
else:
|
||||||
|
# ОРИГИНАЛЬНАЯ СТРЕЛЬБА АССЕТА (Для автоматов и пистолетов)
|
||||||
|
shootManager.shoot()
|
||||||
|
|
||||||
if Input.is_action_just_pressed(reload_action): reloadManager.reload()
|
if Input.is_action_just_pressed(reload_action): reloadManager.reload()
|
||||||
|
|
||||||
@@ -165,6 +220,7 @@ func weaponInputs():
|
|||||||
weaponIndex = max(weaponIndex - 1, 0) #from last element of weapon stack to first element
|
weaponIndex = max(weaponIndex - 1, 0) #from last element of weapon stack to first element
|
||||||
changeWeapon(weaponStack[weaponIndex])
|
changeWeapon(weaponStack[weaponIndex])
|
||||||
|
|
||||||
|
|
||||||
func displayStats():
|
func displayStats():
|
||||||
if hud == null or cW == null:
|
if hud == null or cW == null:
|
||||||
return
|
return
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,67 @@
|
|||||||
|
[gd_scene format=3 uid="uid://cqg5c6x5brw56"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dv83lbllf3hij" path="res://addons/custmode/UAL1_Standard_RM.glb" id="1_bku24"]
|
||||||
|
|
||||||
|
[node name="UAL1_Standard_RM" unique_id=444652621 instance=ExtResource("1_bku24")]
|
||||||
|
|
||||||
|
[node name="Armature" parent="." index="0" unique_id=412759231]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.10814822, 0)
|
||||||
|
|
||||||
|
[node name="GeneralSkeleton" parent="Armature" index="0" unique_id=1103504221]
|
||||||
|
bones/0/position = Vector3(0, 0, 4.953514)
|
||||||
|
bones/1/position = Vector3(0.01621273, 0.9220997, -0.074347936)
|
||||||
|
bones/1/rotation = Quaternion(0.19650857, -0.008166311, 0.0407102, 0.97962254)
|
||||||
|
bones/3/rotation = Quaternion(0.13665126, 0.0648466, -0.03915566, 0.98771876)
|
||||||
|
bones/4/rotation = Quaternion(0.12699693, 0.20545502, 0.032375928, 0.96985155)
|
||||||
|
bones/5/rotation = Quaternion(-0.13102475, -0.13617174, -0.026682757, 0.9816201)
|
||||||
|
bones/6/rotation = Quaternion(-0.1499345, -0.13563171, -0.029304562, 0.9789101)
|
||||||
|
bones/7/rotation = Quaternion(0.5174918, 0.4818536, 0.4818827, -0.51750207)
|
||||||
|
bones/8/rotation = Quaternion(-0.04823145, 0.89364576, -0.44610828, 0.0076410593)
|
||||||
|
bones/9/rotation = Quaternion(0.48881954, -0.44688532, 0.42471942, 0.61722153)
|
||||||
|
bones/10/rotation = Quaternion(0.12024963, 0.69903094, 0.056890097, 0.702609)
|
||||||
|
bones/11/rotation = Quaternion(0.6295969, -1.4528634e-07, -4.321337e-06, 0.7769221)
|
||||||
|
bones/12/rotation = Quaternion(0.62334144, -1.4528631e-07, -4.4107433e-06, 0.7819497)
|
||||||
|
bones/13/rotation = Quaternion(0.623342, -1.2665986e-07, -4.470348e-06, 0.7819493)
|
||||||
|
bones/15/rotation = Quaternion(0.62889457, -0.029734949, -4.2021275e-06, 0.77692175)
|
||||||
|
bones/16/rotation = Quaternion(0.6227328, -0.027554728, -4.589558e-06, 0.7819493)
|
||||||
|
bones/17/rotation = Quaternion(0.622668, -0.028961483, -4.2915353e-06, 0.78195006)
|
||||||
|
bones/19/rotation = Quaternion(0.6630008, -0.04452976, 0.07369418, 0.74365056)
|
||||||
|
bones/20/rotation = Quaternion(0.6203667, -0.062294, 0.015573263, 0.78167903)
|
||||||
|
bones/21/rotation = Quaternion(0.6219208, -0.0420519, -4.470349e-06, 0.7819503)
|
||||||
|
bones/23/rotation = Quaternion(0.62919796, -0.022414085, -4.4703484e-06, 0.7769219)
|
||||||
|
bones/24/rotation = Quaternion(0.62294686, -0.022176126, -4.321337e-06, 0.7819498)
|
||||||
|
bones/25/rotation = Quaternion(0.6228985, -0.023505569, -4.470348e-06, 0.7819495)
|
||||||
|
bones/27/rotation = Quaternion(-0.12381926, 0.71952313, 0.20183572, 0.6528534)
|
||||||
|
bones/28/rotation = Quaternion(0.18180718, 0.11012438, 0.060063176, 0.97530055)
|
||||||
|
bones/29/rotation = Quaternion(0.59942967, 0.27396533, 0.19463202, 0.726461)
|
||||||
|
bones/30/scale = Vector3(1.0001454, 1.0004877, 1.0005833)
|
||||||
|
bones/31/rotation = Quaternion(0.5022777, -0.49770948, -0.49771312, -0.50227904)
|
||||||
|
bones/32/rotation = Quaternion(-0.12678176, 0.9141871, -0.38489613, -0.006592576)
|
||||||
|
bones/33/rotation = Quaternion(0.33290324, 0.64610326, -0.62797326, 0.27816483)
|
||||||
|
bones/34/rotation = Quaternion(0.17276852, -0.71959734, -0.10874544, 0.6637057)
|
||||||
|
bones/35/rotation = Quaternion(0.62959737, -1.5646219e-07, 4.3809414e-06, 0.7769216)
|
||||||
|
bones/36/rotation = Quaternion(0.62334114, 3.5390258e-07, 4.1127205e-06, 0.78195006)
|
||||||
|
bones/37/rotation = Quaternion(0.6233422, 3.8370484e-07, 4.50015e-06, 0.7819491)
|
||||||
|
bones/39/rotation = Quaternion(0.6288947, 0.029734707, 4.3213367e-06, 0.77692175)
|
||||||
|
bones/40/rotation = Quaternion(0.62273216, 0.027554736, 4.261732e-06, 0.78194976)
|
||||||
|
bones/41/rotation = Quaternion(0.62266856, 0.028961334, 4.7683725e-06, 0.78194964)
|
||||||
|
bones/43/rotation = Quaternion(0.66300094, 0.044529736, -0.07369412, 0.74365044)
|
||||||
|
bones/44/rotation = Quaternion(0.620366, 0.0622941, -0.015573261, 0.7816796)
|
||||||
|
bones/45/rotation = Quaternion(0.6219221, 0.042051878, 4.559756e-06, 0.78194934)
|
||||||
|
bones/46/rotation = Quaternion(-0.03375011, 0.99943036, 7.077092e-09, -1.322724e-07)
|
||||||
|
bones/47/rotation = Quaternion(0.6291982, 0.022413794, 4.053116e-06, 0.77692175)
|
||||||
|
bones/48/rotation = Quaternion(0.62294686, 0.022176448, 4.351139e-06, 0.78194976)
|
||||||
|
bones/49/rotation = Quaternion(0.6228983, 0.02350567, 4.023314e-06, 0.78194976)
|
||||||
|
bones/50/rotation = Quaternion(-0.018857837, 0.9998222, -1.5216909e-08, -2.369153e-07)
|
||||||
|
bones/51/rotation = Quaternion(-0.12381885, -0.71952355, -0.20183557, 0.65285325)
|
||||||
|
bones/52/rotation = Quaternion(0.1818068, -0.110124245, -0.06006264, 0.97530067)
|
||||||
|
bones/53/rotation = Quaternion(0.5994297, -0.27396587, -0.19463214, 0.7264607)
|
||||||
|
bones/54/scale = Vector3(1.0001453, 1.0004876, 1.0005833)
|
||||||
|
bones/55/rotation = Quaternion(0.00025958888, 0.4607678, 0.8867444, 0.03711335)
|
||||||
|
bones/56/rotation = Quaternion(-4.3925076e-05, 0.9994233, 0.033946544, 0.0008547401)
|
||||||
|
bones/57/rotation = Quaternion(-0.0015584944, 0.7702113, -0.6377564, 0.006255097)
|
||||||
|
bones/58/rotation = Quaternion(-2.307046e-08, 1, 1.9169514e-07, 1.2597704e-08)
|
||||||
|
bones/60/rotation = Quaternion(0.00033088264, -0.054793872, 0.99737644, 0.047307186)
|
||||||
|
bones/61/rotation = Quaternion(0.002898427, 0.9524199, -0.30464235, 0.009009286)
|
||||||
|
bones/62/rotation = Quaternion(0.006973758, 0.86046314, -0.50934213, -0.011186128)
|
||||||
|
bones/63/rotation = Quaternion(-1.8697518e-08, 1, 8.940697e-08, 5.0388614e-08)
|
||||||
+6
-2
@@ -26,14 +26,14 @@ point_count = 2
|
|||||||
[node name="testworld" type="Node3D" unique_id=1448501293]
|
[node name="testworld" type="Node3D" unique_id=1448501293]
|
||||||
|
|
||||||
[node name="TemplateMap" parent="." unique_id=2032085612 instance=ExtResource("1_ni718")]
|
[node name="TemplateMap" parent="." unique_id=2032085612 instance=ExtResource("1_ni718")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.016146123, -0.027750015, -0.01200676)
|
transform = Transform3D(1, -4.5642253e-05, -3.493225e-05, 4.5642253e-05, 1, 0.00016479765, 3.493225e-05, -0.00016479765, 1, 0.016146123, -0.027750015, -0.01200676)
|
||||||
|
|
||||||
[node name="CharacterBody3D" parent="TemplateMap" unique_id=1156384226 instance=ExtResource("5_03d72")]
|
[node name="CharacterBody3D" parent="TemplateMap" unique_id=1156384226 instance=ExtResource("5_03d72")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.990337, 1.4689581, -86.62533)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.990337, 1.4689581, -86.62533)
|
||||||
move_speed = 10.0
|
move_speed = 10.0
|
||||||
|
|
||||||
[node name="CharacterBody3D2" parent="TemplateMap" unique_id=1620869369 instance=ExtResource("5_03d72")]
|
[node name="CharacterBody3D2" parent="TemplateMap" unique_id=1620869369 instance=ExtResource("5_03d72")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.89688, 1.4689581, -74.76409)
|
transform = Transform3D(-0.9621562, 0.00013446435, -0.27249858, 4.4650107e-05, 1, 0.00033579618, 0.27249855, 0.00031092128, -0.96215624, -7.8968663, 1.7738063, -74.764046)
|
||||||
move_speed = 10.0
|
move_speed = 10.0
|
||||||
|
|
||||||
[node name="CSGBox3D" type="CSGBox3D" parent="TemplateMap" unique_id=596055600]
|
[node name="CSGBox3D" type="CSGBox3D" parent="TemplateMap" unique_id=596055600]
|
||||||
@@ -104,3 +104,7 @@ progress = 32.75
|
|||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Path3D/PathFollow3D" unique_id=1998172780]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="Path3D/PathFollow3D" unique_id=1998172780]
|
||||||
transform = Transform3D(1, -1.0244548e-08, 1.8626451e-09, 7.21775e-09, 1, 2.9802322e-08, 1.8626451e-09, -1.4901161e-08, 1, 0.19028544, 0.15382338, 2.2735476)
|
transform = Transform3D(1, -1.0244548e-08, 1.8626451e-09, 7.21775e-09, 1, 2.9802322e-08, 1.8626451e-09, -1.4901161e-08, 1, 0.19028544, 0.15382338, 2.2735476)
|
||||||
mesh = SubResource("PrismMesh_rxbp0")
|
mesh = SubResource("PrismMesh_rxbp0")
|
||||||
|
|
||||||
|
[node name="pickAK2" parent="." unique_id=34363287 instance=ExtResource("3_03d72")]
|
||||||
|
transform = Transform3D(0.09143209, -0.99581134, 0, 0.99581134, 0.09143209, 0, 0, 0, 1, -3.3152113, 0.61502457, -33.90423)
|
||||||
|
weaponIdToGive = 6
|
||||||
|
|||||||
Reference in New Issue
Block a user