UI.cs 421 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. public class UI : MonoBehaviour
  6. {
  7. private void Start()
  8. {
  9. GamePassEvent.Register(OnGamePass);
  10. }
  11. private void OnGamePass()
  12. {
  13. transform.Find("Canvas/GamePassPanel").gameObject.SetActive(true) ;
  14. }
  15. private void OnDestroy()
  16. {
  17. GamePassEvent.UnRegister(OnGamePass);
  18. }
  19. }