UIROController.cs 577 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using UnityEngine;
  3. public class UIROController : SingletonMono<UIROController>
  4. {
  5. public void Show()
  6. {
  7. this._panel.SetActive(true);
  8. this._isPlaying = true;
  9. }
  10. public void Hide()
  11. {
  12. this._panel.SetActive(false);
  13. this._isPlaying = false;
  14. }
  15. private void Update()
  16. {
  17. if (this._isPlaying && !this._animation.isPlaying)
  18. {
  19. this._panel.SetActive(false);
  20. this._isPlaying = false;
  21. }
  22. }
  23. [SerializeField]
  24. private GameObject _panel;
  25. [SerializeField]
  26. private Animation _animation;
  27. private bool _isPlaying;
  28. }