Пример #1
0
    public void OnEndEditID(string value)
    {
        uint u;

        uint.TryParse(value, out u);
        SetUpParamChara(MasterDataUtil.GetCharaParamFromID(u));
    }
Пример #2
0
    private void addMaterial(uint chara_id)
    {
        uint id = (uint)MaterialList.Count;
        MasterDataParamChara materialMaster = MasterDataUtil.GetCharaParamFromID(chara_id);

        if (materialMaster == null)
        {
            return;
        }
        MaterialValue += materialMaster.name + "\n";

        var iconModel = new ListItemModel((uint)id);

        MaterialDataContext _newData = new MaterialDataContext(iconModel);

        _newData.m_Id       = (int)id;
        _newData.m_CharaId  = chara_id;
        _newData.IsViewIcon = true;
        UnitIconImageProvider.Instance.Get(
            chara_id,
            sprite =>
        {
            _newData.IconImage = sprite;
        });
        _newData.IconColor = new Color(1, 1, 1);

        _newData.Width  = m_IconSize;
        _newData.Height = m_IconSize;
        _newData.calcScale();

        _newData.SelectImage = ResourceManager.Instance.Load("icon_square1");

        MaterialList.Add(_newData);
    }
Пример #3
0
    public void AddUnit(uint unit_id)
    {
        if (unit_id == 0)
        {
            return;
        }

        DebugGetUnitListItemContext unit = Units.Find((v) => v.unitID == 0);

        if (unit == null)
        {
            return;
        }
        MasterDataParamChara charaMaster = MasterDataUtil.GetCharaParamFromID(unit_id);

        if (charaMaster == null)
        {
            return;
        }
        unit.unitID   = unit_id;
        unit.UnitName = string.Format("ID:{0}", charaMaster.draw_id);

        UnitIconImageProvider.Instance.Get(
            unit_id,
            sprite =>
        {
            unit.UnitImage = sprite;
        },
            true);
    }
Пример #4
0
    public void OnClickClear()
    {
        m_Y = m_adjustY;
        m_OffsetYInputField.text = m_Y.ToString();

        CheckAdjustUV();
        SetUpPosition();
        SetUpParamChara(MasterDataUtil.GetCharaParamFromID(m_InitCharaID));
    }
Пример #5
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief
     */
    //----------------------------------------------------------------------------
    static public int GetPacketUnitCost(PacketStructUnit cPacketUnit)
    {
        if (cPacketUnit == null)
        {
            return(0);
        }

        MasterDataParamChara cCharaParam = MasterDataUtil.GetCharaParamFromID(cPacketUnit.id);

        if (cCharaParam == null)
        {
            return(0);
        }

        return(cCharaParam.party_cost);
    }
Пример #6
0
    private IEnumerator RepeatGet()
    {
        while (cMasterDataChara == null)
        {
            yield return(new WaitForEndOfFrame());

            //----------------------------------------
            // マスターデータ取得
            //----------------------------------------
            cMasterDataChara = MasterDataUtil.GetCharaParamFromID(m_AutoSetCharaID);

            if (cMasterDataChara == null)
            {
                Debug.LogError("CharaID Error! - " + m_AutoSetCharaID);
            }
            else
            {
                m_AssetBundler = AssetBundler.Create().
                                 SetAsUnitTexture(
                    m_AutoSetCharaID,
                    (o) =>
                {
                    if (m_UseUncompressed)
                    {
                        Set(o.GetUncompressedTexture2D());
                    }
                    else
                    {
                        Set(o.GetTexture2D(TextureWrapMode.Clamp));
                    }
                },
                    (str) =>
                {
                    m_Ready = true;
                }).
                                 Load();
            }
        }
    }
    //----------------------------------------------------------------------------

    /*!
     *          @brief	進化演出ステップ:ステータスウィンドウを有効化
     *          @note
     */
    //----------------------------------------------------------------------------
    void ExecStep_130_WindowStatusIn()
    {
        //-------------------
        // トリガー処理
        //-------------------
        if (m_WorkStepTriger == true)
        {
            m_LayoutWindow.AddSwitchRequest(LAYER_WINDOW_EMPTY, false);

            MasterDataParamChara cCharaMasterData = MasterDataUtil.GetCharaParamFromID(MainMenuParam.m_EvolveBaseAfter.id);
            m_UnitNamePanel.setup(cCharaMasterData);
        }

        //-------------------
        // 更新完遂待ち
        //-------------------
        if (m_LayoutWindow.ChkLayoutAnimationFinish(LAYER_WINDOW_EMPTY) == true
            )
        {
            m_WorkStep++;
        }
    }
Пример #8
0
    /// <summary>
    /// ユニット画像のロード開始
    /// </summary>
    /// <param name="fix_id"></param>
    private void LoadUnit(uint fix_id)
    {
        MasterDataParamChara charaMaster = MasterDataUtil.GetCharaParamFromID(fix_id);

        if (charaMaster == null)
        {
            IsLoading = true;
            return;
        }

        m_AssetBundler = AssetBundler.Create().SetAsUnitTexture(fix_id,
                                                                (o) =>
        {
            m_Texture      = o.GetTexture2D(TextureWrapMode.Clamp);
            m_Texture_mask = null;
            IsLoading      = true;
        },
                                                                (str) =>
        {
            IsLoading = true;
            IsFail    = true;
        })
                         .Load();
    }
Пример #9
0
    public void OnEndEditID(string value)
    {
        uint unit_id = 0;

        uint.TryParse(value, out unit_id);

        m_SearchCharaMaster = MasterDataUtil.GetCharaParamFromID(unit_id); // キャラクターのマスターデータを取得

        string noText = "";

        if (m_SearchCharaMaster != null)
        {
            noText      = m_SearchCharaMaster.draw_id.ToString();
            IDTextColor = Color.black;
            NoTextColor = Color.black;
        }
        else
        {
            IDTextColor = Color.red;
            NoTextColor = Color.red;
        }

        m_NoInputField.text = noText;
    }
Пример #10
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	ステータス更新
     *          @note
     */
    //----------------------------------------------------------------------------
    void SetupBlendAfterStatus()
    {
        //-----------------------
        // 必要ポイントの算出
        //-----------------------
        m_BlendPoint  = 0;
        m_BlendPoint += (m_BaseCharaMaster != null) ? (uint)m_BaseCharaMaster.evol_unitpoint : 0;

        //-----------------------
        // 合成時のパラメータ数値表示部分を更新
        //-----------------------
        if (m_BaseUnit != null &&
            m_CharaEvol != null)
        {
            MasterDataParamChara cCharaMasterData      = MasterDataUtil.GetCharaParamFromID(m_BaseUnit.id);
            MasterDataParamChara cCharaMasterDataAfter = MasterDataUtil.GetCharaParamFromID(m_CharaEvol.unit_id_after);
            if (cCharaMasterData != null &&
                cCharaMasterDataAfter != null
                )
            {
                m_UnitBGPanel.Point = (int)m_BlendPoint;
            }

            uint plus_pow = m_BaseUnit.add_pow;
            uint plus_hp  = m_BaseUnit.add_hp;

            //プラス値最大チェック
            if (plus_pow > GlobalDefine.PLUS_MAX)
            {
                plus_pow = GlobalDefine.PLUS_MAX;
            }
            if (plus_hp > GlobalDefine.PLUS_MAX)
            {
                plus_hp = GlobalDefine.PLUS_MAX;
            }

            //進化後パラメータ
            m_UnitStatusPanel.setupChara(m_AfterCharaMaster.fix_id, UnitStatusPanel.StatusType.LV_1, m_BaseUnit.limitover_lv, plus_pow, plus_hp);

            // 進化後パラメータはLv1のステータスが設定されるため、ActiveSkillLvをベースユニットから引き継いで設定する.
            uint activeSkillLv    = 0;
            int  activeSkillLvMax = 0;
            if (cCharaMasterDataAfter.skill_limitbreak != 0)
            {
                if (cCharaMasterData.skill_limitbreak == cCharaMasterDataAfter.skill_limitbreak)
                {
                    //進化後も同じスキルの場合はLVを引き継ぐ
                    activeSkillLv = m_BaseUnit.limitbreak_lv + 1;
                }
                else
                {
                    //進化後のスキルが違う場合は1にする。
                    activeSkillLv = 1;
                }
                MasterDataSkillLimitBreak cMasterSkillLimitBreak = MasterDataUtil.GetLimitBreakSkillParamFromID(cCharaMasterDataAfter.skill_limitbreak);
                activeSkillLvMax = cMasterSkillLimitBreak.level_max + 1;
            }
            m_UnitStatusPanel.Aslv    = string.Format(GameTextUtil.GetText("unit_status15"), activeSkillLv);
            m_UnitStatusPanel.AslvMax = string.Format(GameTextUtil.GetText("unit_status15"), activeSkillLvMax);
        }
    }
Пример #11
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	セットアップ
     *          @note
     */
    //----------------------------------------------------------------------------
    public bool Setup(GameObject cCutinRoot, uint unUnitID, int nObjType)
    {
        if (cCutinRoot == null)
        {
            return(false);
        }

        //--------------------------------
        // オブジェクトタイプによる分岐
        //--------------------------------
        switch (nObjType)
        {
        // 固定ユニット
        case MainMenuDefine.CUTIN_OBJ_TYPE_FIX:
            m_CutinObj = MonoBehaviour.Instantiate(SceneObjReferMainMenu.Instance.m_OriginObjEvolCutinFriend) as GameObject;
            break;

        // 消費ユニット
        case MainMenuDefine.CUTIN_OBJ_TYPE_COST:
            m_CutinObj = MonoBehaviour.Instantiate(SceneObjReferMainMenu.Instance.m_OriginObjEvolCutinParts) as GameObject;
            break;
        }
        if (m_CutinObj == null)
        {
            return(false);
        }

        //--------------------------------
        // 基本姿勢設定
        //--------------------------------
        m_CutinObj.transform.parent        = cCutinRoot.transform;
        m_CutinObj.transform.localPosition = GlobalDefine.VECTOR_ZERO;
        m_CutinObj.transform.localScale    = GlobalDefine.VECTOR_ONE;
        m_CutinObj.transform.localRotation = new Quaternion();

        //--------------------------------
        // アニメーションルートを取得
        //--------------------------------
        GameObject cBaseObjAnim = UnityUtil.GetChildNode(m_CutinObj, "CutinBaseAnim");
        GameObject cUnitObjAnim = UnityUtil.GetChildNode(m_CutinObj, "CutinUnitAnim");

        //--------------------------------
        // 各種設定
        //--------------------------------
        #region ==== 帯オブジェクト ====
        if (cBaseObjAnim != null)
        {
            // NONE定義分、回復属性分「-2」する(キャラ属性に、回復はないため)
            m_BaseObj = new GameObject[(int)MasterDataDefineLabel.ElementType.MAX - 2];

            // 帯オブジェクトを取得
            m_BaseObj[(int)MasterDataDefineLabel.ElementType.FIRE - 1]   = UnityUtil.GetChildNode(cBaseObjAnim, "BaseFire");
            m_BaseObj[(int)MasterDataDefineLabel.ElementType.WATER - 1]  = UnityUtil.GetChildNode(cBaseObjAnim, "BaseWater");
            m_BaseObj[(int)MasterDataDefineLabel.ElementType.WIND - 1]   = UnityUtil.GetChildNode(cBaseObjAnim, "BaseWind");
            m_BaseObj[(int)MasterDataDefineLabel.ElementType.LIGHT - 1]  = UnityUtil.GetChildNode(cBaseObjAnim, "BaseLight");
            m_BaseObj[(int)MasterDataDefineLabel.ElementType.DARK - 1]   = UnityUtil.GetChildNode(cBaseObjAnim, "BaseDark");
            m_BaseObj[(int)MasterDataDefineLabel.ElementType.NAUGHT - 1] = UnityUtil.GetChildNode(cBaseObjAnim, "BaseNaught");

            // アニメーション
            m_BaseAnim = cBaseObjAnim.GetComponent <AnimationClipShot>();
        }
        #endregion

        #region ==== ユニットオブジェクト ====
        if (cUnitObjAnim != null)
        {
            // NONE定義分、回復属性分「-2」する(キャラ属性に、回復はないため)
            m_UnitObj = new GameObject[(int)MasterDataDefineLabel.ElementType.MAX - 2];

            // ユニットオブジェクトを取得
            m_UnitObj[(int)MasterDataDefineLabel.ElementType.FIRE - 1]   = UnityUtil.GetChildNode(cUnitObjAnim, "UnitFire");
            m_UnitObj[(int)MasterDataDefineLabel.ElementType.WATER - 1]  = UnityUtil.GetChildNode(cUnitObjAnim, "UnitWater");
            m_UnitObj[(int)MasterDataDefineLabel.ElementType.WIND - 1]   = UnityUtil.GetChildNode(cUnitObjAnim, "UnitWind");
            m_UnitObj[(int)MasterDataDefineLabel.ElementType.LIGHT - 1]  = UnityUtil.GetChildNode(cUnitObjAnim, "UnitLight");
            m_UnitObj[(int)MasterDataDefineLabel.ElementType.DARK - 1]   = UnityUtil.GetChildNode(cUnitObjAnim, "UnitDark");
            m_UnitObj[(int)MasterDataDefineLabel.ElementType.NAUGHT - 1] = UnityUtil.GetChildNode(cUnitObjAnim, "UnitNaught");

            // アニメーション
            m_UnitAnim = cUnitObjAnim.GetComponent <Animation>();

            // ユニット情報を取得
            m_Master = MasterDataUtil.GetCharaParamFromID(unUnitID);
            //			m_Resource = AssetBundleUtil.RequestCharaTexture( unUnitID );
        }
        #endregion


        // 非表示設定
        for (int num = 0; num < (int)MasterDataDefineLabel.ElementType.MAX - 2; ++num)
        {
            UnityUtil.SetObjectEnabled(m_BaseObj[num], false);
            UnityUtil.SetObjectEnabled(m_UnitObj[num], false);
        }

        UnityUtil.SetObjectEnabledOnce(m_CutinObj, false);

        m_Texture = null;
        AssetBundler.Create().
        SetAsUnitTexture(
            unUnitID,
            (o) =>
        {
            m_Texture = o.GetTexture2D(TextureWrapMode.Clamp);
        }).
        Load();

        return(true);
    }
Пример #12
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	ステータス更新
     *          @note
     */
    //----------------------------------------------------------------------------
    void SetupBlendAfterStatus()
    {
        //-----------------------
        // 必要資金の算出
        //-----------------------
        m_BlendMoney  = 0;
        m_BlendMoney += (m_CharaEvol != null) ? m_CharaEvol.money : 0;

        //-----------------------
        // 合成時のパラメータ数値表示部分を更新
        //-----------------------
        if (m_BaseUnit != null &&
            m_CharaEvol != null)
        {
            MasterDataParamChara cCharaMasterData      = MasterDataUtil.GetCharaParamFromID(m_BaseUnit.id);
            MasterDataParamChara cCharaMasterDataAfter = MasterDataUtil.GetCharaParamFromID(m_CharaEvol.unit_id_after);
            if (cCharaMasterData != null &&
                cCharaMasterDataAfter != null
                )
            {
                //----------------------------------------
                // 初心者ブースト適用
                // 表示用の値を計算、補正値を適用
                //
                // ※費用倍率が1倍の場合は表示反映しない
                //----------------------------------------
                if (MainMenuParam.m_BeginnerBoost != null &&
                    MainMenuParam.m_BeginnerBoost.boost_build_money != 100
                    )
                {
                    m_BlendMoney = MasterDataUtil.ConvertBeginnerBoostBuildMoney(ref MainMenuParam.m_BeginnerBoost, m_BlendMoney);
                }

                m_UnitBGPanel.Money = (int)m_BlendMoney;
            }

            uint plus_pow = m_BaseUnit.add_pow;
            uint plus_hp  = m_BaseUnit.add_hp;
            for (int i = 0; i < m_UnitMaterialPanel.MaterialList.Count; i++)
            {
                if (m_UnitMaterialPanel.MaterialList[i].m_UniqueId == 0)
                {
                    continue;
                }
                PacketStructUnit unit = UserDataAdmin.Instance.SearchChara(m_UnitMaterialPanel.MaterialList[i].m_UniqueId);
                if (unit == null)
                {
                    continue;
                }
                plus_pow += unit.add_pow;
                plus_hp  += unit.add_hp;
            }

            //プラス値最大チェック
            if (plus_pow > GlobalDefine.PLUS_MAX)
            {
                plus_pow = GlobalDefine.PLUS_MAX;
            }
            if (plus_hp > GlobalDefine.PLUS_MAX)
            {
                plus_hp = GlobalDefine.PLUS_MAX;
            }

            //進化後パラメータ
            m_UnitStatusPanel.setupChara(m_AfterCharaMaster.fix_id, UnitStatusPanel.StatusType.LV_1, m_BaseUnit.limitover_lv, plus_pow, plus_hp);

            // 進化後パラメータはLv1のステータスが設定されるため、ActiveSkillLvをベースユニットから引き継いで設定する.
            uint activeSkillLv    = 0;
            int  activeSkillLvMax = 0;
            if (cCharaMasterDataAfter.skill_limitbreak != 0)
            {
                if (cCharaMasterData.skill_limitbreak == cCharaMasterDataAfter.skill_limitbreak)
                {
                    //進化後も同じスキルの場合はLVを引き継ぐ
                    activeSkillLv = m_BaseUnit.limitbreak_lv + 1;
                }
                else
                {
                    //進化後のスキルが違う場合は1にする。
                    activeSkillLv = 1;
                }
                MasterDataSkillLimitBreak cMasterSkillLimitBreak = MasterDataUtil.GetLimitBreakSkillParamFromID(cCharaMasterDataAfter.skill_limitbreak);
                activeSkillLvMax = cMasterSkillLimitBreak.level_max + 1;
            }
            m_UnitStatusPanel.Aslv    = string.Format(GameTextUtil.GetText("unit_status15"), activeSkillLv);
            m_UnitStatusPanel.AslvMax = string.Format(GameTextUtil.GetText("unit_status15"), activeSkillLvMax);
        }
    }
Пример #13
0
    /// <summary>
    /// リンクボーナス設定
    /// </summary>
    /// <param name="skill_id"></param>
    public void setupUnitData(CharaOnce cCharaParam, MasterDataParamChara cCharaMasterData)
    {
        BaseHeight  = BASE_LINK_BONUS_HEIGHT;
        TitleHeight = TITLE_DEFAULT_HEIGHT;
        TitleWidth  = LINK_BONUS_TITLE_WIDTH;
        MessageBgH  = LINK_MESSAGE_BG_HEIGHT;
        setLinkTitleImage("skill_name_bg1", "linkubo-nasu");
        LvLabel      = GameTextUtil.GetText("unit_status4");
        HpLabel      = GameTextUtil.GetText("unit_status5");
        AtkLabel     = GameTextUtil.GetText("unit_status6");
        CostLabel    = GameTextUtil.GetText("unit_status8");
        LinkLabel    = GameTextUtil.GetText("unit_linkstatus3");
        CharmLabel   = GameTextUtil.GetText("unit_status9");
        IsSkillItem  = false;
        IsViewStatus = true;
        IsViewIcon   = true;


        //--------------------------------
        // 選択されているユニット情報を選定
        //--------------------------------
        uint unCharaLevel = (uint)cCharaParam.m_CharaLevel;  // キャラレベル
                                                             // +情報

        //----------------------------------------
        // リンク情報の設定 v300対応
        //----------------------------------------

        //リンクキャラの定義取得
        uint unCharaId = cCharaParam.m_LinkParam.m_CharaID;
        // リンク対象ユニット
        MasterDataParamChara cCharaParamLink = MasterDataUtil.GetCharaParamFromID(unCharaId);
        // コスト
        int nCharaCost = cCharaMasterData.party_cost;

        if (unCharaId > 0 &&
            cCharaParamLink != null)
        {
            //------------------------------------------------------------
            // LINK BONUS
            //------------------------------------------------------------
            //ユニット名
            LinkTitleText = cCharaParamLink.name;

            //レベル
            Lv = cCharaParam.m_LinkParam.m_CharaLv;

            //HP
            int nHp = (CharaLinkUtil.GetLinkUnitBonusElement(cCharaParamLink, cCharaParam.m_LinkParam.m_CharaLv, 0, CharaUtil.VALUE.HP) +
                       CharaLinkUtil.GetLinkUnitBonusPlus(cCharaParam.m_LinkParam.m_CharaPlusHP, CharaUtil.VALUE.HP));
            int nPlusHp = cCharaParam.m_LinkParam.m_CharaPlusHP;
            // ATK
            int nPow = (CharaLinkUtil.GetLinkUnitBonusElement(cCharaParamLink, cCharaParam.m_LinkParam.m_CharaLv, 0, CharaUtil.VALUE.POW) +
                        CharaLinkUtil.GetLinkUnitBonusPlus(cCharaParam.m_LinkParam.m_CharaPlusPow, CharaUtil.VALUE.POW));
            int nPlusPow = cCharaParam.m_LinkParam.m_CharaPlusPow;

            double nCharm = 0;

            //COST
            Cost = cCharaParamLink.party_cost;

            // リンクポイント
            float fLinkPoint = (cCharaParam.m_LinkParam.m_CharaLinkPoint) * 0.01f;
            Link = string.Format(GameTextUtil.GetText("unit_linkstatus4"), fLinkPoint);

            uint nLimitOverLevel = (uint)cCharaParam.m_LinkParam.m_CharaLOLevel;

            if (nLimitOverLevel > 0)
            {
                // 限界突破タイプ
                int nLimitOverType = cCharaParamLink.limit_over_type;

                // 限界突破後のコスト
                //Cost = (int)CharaLimitOver.GetParam(nLimitOverLevel, nLimitOverType, (int)CharaLimitOver.EGET.ePARAM_COST);

                // 限界突破後のHp
                nHp = CharaLinkUtil.GetLinkUnitBonusElement(unCharaId, Lv, nLimitOverLevel, CharaUtil.VALUE.HP) + CharaLinkUtil.GetLinkUnitBonusPlus(nPlusHp, CharaUtil.VALUE.HP);

                // 限界突破後のPow
                nPow = CharaLinkUtil.GetLinkUnitBonusElement(unCharaId, Lv, nLimitOverLevel, CharaUtil.VALUE.POW) + CharaLinkUtil.GetLinkUnitBonusPlus(nPlusPow, CharaUtil.VALUE.POW);

                // CHARM
                nCharm = CharaLimitOver.GetParamCharm(nLimitOverLevel, nLimitOverType);
            }

            //キャラアイコン
            IsViewIcon = true;
            IconSelect = MainMenuUtil.GetElementCircleSprite(cCharaParamLink.element);
            UnitIconImageProvider.Instance.Get(
                cCharaParamLink.fix_id,
                sprite =>
            {
                IconImage = sprite;
            });

            if (nPlusHp > 0)
            {
                Hp = string.Format(GameTextUtil.GetText("unit_status19"), nHp, nPlusHp);
            }
            else
            {
                Hp = nHp.ToString();
            }

            if (nPlusPow > 0)
            {
                Atk = string.Format(GameTextUtil.GetText("unit_status19"), nPow, nPlusPow);
            }
            else
            {
                Atk = nPow.ToString();
            }

            Charm = nCharm.ToString("F1");
        }
    }
Пример #14
0
    //----------------------------------------------------------------------------

    /*!
     *  @brief	基底継承:MainMenuSeq:ページ切り替えにより有効化された際に呼ばれる関数
     *  @note	ページのレイアウト再構築を兼ねる
     */
    //----------------------------------------------------------------------------
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        //--------------------------------
        // 情報破棄
        //
        // リソースの参照が残ると破棄処理で抜けが生じるので
        // ページを無効にしたタイミングでも破棄するよう対応してる
        //--------------------------------
        //--------------------------------
        // オブジェクト破棄
        //--------------------------------
        if (m_AssetAutoSetBefore != null)
        {
            m_AssetAutoSetBefore.DestroyCharaMesh();
        }
        if (m_AssetAutoSetAfter != null)
        {
            m_AssetAutoSetAfter.DestroyCharaMesh();
        }

        //--------------------------------
        // 進行情報クリア
        //--------------------------------
        m_WorkStep       = STEP_000_START;
        m_WorkStepDelta  = 0;
        m_WorkStepTriger = true;
        m_CharaMeshAnim.ResetAnimation();

        //----------------------------------------
        // パッチ処理を行わないようにする.
        //----------------------------------------
        MainMenuManager.Instance.m_ResumePatchUpdateRequest = false;

        //--------------------------------
        // 進化前後のユニット情報を取得
        //--------------------------------
        PacketStructUnit cEvolUnit     = MainMenuParam.m_EvolveBaseAfter;
        PacketStructUnit cEvolUnitPrev = MainMenuParam.m_EvolveBaseBefore;

        if (cEvolUnit == null ||
            cEvolUnitPrev == null
            )
        {
            Debug.LogError("Evol Unit Error!!");
            //とりあえずホームへ
            MainMenuManager.Instance.AddSwitchRequest(MAINMENU_SEQ.SEQ_HOME_MENU, false, false);
            return;
        }

        //--------------------------------
        // 選択されているユニット情報を選定
        //--------------------------------
        uint unCharaMasterDataID     = cEvolUnit.id;        // 進化後
        uint unCharaMasterDataIDPrev = cEvolUnitPrev.id;    // 新化前

        MasterDataParamChara cCharaMasterData     = MasterDataUtil.GetCharaParamFromID(unCharaMasterDataID);
        MasterDataParamChara cCharaMasterDataPrev = MasterDataUtil.GetCharaParamFromID(unCharaMasterDataIDPrev);

        if (cCharaMasterData == null || cCharaMasterDataPrev == null)
        {
            Debug.LogError("SelectUnit MasterData Is None! - " + unCharaMasterDataID);
            return;
        }
        // 表示ユニット情報を設定
        //MainMenuParam.SetCharaDetailParam( cEvolUnit );
        m_UnitNamePanel.setup(cCharaMasterDataPrev);

        // リンクユニット情報取得
        PacketStructUnit cLinkUnit = CharaLinkUtil.GetLinkUnit(cEvolUnit);

        // 表示ユニット情報を設定
        MainMenuParam.SetCharaDetailParam(cEvolUnit, cLinkUnit);

        //----------------------------------------
        // キャラメッシュ生成
        //----------------------------------------
        {
            // 新化前ユニット
            if (m_AssetAutoSetBefore == null)
            {
                m_AssetAutoSetBefore = m_ReferObject[OBJECT_CHARA_MESH_BEFORE].AddComponent <AssetAutoSetCharaMesh>();
                m_AssetAutoSetBefore.m_AssetBundleMeshScaleUp  = true;
                m_AssetAutoSetBefore.m_AssetBundleMeshPosition = true;
            }
            m_AssetAutoSetBefore.SetCharaID(unCharaMasterDataIDPrev, true);
            // 進化後ユニット
            if (m_AssetAutoSetAfter == null)
            {
                m_AssetAutoSetAfter = m_ReferObject[OBJECT_CHARA_MESH_AFTER].AddComponent <AssetAutoSetCharaMesh>();
                m_AssetAutoSetAfter.m_AssetBundleMeshScaleUp  = true;
                m_AssetAutoSetAfter.m_AssetBundleMeshPosition = true;
            }
            m_AssetAutoSetAfter.SetCharaID(unCharaMasterDataID, true);
        }

        {
            TemplateList <uint> cPartsUnitIDList = new TemplateList <uint>();
            for (int i = 0; i < MainMenuParam.m_EvolveParts.m_BufferSize; i++)
            {
                cPartsUnitIDList.Add(MainMenuParam.m_EvolveParts[i].id);
            }

            m_EvolCutinParts = new MainMenuCutin[cPartsUnitIDList.m_BufferSize];
            for (int i = 0; i < cPartsUnitIDList.m_BufferSize; i++)
            {
                m_EvolCutinParts[i] = new MainMenuCutin();
                m_EvolCutinParts[i].Setup(m_ReferObject[OBJECT_CUTIN_PARENT], cPartsUnitIDList[i], MainMenuDefine.CUTIN_OBJ_TYPE_COST);
            }
        }

        //----------------------------------------
        // とりあえず非表示へ
        //----------------------------------------
        m_LayoutWindow.SetLayoutAllDisable();
        m_LayoutEvolve.SetLayoutAllDisable();
        m_LayoutCategory.SetLayoutAllDisable();

        //遷移ボタン非表示
        m_UnitResultButton.IsActiveButton1 = false;
        m_UnitResultButton.IsActiveButton2 = false;
    }
Пример #15
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	基底継承:MainMenuSeq:ページ切り替えにより有効化された際に呼ばれる関数
     *          @note	ページのレイアウト再構築を兼ねる
     */
    //----------------------------------------------------------------------------
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        //--------------------------------
        // 情報破棄
        //
        // リソースの参照が残ると破棄処理で抜けが生じるので
        // ページを無効にしたタイミングでも破棄するよう対応してる
        //--------------------------------
        //--------------------------------
        // オブジェクト破棄
        //--------------------------------
        if (m_AssetAutoSet != null)
        {
            m_AssetAutoSet.DestroyCharaMesh();
        }

        //--------------------------------
        // リンク情報クリア
        //--------------------------------
        m_WorkStep       = STEP_000_START;
        m_WorkStepDelta  = 0;
        m_WorkStepTriger = true;


        //--------------------------------
        // Bugweb:5925 関連
        // アチーブメント達成演出をスキップされる可能性を考慮しアチーブメント取得フラグONにしとく。
        //  フラグをONにすることで、次回、ミッション画面に遷移したとき、
        //  ローカルで保持してるアチーブメントマスタのリスト情報を破棄し、新しく一からマスタを取得し直すようになる。
        //--------------------------------
        if (MainMenuParam.m_AchievementListGet == false)
        {
            MainMenuParam.m_AchievementListGet = true;
        }

        //--------------------------------
        // リンク前後の情報を保持しておく
        //--------------------------------
        PacketStructUnit UnitBefore = new PacketStructUnit();   //!< ユニット情報:リンク前
        PacketStructUnit UnitAfter  = new PacketStructUnit();   //!< ユニット情報:リンク後

        UnitBefore.Copy(MainMenuParam.m_LinkBaseBefore);
        UnitAfter.Copy(MainMenuParam.m_LinkBaseAfter);
        MasterDataParamChara m_UnitMasterData = MasterDataUtil.GetCharaParamFromID(UnitAfter.id);       //!< ユニット情報:マスターデータ

        m_UnitNamePanel.setup(m_UnitMasterData);


        UnitBefore.add_hp         = UnitAfter.add_hp;
        UnitBefore.add_pow        = UnitAfter.add_pow;
        UnitBefore.link_unique_id = UnitAfter.link_unique_id;

        //--------------------------------
        // リンク先のユニット情報を取得する
        //--------------------------------
        PacketStructUnit cLinkUnit = CharaLinkUtil.GetLinkUnit(UnitBefore.link_unique_id);

        //----------------------------------------
        // 初期情報としてリンク前のユニット情報を表示
        //----------------------------------------
        // 表示ユニット情報を設定
        MainMenuParam.SetCharaDetailParam(UnitBefore, cLinkUnit);

        //----------------------------------------
        // キャラメッシュ生成
        //----------------------------------------
        if (m_AssetAutoSet == null)
        {
            m_AssetAutoSet = m_ReferObject[OBJECT_CHARA_MESH].AddComponent <AssetAutoSetCharaMesh>();
            m_AssetAutoSet.m_AssetBundleMeshScaleUp  = true;
            m_AssetAutoSet.m_AssetBundleMeshPosition = true;
        }
        m_AssetAutoSet.SetCharaID(m_UnitMasterData.fix_id, true);

        //----------------------------------------
        // カットインオブジェクト生成
        //----------------------------------------
        //--------------------------------
        // リンクユニット
        //--------------------------------
        m_CutinLink = new MainMenuCutin();
        m_CutinLink.Setup(m_ReferObject[OBJECT_CUTIN_PARENT], MainMenuParam.m_LinkUnit.id, MainMenuDefine.CUTIN_OBJ_TYPE_FIX);

        //--------------------------------
        // 素材ユニット
        //--------------------------------
        if (MainMenuParam.m_LinkParts != null &&
            MainMenuParam.m_LinkParts.m_BufferSize > 0)
        {
            m_CutinParts = new MainMenuCutin[MainMenuParam.m_LinkParts.m_BufferSize];
            for (int i = 0; i < MainMenuParam.m_LinkParts.m_BufferSize; i++)
            {
                m_CutinParts[i] = new MainMenuCutin();
                m_CutinParts[i].Setup(m_ReferObject[OBJECT_CUTIN_PARENT], MainMenuParam.m_LinkParts[i].id, MainMenuDefine.CUTIN_OBJ_TYPE_COST);
            }
        }

        //----------------------------------------
        // とりあえず非表示へ
        //----------------------------------------
        m_LayoutCategory.SetLayoutAllDisable();
        m_LayoutWindow.SetLayoutAllDisable();

        //遷移ボタンOFF
        m_UnitResultButton.IsActiveButton1 = false;
        m_UnitResultButton.IsActiveButton2 = false;

        // ロゴ情報
        for (int i = 0; i < m_AnimationShotLogo.Length; i++)
        {
            if (m_AnimationShotLogo[i] == null)
            {
                continue;
            }
            UnityUtil.SetObjectEnabled(m_AnimationShotLogo[i].gameObject, false);
        }
    }
Пример #16
0
    void CreateSendUnitGetDatas(bool isLink, bool isEvol)
    {
        List <PacketStructUnitGetDebug> cUnitGetList = new List <PacketStructUnitGetDebug>();
        MasterDataParamChara            cCharaMasterData;     // ユニットのマスターデータ
        PacketStructUnitGetDebug        cUnitGet;             // ユニットデータ
        MasterDataParamCharaEvol        cEvolMasterData;      // 進化素材のマスターデータ
        MasterDataParamChara            cCLinkharaMasterData; // リンク素材のマスターデータ
        int nLimitOverMax;                                    // 限界突破レベルの最大値

        for (int i = 0; i < Units.Count; i++)
        {
            // 選択ユニット追加
            if (Units[i].UnitGetData.id == 0)
            {
                continue;
            }

            cUnitGet              = Units[i].UnitGetData;
            cCharaMasterData      = MasterDataUtil.GetCharaParamFromID(cUnitGet.id);
            nLimitOverMax         = (int)CharaLimitOver.GetParam(0, cCharaMasterData.limit_over_type, (int)CharaLimitOver.EGET.ePARAM_LIMITOVER_MAX);
            cUnitGet.limitover_lv = (nLimitOverMax < (int)cUnitGet.limitover_lv) ? (uint)nLimitOverMax : cUnitGet.limitover_lv;

            cUnitGetList.Add(cUnitGet);


            // 進化ユニット追加
            if (isEvol)
            {
                cEvolMasterData = MasterDataUtil.GetCharaEvolParamFromCharaID(cUnitGet.id);
                if (cEvolMasterData != null)
                {
                    if (cEvolMasterData.unit_id_parts1 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetEvol1 = new PacketStructUnitGetDebug();
                        cUnitGetEvol1.id            = cEvolMasterData.unit_id_parts1;
                        cUnitGetEvol1.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetEvol1.level         = cUnitGet.level;
                        cUnitGetEvol1.add_hp        = cUnitGet.add_hp;
                        cUnitGetEvol1.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetEvol1);
                    }
                    if (cEvolMasterData.unit_id_parts2 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetEvol2 = new PacketStructUnitGetDebug();
                        cUnitGetEvol2.id            = cEvolMasterData.unit_id_parts2;
                        cUnitGetEvol2.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetEvol2.level         = cUnitGet.level;
                        cUnitGetEvol2.add_hp        = cUnitGet.add_hp;
                        cUnitGetEvol2.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetEvol2);
                    }
                    if (cEvolMasterData.unit_id_parts3 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetEvol3 = new PacketStructUnitGetDebug();
                        cUnitGetEvol3.id            = cEvolMasterData.unit_id_parts3;
                        cUnitGetEvol3.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetEvol3.level         = cUnitGet.level;
                        cUnitGetEvol3.add_hp        = cUnitGet.add_hp;
                        cUnitGetEvol3.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetEvol3);
                    }
                }
            }

            // リンクユニット追加
            if (isLink)
            {
                cCLinkharaMasterData = MasterDataUtil.GetCharaParamFromID(cUnitGet.id);
                if (cCLinkharaMasterData != null)
                {
                    if (cCLinkharaMasterData.link_unit_id_parts1 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetLink1 = new PacketStructUnitGetDebug();
                        cUnitGetLink1.id            = cCLinkharaMasterData.link_unit_id_parts1;
                        cUnitGetLink1.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetLink1.level         = cUnitGet.level;
                        cUnitGetLink1.add_hp        = cUnitGet.add_hp;
                        cUnitGetLink1.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetLink1);
                    }
                    if (cCLinkharaMasterData.link_unit_id_parts2 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetLink2 = new PacketStructUnitGetDebug();
                        cUnitGetLink2.id            = cCLinkharaMasterData.link_unit_id_parts2;
                        cUnitGetLink2.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetLink2.level         = cUnitGet.level;
                        cUnitGetLink2.add_hp        = cUnitGet.add_hp;
                        cUnitGetLink2.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetLink2);
                    }
                    if (cCLinkharaMasterData.link_unit_id_parts3 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetLink3 = new PacketStructUnitGetDebug();
                        cUnitGetLink3.id            = cCLinkharaMasterData.link_unit_id_parts3;
                        cUnitGetLink3.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetLink3.level         = cUnitGet.level;
                        cUnitGetLink3.add_hp        = cUnitGet.add_hp;
                        cUnitGetLink3.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetLink3);
                    }
                }
            }
        }

        if (cUnitGetList.Count > 0)
        {
            SendGetDebugUnit(cUnitGetList.ToArray()); // リクエスト
        }
    }
Пример #17
0
    void CreateSendUnitGetDatas(bool isLink, bool isEvol)
    {
        List <PacketStructUnitGetDebug> cUnitGetList = new List <PacketStructUnitGetDebug>();
        MasterDataParamChara            cCharaMasterData;     // ユニットのマスターデータ
        PacketStructUnitGetDebug        cUnitGet;             // ユニットデータ
        MasterDataParamCharaEvol        cEvolMasterData;      // 進化素材のマスターデータ
        MasterDataParamChara            cCLinkharaMasterData; // リンク素材のマスターデータ
        int nLimitOverMax;                                    // 限界突破レベルの最大値

        for (int i = 0; i < m_DebugGetUnitSelectPanel.Units.Count; i++)
        {
            // 選択ユニット追加
            if (m_DebugGetUnitSelectPanel.Units[i].unitID == 0)
            {
                continue;
            }
            cUnitGet               = new PacketStructUnitGetDebug();
            cUnitGet.id            = m_DebugGetUnitSelectPanel.Units[i].unitID;
            cUnitGet.limitbreak_lv = m_DebugGetUnitSelectPanel.m_UnitGetData.limitbreak_lv;
            cUnitGet.limitover_lv  = m_DebugGetUnitSelectPanel.m_UnitGetData.limitover_lv;
            cUnitGet.level         = m_DebugGetUnitSelectPanel.m_UnitGetData.level;
            cUnitGet.add_pow       = m_DebugGetUnitSelectPanel.m_UnitGetData.add_pow;
            cUnitGet.add_hp        = m_DebugGetUnitSelectPanel.m_UnitGetData.add_hp;

            cCharaMasterData      = MasterDataUtil.GetCharaParamFromID(cUnitGet.id);
            nLimitOverMax         = (int)CharaLimitOver.GetParam(0, cCharaMasterData.limit_over_type, (int)CharaLimitOver.EGET.ePARAM_LIMITOVER_MAX);
            cUnitGet.limitover_lv = (nLimitOverMax < (int)cUnitGet.limitover_lv) ? (uint)nLimitOverMax : cUnitGet.limitover_lv;

            cUnitGetList.Add(cUnitGet);


            // 進化ユニット追加
            if (isEvol)
            {
                cEvolMasterData = MasterDataUtil.GetCharaEvolParamFromCharaID(cUnitGet.id);
                if (cEvolMasterData != null)
                {
                    if (cEvolMasterData.unit_id_parts1 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetEvol1 = new PacketStructUnitGetDebug();
                        cUnitGetEvol1.id            = cEvolMasterData.unit_id_parts1;
                        cUnitGetEvol1.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetEvol1.level         = cUnitGet.level;
                        cUnitGetEvol1.add_hp        = cUnitGet.add_hp;
                        cUnitGetEvol1.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetEvol1);
                    }
                    if (cEvolMasterData.unit_id_parts2 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetEvol2 = new PacketStructUnitGetDebug();
                        cUnitGetEvol2.id            = cEvolMasterData.unit_id_parts2;
                        cUnitGetEvol2.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetEvol2.level         = cUnitGet.level;
                        cUnitGetEvol2.add_hp        = cUnitGet.add_hp;
                        cUnitGetEvol2.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetEvol2);
                    }
                    if (cEvolMasterData.unit_id_parts3 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetEvol3 = new PacketStructUnitGetDebug();
                        cUnitGetEvol3.id            = cEvolMasterData.unit_id_parts3;
                        cUnitGetEvol3.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetEvol3.level         = cUnitGet.level;
                        cUnitGetEvol3.add_hp        = cUnitGet.add_hp;
                        cUnitGetEvol3.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetEvol3);
                    }
                }
            }

            // リンクユニット追加
            if (isLink)
            {
                cCLinkharaMasterData = MasterDataUtil.GetCharaParamFromID(cUnitGet.id);
                if (cCLinkharaMasterData != null)
                {
                    if (cCLinkharaMasterData.link_unit_id_parts1 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetLink1 = new PacketStructUnitGetDebug();
                        cUnitGetLink1.id            = cCLinkharaMasterData.link_unit_id_parts1;
                        cUnitGetLink1.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetLink1.level         = cUnitGet.level;
                        cUnitGetLink1.add_hp        = cUnitGet.add_hp;
                        cUnitGetLink1.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetLink1);
                    }
                    if (cCLinkharaMasterData.link_unit_id_parts2 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetLink2 = new PacketStructUnitGetDebug();
                        cUnitGetLink2.id            = cCLinkharaMasterData.link_unit_id_parts2;
                        cUnitGetLink2.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetLink2.level         = cUnitGet.level;
                        cUnitGetLink2.add_hp        = cUnitGet.add_hp;
                        cUnitGetLink2.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetLink2);
                    }
                    if (cCLinkharaMasterData.link_unit_id_parts3 != 0)
                    {
                        PacketStructUnitGetDebug cUnitGetLink3 = new PacketStructUnitGetDebug();
                        cUnitGetLink3.id            = cCLinkharaMasterData.link_unit_id_parts3;
                        cUnitGetLink3.limitbreak_lv = cUnitGet.limitbreak_lv;
                        cUnitGetLink3.level         = cUnitGet.level;
                        cUnitGetLink3.add_hp        = cUnitGet.add_hp;
                        cUnitGetLink3.add_pow       = cUnitGet.add_pow;

                        cUnitGetList.Add(cUnitGetLink3);
                    }
                }
            }
        }

        if (cUnitGetList.Count > 0)
        {
            //----------------------------------------
            // 追加ユニット数を10倍にする
            //----------------------------------------
            if (m_DebugGetUnitSelectPanel.IsMultiplyUnit)
            {
                List <PacketStructUnitGetDebug> unitGetMultiplyList = new List <PacketStructUnitGetDebug>();
                foreach (PacketStructUnitGetDebug unit in cUnitGetList)
                {
                    for (int i = 0; i < 10; i++)
                    {
                        PacketStructUnitGetDebug copyUnit = new PacketStructUnitGetDebug();
                        copyUnit.Copy(unit);
                        unitGetMultiplyList.Add(copyUnit);
                    }
                }
                cUnitGetList = unitGetMultiplyList;
            }

            //----------------------------------------
            // リクエスト開始
            //----------------------------------------
            if (cUnitGetList.Count > 100 || m_DebugGetUnitSelectPanel.IsMultiplyUnit)
            {
                // 10倍すると、かなり数が多くなるので警告を出しておく
                Dialog newDialog = Dialog.Create(DialogType.DialogYesNo);
                newDialog.SetDialogText(DialogTextType.Title, "ユニット取得");
                newDialog.SetDialogText(DialogTextType.MainText, string.Format("{0}体のユニットを取得しようとしています。\nよろしいですか。", cUnitGetList.Count));
                newDialog.SetDialogTextFromTextkey(DialogTextType.YesText, "common_button4");
                newDialog.SetDialogTextFromTextkey(DialogTextType.NoText, "common_button5");
                newDialog.SetDialogEvent(DialogButtonEventType.YES, () =>
                {
                    SendGetDebugUnit(cUnitGetList.ToArray()); // リクエスト
                });
                newDialog.SetDialogEvent(DialogButtonEventType.NO, () =>
                {
                });
                newDialog.Show();
            }
            else
            {
                SendGetDebugUnit(cUnitGetList.ToArray()); // リクエスト
            }
        }
    }
Пример #18
0
 public void OnChangedID(uint value)
 {
     SetUpParamChara(MasterDataUtil.GetCharaParamFromID(value));
 }