ParticleManager.cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
using UnityEngine; /// <summary> /// /// Unity 2018.2.17f1 /// /// </summary> public class ParticleManager : MonoBehaviour { // Inspector [SerializeField] private ParticleSystem particle; // 1. 再生 private void Play() { particle.Play(); } // 2. 一時停止 private void Pause() { particle.Pause(); } // 3. 停止 private void Stop() { particle.Stop(); } } |