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(); } }
public void clearNotifications() { StopAllCoroutines(); Notifications = new List <Notification>(); myPanel?.RoundReset(); }