Effect.cs 604 B

12345678910111213141516171819202122232425262728293031323334
  1. using UnityEngine;
  2. using System.Collections;
  3. public class Effect : MonoBehaviour
  4. {
  5. #region 变量
  6. public ParticleSystem ParticleSystem
  7. {
  8. get
  9. {
  10. if (ParticleSystem_ == null)
  11. {
  12. ParticleSystem_ = GetComponent<ParticleSystem>();
  13. }
  14. return ParticleSystem_;
  15. }
  16. set { ParticleSystem = value; }
  17. }
  18. public ParticleSystem ParticleSystem_;
  19. #endregion
  20. private void Update()
  21. {
  22. if (!ParticleSystem.isPlaying)
  23. {
  24. ManaReso.Save(gameObject);
  25. }
  26. }
  27. }