Пример #1
0
 private void Update()
 {
     if (updateSceneButton != null)
     {
         MAIN_SCENE mAIN_SCENE = GameDefine.SceneNameToEnum(updateSceneButton);
         updateSceneButton = null;
         activeSceneButton = null;
         UpdateSceneButton(mAIN_SCENE, MAIN_SCENE.HOME, UI._SPR_HOME_ACTIVE, UI.SPR_HOME_ACTIVE_DECORATION, UI._SPR_HOME_INACTIVE);
         UpdateSceneButton(mAIN_SCENE, MAIN_SCENE.LOUNGE, UI._SPR_LOUNGE_ACTIVE, UI.SPR_LOUNGE_ACTIVE_DECORATION, UI._SPR_LOUNGE_INACTIVE);
         UpdateSceneButton(mAIN_SCENE, MAIN_SCENE.QUEST, UI._SPR_QUEST_ACTIVE, UI.SPR_QUEST_ACTIVE_DECORATION, UI._SPR_QUEST_INACTIVE);
         UpdateSceneButton(mAIN_SCENE, MAIN_SCENE.STUDIO, UI._SPR_STUDIO_ACTIVE, UI.SPR_STUDIO_ACTIVE_DECORATION, UI._SPR_STUDIO_INACTIVE);
         UpdateSceneButton(mAIN_SCENE, MAIN_SCENE.SHOP, UI._SPR_SHOP_ACTIVE, UI.SPR_SHOP_ACTIVE_DECORATION, UI._SPR_SHOP_INACTIVE);
         if (!isPopMenu)
         {
             activeSceneButton = null;
         }
         if (MonoBehaviourSingleton <OutGameEffectManager> .IsValid())
         {
             if (activeSceneButton != null)
             {
                 MonoBehaviourSingleton <OutGameEffectManager> .I.UpdateSceneButtonEffect(mAIN_SCENE, activeSceneButton);
             }
             else
             {
                 MonoBehaviourSingleton <OutGameEffectManager> .I.ReleaseSceneButtonEffect();
             }
         }
     }
 }
Пример #2
0
    public void UpdateMainMenu()
    {
        string currentSectionName = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSectionName();

        string currentSceneName = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName();

        MAIN_SCENE mAIN_SCENE = GameDefine.SceneNameToEnum(currentSceneName);

        if ((mAIN_SCENE != nowScene && mAIN_SCENE != MAIN_SCENE.MAX) || (nowScene == MAIN_SCENE.HOME && currentSectionName == "StoryMain"))
        {
            if (mAIN_SCENE == MAIN_SCENE.HOME || mAIN_SCENE == MAIN_SCENE.LOUNGE)
            {
                if (!TutorialStep.HasAllTutorialCompleted() || !MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(TUTORIAL_MENU_BIT.GACHA1) || !MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(TUTORIAL_MENU_BIT.GACHA2) || !MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(TUTORIAL_MENU_BIT.SKILL_EQUIP))
                {
                    ResetTween((Enum)UI.TWN_POP_MENU, 0);
                    isPopMenu = false;
                    SkipTween((Enum)UI.TWN_POP_MENU, false, 0);
                }
                else
                {
                    ResetTween((Enum)UI.TWN_POP_MENU, 0);
                    isPopMenu = (PlayerPrefs.GetInt("IS_POP_FOOTER_MENU", 0) == 1);
                    SkipTween((Enum)UI.TWN_POP_MENU, isPopMenu, 0);
                }
            }
            else
            {
                ResetTween((Enum)UI.TWN_POP_MENU, 0);
                isPopMenu = true;
                SkipTween((Enum)UI.TWN_POP_MENU, true, 0);
            }
            if (_delegate == null)
            {
                _delegate = new EventDelegate(POP_MENU);
                UIButton component = base.GetComponent <UIButton>((Enum)UI.BTN_POP_MENU);
                if (!component.onClick.Contains(_delegate))
                {
                    component.onClick.Add(_delegate);
                }
            }
            UpdateUI();
            nowScene = mAIN_SCENE;
        }
        else
        {
            UpdateNewMapUI();
        }
    }