NotificationName.cs 625 B

1234567891011121314151617181920212223242526272829
  1. using UnityEngine;
  2. using System.Collections;
  3. public class NotificationName : MonoBehaviour {
  4. ScreenBase screen;
  5. UILabel label;
  6. public GameObject SectionDialogButton;
  7. public GameObject SectionErrorButton;
  8. void Awake()
  9. {
  10. label = GetComponentInChildren<UILabel>();
  11. screen = GetComponent<ScreenBase>();
  12. NotificationCenter.AddListener(OnShowNameNotification, NotificationType.ShowEnterNameDialog);
  13. }
  14. void OnDestroy()
  15. {
  16. NotificationCenter.RemoveListener(OnShowNameNotification, NotificationType.ShowEnterNameDialog);
  17. }
  18. public void OnShowNameNotification(Notification note)
  19. {
  20. screen.Show();
  21. }
  22. }