private static void OnEndShowNotification(AchievementNotifyLayout notification) { notification.SetActive(false); isBusy = false; if (notificationQueue.Count > 0) { KeyValuePair <AchievementNotifyLayout, AchievementModel> kvp = notificationQueue.Dequeue(); ShowNotification(kvp.Key, kvp.Value); } }
internal static void ShowNotification(AchievementNotifyLayout notification, AchievementModel notifyInfo) { if (!isBusy) { isBusy = true; notification.FillNotify(notifyInfo); AnimSystem.Animate(notification.NotifyAnim, (time) => OnNotifyActivation(time, notification.GetTransform()), () => notification.SetActive(true), () => OnEndShowNotification(notification)); } else { notificationQueue.Enqueue(new KeyValuePair <AchievementNotifyLayout, AchievementModel>(notification, notifyInfo)); } }