Первый коммит с LFS.

This commit is contained in:
vladislove committed 2026-01-11 17:04:23 +03:00
1 parent 4fcb1e2f24
commit 179816dc4b
5084 files changed
+3714098 -1

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
using UnityEngine;
public class KnifeController : MonoBehaviour
{
[SerializeField] private Rigidbody[] _knives;
[SerializeField] private AudioSource _audioSource;
[SerializeField] private AudioClip _fallSound;
public void DropKnives()
{
if (_audioSource != null && _fallSound != null)
{
_audioSource.PlayOneShot(_fallSound);
}
foreach (var knifeRb in _knives)
{
if (knifeRb != null)
{
knifeRb.isKinematic = false;
knifeRb.useGravity = true;
}
}
// Опционально: отключаем этот компонент, чтобы ножи не упали снова
// enabled = false;
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 51ff3fcabb344f16a61de20a3d1f9821
timeCreated: 1764805699