Exemple #1
0
 private void Close()
 {
     Navigation.PopUnique(new Navigation.NavigateBackHandler(WelcomeQuests.OnNavigateBack));
     s_instance = null;
     this.m_clickCatcher.RemoveEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.CloseWelcomeQuests));
     this.FadeEffectsOut();
     object[] args = new object[] { "scale", Vector3.zero, "time", 0.5f, "oncompletetarget", base.gameObject, "oncomplete", "DestroyWelcomeQuests" };
     iTween.ScaleTo(base.gameObject, iTween.Hash(args));
     SoundManager.Get().LoadAndPlay("new_quest_click_and_shrink");
     this.m_bannerFX.Play("BannerClose");
     GameToastMgr.Get().UpdateQuestProgressToasts();
     GameToastMgr.Get().AddSeasonTimeRemainingToast();
     if (this.m_showRequestData != null)
     {
         if (!this.m_showRequestData.m_keepRichPresence)
         {
             PresenceMgr.Get().SetPrevStatus();
         }
         if (this.m_showRequestData.m_onCloseCallback != null)
         {
             this.m_showRequestData.m_onCloseCallback();
         }
     }
     InnKeepersSpecial.Get().Show(false);
 }
Exemple #2
0
 private void InitAndShow(ShowRequestData showRequestData)
 {
     OverlayUI.Get().AddGameObject(base.gameObject, CanvasAnchor.CENTER, false, CanvasScaleMode.HEIGHT);
     this.m_showRequestData = showRequestData;
     if ((AchieveManager.Get().GetActiveQuests(false).Count < 1) && (!InnKeepersSpecial.Get().LoadedSuccessfully() || InnKeepersSpecial.Get().HasAlreadySeenResponse()))
     {
         this.Close();
     }
     else
     {
         this.m_clickCatcher.gameObject.SetActive(true);
         this.m_clickCatcher.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.CloseWelcomeQuests));
         this.ShowActiveQuests();
         this.FadeEffectsIn();
         base.transform.localScale = new Vector3(0.001f, 0.001f, 0.001f);
         iTween.ScaleTo(base.gameObject, this.m_originalScale, 0.5f);
         int val = Options.Get().GetInt(Option.IKS_VIEWS, 0) + 1;
         Options.Get().SetInt(Option.IKS_VIEWS, val);
         if ((showRequestData.m_fromLogin && InnKeepersSpecial.Get().LoadedSuccessfully()) && (val > 3))
         {
             if (UniversalInputManager.UsePhoneUI != null)
             {
                 Vector3 localPosition = base.transform.localPosition;
                 localPosition.y += 2f;
                 base.transform.localPosition = localPosition;
             }
             InnKeepersSpecial.Get().Show(true);
         }
         Navigation.PushUnique(new Navigation.NavigateBackHandler(WelcomeQuests.OnNavigateBack));
     }
 }
Exemple #3
0
 private void OnDestroy()
 {
     if (s_instance != null)
     {
         Navigation.PopUnique(new Navigation.NavigateBackHandler(WelcomeQuests.OnNavigateBack));
         s_instance = null;
         this.FadeEffectsOut();
         InnKeepersSpecial.Get().Show(false);
     }
 }