Example #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);
 }
Example #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));
     }
 }
 public static void Init()
 {
     if (s_instance == null)
     {
         s_instance = AssetLoader.Get().LoadGameObject("InnKeepersSpecial", true, false).GetComponent <InnKeepersSpecial>();
         OverlayUI.Get().AddGameObject(s_instance.gameObject, CanvasAnchor.CENTER, false, CanvasScaleMode.HEIGHT);
     }
 }
Example #4
0
 private void OnDestroy()
 {
     if (s_instance != null)
     {
         Navigation.PopUnique(new Navigation.NavigateBackHandler(WelcomeQuests.OnNavigateBack));
         s_instance = null;
         this.FadeEffectsOut();
         InnKeepersSpecial.Get().Show(false);
     }
 }
 private void Start()
 {
     this.UpdateLayout();
     InnKeepersSpecial.Init();
 }