using UnityEngine; using System.Collections; public class Effect : MonoBehaviour { #region 变量 public ParticleSystem ParticleSystem { get { if (ParticleSystem_ == null) { ParticleSystem_ = GetComponent(); } return ParticleSystem_; } set { ParticleSystem = value; } } public ParticleSystem ParticleSystem_; #endregion private void Update() { if (!ParticleSystem.isPlaying) { ManaReso.Save(gameObject); } } }