/
arti4
/
CourseWork
Обзор
Документация
Войти
/
arti4
/
CourseWork
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Scriptes/FallenFall.cs
25 строк
692 B
arti4
Загрузить файлы в «»
01 июн 2025, 11:56
01 июн 2025, 11:56
6a254d9
Код
Авторство
О чём код?
using UnityEngine; public class FallenFall : MonoBehaviour { public Animator fenceAnimator; private bool hasFallen = false; [SerializeField] private AudioSource audioSource; [SerializeField] private AudioClip destroySound; void Update() { //������� ������ ����� ������ ��� ������ if (!hasFallen) { var boss = Object.FindFirstObjectByType<BossIdentifier>(); if (boss == null) { AudioSource.PlayClipAtPoint(destroySound, transform.position, 1.0f); fenceAnimator.SetTrigger("Fall"); hasFallen = true; } } } }