/
TON618OFF
/
Unity-Project-RTU
Обзор
Документация
Войти
/
TON618OFF
/
Unity-Project-RTU
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Library/PackageCache/com.unity.testtools.codecoverage@1.2.6/Samples~/Tutorial/Asteroids/Scripts/FX/EngineTrail.cs
32 строки
604 B
TON618OFF
release
03 окт 2024, 22:20
03 окт 2024, 22:20
7c70e9f
Код
Авторство
О чём код?
using System.Collections; using UnityEngine; public class EngineTrail : MonoBehaviour { ParticleSystem ps; ParticleSystem.EmissionModule em; void Start() { if (!GameManager.effectsEnabled) gameObject.SetActive(false); ps = GetComponent<ParticleSystem>(); em = ps.emission; em.enabled = true; } public void ClearParticles() { StartCoroutine(Clear()); } IEnumerator Clear() { em.enabled = false; ps.Clear(); yield return null; em.enabled = true; ps.Clear(); } }