예제 #1
0
 private FriendListAvailabilityBlockerReasons GetAvailabilityBlockerReason()
 {
     if (!this.m_netCacheReady)
     {
         return(FriendListAvailabilityBlockerReasons.NETCACHE_NOT_READY);
     }
     if (!this.m_myPlayerReady)
     {
         return(FriendListAvailabilityBlockerReasons.MY_PLAYER_NOT_READY);
     }
     if (this.HasChallenge())
     {
         return(FriendListAvailabilityBlockerReasons.HAS_EXISTING_CHALLENGE);
     }
     if (SpectatorManager.Get().IsInSpectatorMode())
     {
         return(FriendListAvailabilityBlockerReasons.SPECTATING_GAME);
     }
     if (GameMgr.Get().IsFindingGame())
     {
         return(FriendListAvailabilityBlockerReasons.FINDING_GAME);
     }
     if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.FATAL_ERROR))
     {
         return(FriendListAvailabilityBlockerReasons.HAS_FATAL_ERROR);
     }
     if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.LOGIN))
     {
         return(FriendListAvailabilityBlockerReasons.LOGGING_IN);
     }
     if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.STARTUP))
     {
         return(FriendListAvailabilityBlockerReasons.STARTING_UP);
     }
     if (SceneMgr.Get().IsModeRequested(SceneMgr.Mode.GAMEPLAY))
     {
         if (GameMgr.Get().IsSpectator() || GameMgr.Get().IsNextSpectator())
         {
             return(FriendListAvailabilityBlockerReasons.SPECTATING_GAME);
         }
         if (!GameMgr.Get().IsAI() && !GameMgr.Get().IsNextAI())
         {
             return(FriendListAvailabilityBlockerReasons.PLAYING_NON_AI_GAME);
         }
         return(FriendListAvailabilityBlockerReasons.PLAYING_AI_GAME);
     }
     if (!GameUtils.AreAllTutorialsComplete())
     {
         return(FriendListAvailabilityBlockerReasons.TUTORIALS_INCOMPLETE);
     }
     if (ShownUIMgr.Get().GetShownUI() == ShownUIMgr.UI_WINDOW.GENERAL_STORE)
     {
         return(FriendListAvailabilityBlockerReasons.STORE_IS_SHOWN);
     }
     if ((TavernBrawlDisplay.Get() != null) && TavernBrawlDisplay.Get().IsInDeckEditMode())
     {
         return(FriendListAvailabilityBlockerReasons.EDITING_TAVERN_BRAWL);
     }
     return(FriendListAvailabilityBlockerReasons.NONE);
 }
예제 #2
0
    private bool CanShowCredits()
    {
        SceneMgr.Mode mode = SceneMgr.Get().GetMode();
        switch (mode)
        {
        case SceneMgr.Mode.GAMEPLAY:
        case SceneMgr.Mode.PACKOPENING:
            break;

        default:
            switch (mode)
            {
            case SceneMgr.Mode.CREDITS:
            case SceneMgr.Mode.ADVENTURE:
                break;

            case SceneMgr.Mode.RESET:
                goto Label_003D;

            default:
                goto Label_003D;
            }
            break;
        }
        return(false);

Label_003D:
        if ((GeneralStore.Get() != null) && GeneralStore.Get().IsShown())
        {
            return(false);
        }
        if (Network.Get().IsFindingGame())
        {
            return(false);
        }
        if (!GameUtils.AreAllTutorialsComplete())
        {
            return(false);
        }
        if (WelcomeQuests.Get() != null)
        {
            return(false);
        }
        if ((ArenaStore.Get() != null) && ArenaStore.Get().IsShown())
        {
            return(false);
        }
        if ((DraftDisplay.Get() != null) && (DraftDisplay.Get().GetDraftMode() == DraftDisplay.DraftMode.IN_REWARDS))
        {
            return(false);
        }
        return(true);
    }
예제 #3
0
 protected override void ShowStandardFlow()
 {
     base.ShowStandardFlow();
     if (!GameMgr.Get().IsTutorial() || GameMgr.Get().IsSpectator())
     {
         base.m_hitbox.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.ContinueButtonPress_PrevMode));
     }
     else if (GameUtils.AreAllTutorialsComplete())
     {
         LoadingScreen.Get().SetFadeColor(Color.white);
         base.m_hitbox.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.ContinueButtonPress_FirstTimeHub));
     }
     else if ((DemoMgr.Get().GetMode() == DemoMode.APPLE_STORE) && (GameUtils.GetNextTutorial() == 0))
     {
         base.StartCoroutine(DemoMgr.Get().CompleteAppleStoreDemo());
     }
     else
     {
         base.m_hitbox.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.ContinueButtonPress_TutorialProgress));
     }
 }