Пример #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();
 }