예제 #1
0
파일: MainUI.cs 프로젝트: ttuktaksoft/golf
    private void ChangeTab(MAIN_MENU_TYPE type)
    {
        if (TraningUIPage.MenuAction || CurrType == type)
        {
            return;
        }

        CurrType = type;
        TraningTab.SetSelect(false);
        AlarmTab.SetSelect(false);
        RewardTab.SetSelect(false);
        UserInfoTab.SetSelect(false);

        TraningUIPage.gameObject.SetActive(false);
        AlarmUIPage.gameObject.SetActive(false);
        RewardUIPage.gameObject.SetActive(false);
        UserInfoUIPage.gameObject.SetActive(false);

        switch (CurrType)
        {
        case MAIN_MENU_TYPE.TRANING:
            TraningTab.SetSelect(true);
            TraningUIPage.gameObject.SetActive(true);
            TraningUIPage.Init(this);
            break;

        case MAIN_MENU_TYPE.ALARM:
            AlarmTab.SetSelect(true);
            AlarmUIPage.gameObject.SetActive(true);
            AlarmUIPage.Init();
            break;

        case MAIN_MENU_TYPE.REWARD:
            RewardTab.SetSelect(true);
            RewardUIPage.gameObject.SetActive(true);
            RewardUIPage.Init();
            break;

        case MAIN_MENU_TYPE.USER_INFO:
            UserInfoTab.SetSelect(true);
            UserInfoUIPage.gameObject.SetActive(true);
            UserInfoUIPage.Init();
            break;

        default:
            break;
        }
    }
예제 #2
0
    public void OnClickBook(BOOK_TYPE type)
    {
        // SoundManager.Instance.PlayFXSound(CommonData.SOUND_TYPE.BUTTON);

        if (SelectBookType == type)
        {
            return;
        }

        SelectBookType = type;

        EndingBookObj.SetActive(false);
        SkinBookObj.SetActive(false);

        EndingBookTab.SetSelect(SelectBookType == BOOK_TYPE.ENDING);
        SkinBookTab.SetSelect(SelectBookType == BOOK_TYPE.SKIN);

        switch (SelectBookType)
        {
        case BOOK_TYPE.ENDING:
            ShowEndingBook();
            break;

        case BOOK_TYPE.SKIN:
            ShowSkinBook();
            break;

        default:
            break;
        }
    }