Example #1
0
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        //--------------------------------
        // オブジェクトの取得
        //--------------------------------
        m_HeroDetail = m_CanvasObj.GetComponentInChildren <HeroDetail>();
        m_HeroDetail.SetTopAndBottomAjustStatusBar(new Vector2(-65, -131));
        m_HeroSelectButtonPanel = m_CanvasObj.GetComponentInChildren <HeroSelectButtonPanel>();
        m_HeroSelectButtonPanel.SetSizeParfect(new Vector2(0, 78));
        m_UnitSkillPanel = m_CanvasObj.GetComponentInChildren <UnitSkillPanel>();

        m_HeroSelectButtonPanel.ReturnAction = OnClickNextButton;
        m_HeroSelectButtonPanel.IsActiveNext = false;

        PacketStructHero heroData = null;

        if (MainMenuParam.m_HeroCurrentInex >= 0 && MainMenuParam.m_HeroCurrentInex < UserDataAdmin.Instance.m_StructHeroList.Length)
        {
            heroData = UserDataAdmin.Instance.m_StructHeroList[MainMenuParam.m_HeroCurrentInex];
        }
        m_HeroDetail.SetDetail(heroData, OnClickStoryItem);

        MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.HOME;
    }
Example #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;
    }