Panel.cs 300 B

123456789101112131415161718192021
  1. using UnityEngine;
  2. using System.Collections;
  3. public class Panel : MonoBehaviour
  4. {
  5. public void Open()
  6. {
  7. GetComponent<Animator>().Play("PanelShow");
  8. }
  9. public void Close()
  10. {
  11. GetComponent<Animator>().Play("PanelHide");
  12. }
  13. public void HideAnimationEnd()
  14. {
  15. Destroy(this.gameObject);
  16. }
  17. }