示例#1
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        image = GetComponent <Image>();
        color = image.color;

        myPanel = transform.parent.GetComponentInChildren <NotificationsPanel>(true);
        if (!myPanel)
        {
            Debug.LogWarning("myPanel not found!", gameObject);
        }
        else
        {
            myPanel.RoundReset();
        }
    }
示例#2
0
 public void clearNotifications()
 {
     StopAllCoroutines();
     Notifications = new List <Notification>();
     myPanel?.RoundReset();
 }