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));
     }
 }
示例#2
0
        public static void Fade <T>(Fader <T> fader) where T : IFadeActivator
        {
            if (dispatcher is null)
            {
                Init();
            }

            if (!isFading)
            {
                fader.FadeActivator.InitializeFade(fader.Info, fadeLayout);
                AnimSystem.Animate(fader.Info.FadeAnim,
                                   (time) => fader.FadeActivator.Fade(time, fader.Info, fadeLayout),
                                   StartFadeState,
                                   () => {
                    fader.FadeActivator.CleanUp(fader.Info, fadeLayout);
                    EndFadeState();
                });
            }
        }