示例#1
0
    public override void OnInitialized()
    {
        base.OnInitialized();

        switch (m_ShowObjectType)
        {
        case SHOW_OBJECT_TYPE.FORM:
            // データの設定
            int index = Array.FindIndex(UserDataAdmin.Instance.m_StructHeroList, v => v.unique_id == UserDataAdmin.Instance.m_StructPlayer.current_hero_id);

            m_HeroForm.SetFormDatas(HeroForm.CreateFormDatas(null, null, null), index);
            m_HeroForm.OnClickNextButtonAction     = OnClickFormPreviousButton;
            m_HeroForm.OnClickPreviousButtonAction = OnClickFormNextButton;
            break;

        case SHOW_OBJECT_TYPE.DETAIL:
            m_HeroDetail.SetDetail(null, OnClickStoryItem);
            break;

        case SHOW_OBJECT_TYPE.PREVIEW:
            break;

        default:
            break;
        }

        m_ButtonPanel.SetBottomPositionY(82);
    }
示例#2
0
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        //--------------------------------
        // オブジェクトの取得
        //--------------------------------
        m_HeroForm = m_CanvasObj.GetComponentInChildren <HeroForm>();
        m_HeroForm.SetPositionAjustStatusBar(new Vector2(0, -20), new Vector2(0, -240));
        m_HeroSelectButtonPanel = m_CanvasObj.GetComponentInChildren <HeroSelectButtonPanel>();
        m_HeroSelectButtonPanel.SetSizeParfect(new Vector2(0, 78));

        m_HeroSelectButtonPanel.NextAction     = OnClickNextButton;
        m_HeroSelectButtonPanel.IsActiveReturn = false;

        UnityUtil.SetObjectEnabledOnce(m_HeroSelectButtonPanel.gameObject, false);

        // データの設定
        int index;

        if (MainMenuParam.m_HeroSelectReturn)
        {
            index = MainMenuParam.m_HeroCurrentInex;
            MainMenuParam.m_HeroSelectReturn = false;
        }
        else
        {
            index = Array.FindIndex(UserDataAdmin.Instance.m_StructHeroList, v => v.unique_id == UserDataAdmin.Instance.m_StructPlayer.current_hero_id);
        }

        HeroForm.CreateFormDatas(OnClickFaceImage, (v) =>
        {
            UnityUtil.SetObjectLayer(gameObject, LayerMask.NameToLayer("DRAW_CLIP"));
            m_HeroForm.SetFormDatas(v, index);
        },
                                 () =>
        {
            UnityUtil.SetObjectLayer(gameObject, LayerMask.NameToLayer("GUI"));
            UnityUtil.SetObjectEnabledOnce(m_HeroSelectButtonPanel.gameObject, true);
        });

        m_HeroForm.OnClickNextButtonAction     = OnClickFormNextButton;
        m_HeroForm.OnClickPreviousButtonAction = OnClickFormPreviousButton;
        m_HeroForm.OnClickDecisionButtonAction = OnClickDecisionButton;

        MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.HOME;
    }