/// <summary>
    /// チェックボックスアイテムセット
    /// </summary>
    public void SetCheckBox(UserGearData data, bool isEquipped, uint isLock, uint checkFlg, Action <ItemInventoryGearScrollViewItem> onClick)
    {
        this.gearData = data;
        // CommonIconをギアに変更
        this.commonIcon.SetGearCommonIcon(true);
        var gearMaster = Masters.GearDB.FindById(data.gearId);

        // ランクスプライト切替
        var rank = CommonIconUtility.GetRarity((uint)ItemType.Gear, this.gearData.gearId);

        this.commonIcon.SetRank(rank);

        // ギアCommonIconセット
        var bgSprite   = CommonIconUtility.GetGearBgSprite(data.gearType);
        var mainSprite = CommonIconUtility.GetGearMainImageSprite(gearMaster.key);
        var subSprite  = CommonIconUtility.GetGearSubImageSprite(gearMaster.subKey);

        this.commonIcon.SetGearSprite(bgSprite, mainSprite, subSprite);

        // 装着中ギア装着中パンネル表示
        this.equippedMark.SetActive(isEquipped);

        // クリック時処理登録
        this.commonIcon.onClick = () => onClick(this);

        // // ロック情報セット
        SetTemplockImage(isLock);

        // ロックの場合はクリック禁止・イメージ暗く
        if (isEquipped || isLock == 1)
        {
            this.commonIcon.button.interactable = false;

            // 色暗く
            var newColor = new Color(130 / 255f, 130 / 255f, 130 / 255f);
            this.commonIconGearBgGraphic.color   = newColor;
            this.commonIconGearMainGraphic.color = newColor;
            this.commonIconGearSubGraphic.color  = newColor;

            this.checkBox.SetActive(false);
        }
        // チェックボックスセット
        else
        {
            this.commonIcon.button.interactable = true;

            // 色の原本で
            var newColor = new Color(255 / 255f, 255 / 255f, 255 / 255f);
            this.commonIconGearBgGraphic.color   = newColor;
            this.commonIconGearMainGraphic.color = newColor;
            this.commonIconGearSubGraphic.color  = newColor;

            this.checkBox.SetActive(true);
            //クリック時処理登録
            this.commonIcon.onClick = () => onClick(this);
        }

        // 仮選択フラッグチェックセット
        SetTempCheckImage(checkFlg);
    }
        public BulletPartsInfo(UserGearData data) : base(data)
        {
            if (data.partsServerId == null)
            {
            }
            else
            {
                // パーツデータ取得
                UserPartsData partsData = UserData.Get().bulletData
                                          .Where(x => x.serverId == data.partsServerId)
                                          .First();

                // 本、ギアを装着中のパーツのマスターID
                this.bulletMasterId = partsData.itemId;

                // 本、ギアを装着中のパーツのサーバーID
                this.bulletServerId = partsData.serverId;

                // ギアスロット拡張回数
                this.bulletSlotExpandCount = partsData.gearSlotExpandCount;

                // ギアのマスターデータID
                uint[] bulletGearMasterIds = partsData.gearMasterIds;

                this.bulletGearSize = (uint)bulletGearMasterIds.Length;
                var bulletMaster = Masters.BulletDB.FindById(this.bulletMasterId);

                uint defaultCount = bulletMaster.defaultGearSlotSize;
                this.bulletGearSlotCount = defaultCount + bulletSlotExpandCount;
            }
        }
    /// <summary>
    /// 表示構築
    /// </summary>
    public void Set(UserGearData data, bool isEquipped, uint isLock, Action <ItemInventoryGearScrollViewItem> onClick)
    {
        this.gearData = data;
        // CommonIconをギアに変更
        this.commonIcon.SetGearCommonIcon(true);
        var gearMaster = Masters.GearDB.FindById(data.gearId);

        // ランクスプライト切替
        var rank = CommonIconUtility.GetRarity((uint)ItemType.Gear, this.gearData.gearId);

        this.commonIcon.SetRank(rank);

        // ギアCommonIconセット、アイコンスプライト切替
        var bgSprite   = CommonIconUtility.GetGearBgSprite(data.gearType);
        var mainSprite = CommonIconUtility.GetGearMainImageSprite(gearMaster.key);
        var subSprite  = CommonIconUtility.GetGearSubImageSprite(gearMaster.subKey);

        this.commonIcon.SetGearSprite(bgSprite, mainSprite, subSprite);

        // 装着中ギア装着中パンネル表示
        this.equippedMark.SetActive(isEquipped);

        // クリック時処理登録
        this.commonIcon.onClick = () => onClick(this);

        // ロック情報セット
        SetTemplockImage(isLock);
    }
Exemplo n.º 4
0
    /// <summary>
    /// パーツからギアの取り外し通信
    /// </summary>
    public static void CallGearUnsetApi(uint gearServerId, Action onCompleted)
    {
        //対象ギアの取得
        UserGearData userGear = UserData.Get().gearData.First(gear => gear.serverId == gearServerId);

#if SHARK_OFFLINE
        userGear.SetPartsServerId(null, DateTime.Now);
        onCompleted?.Invoke();
        return;
#endif
        var request = new SharkWebRequest <CannonGearUnsetResponseData>("cannon/gearUnset");

        request.SetRequestHeader("AccessToken", UserData.Get().hash);

        request.SetRequestParameter(new Dictionary <string, object>
        {
            { "gearId", gearServerId },
        });

        request.onSuccess = (response) =>
        {
            //コイン消費の反映
            UserData.Get().Set(response.tUsers);
            SharedUI.Instance.header.SetInfo(UserData.Get());

            //ギア取り外しの反映
            userGear.SetPartsServerId(null, response.tGear.setDateTime);
            // 無理、ギア外すカウンター更新
            CustomGearConfirmDialogContent.freeGearRemoveCount = response.freeRemoveCount;

            onCompleted?.Invoke();
        };

        request.Send();
    }
Exemplo n.º 5
0
    /// <summary>
    /// パーツへのギア装着通信
    /// </summary>
    public static void CallGearSetApi(uint gearServerId, uint partsServerId, Action onCompleted)
    {
        //対象ギアの取得
        UserGearData userGear = UserData.Get().gearData.First(gear => gear.serverId == gearServerId);

#if SHARK_OFFLINE
        userGear.SetPartsServerId(partsServerId, DateTime.Now);
        onCompleted?.Invoke();
        return;
#endif
        var request = new SharkWebRequest <CannonGearSetResponseData>("cannon/gearSet");

        request.SetRequestHeader("AccessToken", UserData.Get().hash);

        request.SetRequestParameter(new Dictionary <string, object>
        {
            { "gearId", gearServerId },
            { "cannonId", partsServerId },
        });

        request.onSuccess = (response) =>
        {
            //ギア装着の反映
            userGear.SetPartsServerId(partsServerId, response.tGear.setDateTime);

            onCompleted?.Invoke();
        };

        request.Send();
    }
Exemplo n.º 6
0
    /// <summary>
    /// 装着する、ギア選択ポップアップをセット
    /// </summary>
    public void Setup(
        SimpleDialog dialog,
        UserPartsData partsData,
        uint gearId,
        Action onReflesh)
    {
        this.dialog     = dialog;
        this.partsData  = partsData;
        this.beforeGear = UserData.Get().gearData.FirstOrDefault(x => x.gearId == gearId && x.partsServerId == this.partsData.serverId);
        this.onReflesh  = onReflesh;

        //パーツに装着出来るギアのタイプ
        var gearType = partsData.itemType == (uint)ItemType.Battery ? GearType.Battery
                     : partsData.itemType == (uint)ItemType.Barrel  ? GearType.Barrel
                     : partsData.itemType == (uint)ItemType.Bullet  ? GearType.Bullet
                     : 0;

        //装着可能なギア一覧(パーツタイプが一致し、どのパーツにも装着されていないもの)
        this.freeGears = UserData.Get().gearData
                         .Where(x => x.gearType == (uint)gearType && !x.partsServerId.HasValue)
                         .ToArray();

        // 所持するギアがない場合(Nullエラーため)
        if (this.beforeGear == null && this.freeGears.Length == 0)
        {
            // 固定されている装着ギアパネルが未装着の場合(ギア未所持)
            this.fastenGearViewItemPrefab.SetNotEquippedPanel();
        }
        // 所持するギアがある場合
        else
        {
            // ギア未装着
            if (gearId == 0)
            {
                // 固定されている装着ギアパネルが未装着の場合(ギア所持)
                this.fastenGearViewItemPrefab.SetNotEquippedPanel();
            }
            // ギアを装着してある場合
            else
            {
                // 固定されている装着ギアパネルにデータロッド
                this.fastenGearViewItemPrefab.SetGearData(beforeGear, null);
                this.unEquipGearButton.gameObject.SetActive(true);

                //装着したギアを外すボタンをロードするため、null空間を生成
                //this.freeGears = new UserGearData[] { null }.Concat(this.freeGears).ToArray();
            }
        }

        // ScrollView生成
        this.gearScrollView.Initialize(
            this.gearScrollViewItemPrefab.gameObject,
            this.freeGears.Length,
            this.LoadGearPrefabData
            );
    }
Exemplo n.º 7
0
    /// <summary>
    /// 表示構築
    /// </summary>
    public void SetGearData(UserGearData data, Action <CustomGearScrollViewItem> onClick)
    {
        this.gearData = data;
        this.onClick  = onClick;
        var localizeText = Masters.LocalizeTextDB;

        if (data == null)
        {
            this.removeViewObject.SetActive(true);
        }
        else
        {
            var config = Masters.ConfigDB.FindById(1);
            //各能力のMAX値(仮)
            var MAX_POWER              = config.maxGearPower;
            var MAX_BULLET_SPEED       = config.maxGearSpeed;
            var MAX_FV_POINT_GET_VALUE = config.maxGearFvPoint;

            // 歯車能力値
            var  master          = Masters.GearDB.FindById(this.gearData.gearId);
            uint power           = master.power;
            uint bulletSpeed     = master.speed;
            uint fvPointGetValue = master.fvPoint;

            //攻撃力ゲージ設定
            this.powerGauge.SetGaugeValue(Mathf.Clamp01((float)power / MAX_POWER));

            //発射速度ゲージ設定
            this.bulletSpeedGauge.SetGaugeValue(Mathf.Clamp01((float)bulletSpeed / MAX_BULLET_SPEED));

            //FVポイント獲得値ゲージ設定
            this.fvPointGetValueGauge.SetGaugeValue(Mathf.Clamp01((float)fvPointGetValue / MAX_FV_POINT_GET_VALUE));

            //ランクスプライト
            this.commonIcon.SetRank((Rank)master.rarity);

            // CommonIconをギアに変更
            this.commonIcon.SetGearCommonIcon(true);

            // ギアCommonIconセット
            var bgSprite   = CommonIconUtility.GetGearBgSprite(this.gearData.gearType);
            var mainSprite = CommonIconUtility.GetGearMainImageSprite(master.key);
            var subSprite  = CommonIconUtility.GetGearSubImageSprite(master.subKey);
            this.commonIcon.SetGearSprite(bgSprite, mainSprite, subSprite);

            //ギアInfo
            this.gearName.text        = master.name;
            this.gearDescription.text = master.description;

            // localize
            this.powerGaugeText.text           = localizeText.Get("Power");
            this.bulletSpeedGaugeText.text     = localizeText.Get("BulletSpeed");
            this.fvPointGetValueGaugeText.text = localizeText.GetFormat("FvPointGetValue");
        }
    }
Exemplo n.º 8
0
    /// <summary>
    /// ギアロック情報の通信
    /// </summary>
    public static void CallGearLock(UserGearData geardata, Action onCompleted)
    {
        var request = new SharkWebRequest <GearLockResponseData>("cannon/gearLock");

        request.SetRequestHeader("AccessToken", UserData.Get().hash);
        request.SetRequestParameter(new Dictionary <string, object>
        {
            { "gearId", geardata.serverId }
        });

        request.onSuccess = (response) =>
        {
            geardata.lockFlg = response.tGear.lockFlg;
            onCompleted?.Invoke();
        };

        request.Send();
    }
    /// <summary>
    /// セットアップ
    /// </summary>
    public void Setup(
        SimpleDialog dialog,
        UserPartsData partsData,
        UserGearData beforeGear,
        UserGearData afterGear,
        Action onReflesh,
        Action onCancel)
    {
        this.dialog     = dialog;
        this.yesNo      = this.dialog.AddYesNoButton();
        this.partsData  = partsData;
        this.beforeGear = beforeGear;
        this.afterGear  = afterGear;
        this.onReflesh  = onReflesh;
        this.onCancel   = onCancel;

        //キャンセル時処理登録
        this.yesNo.no.onClick = this.Cancel;

        Master.GearData beforeGearData = (this.beforeGear == null) ? null : Masters.GearDB.FindById(beforeGear.gearId);
        Master.GearData afterGearData  = (this.afterGear == null) ? null : Masters.GearDB.FindById(afterGear.gearId);
        this.beforeGearPanel.SetGearData(beforeGearData);
        this.afterGearPanel.SetGearData(afterGearData);

        //所持コイン数テキスト
        long beforeCoin = (long)UserData.Get().coin;

        this.beforeCoinText.text = string.Format("{0:#,0}", beforeCoin);

        //装着
        if (beforeGearData == null)
        {
            this.coinArea.SetActive(false);
            this.confirmText.text        = Masters.LocalizeTextDB.Get("ConfirmGearEquip");
            this.noteRemoveCostText.text = Masters.LocalizeTextDB.GetFormat("NoteGearRemoveCost", afterGearData.rejectCoin);
            this.freeGearRemoveText.text = null;
            this.yesNo.yes.onClick       = this.CallGearSetApi;
        }
        else
        {
            this.noteRemoveCostText.gameObject.SetActive(false);

            // vipでない場合
            if (UserData.Get().vipLevel == 0)
            {
                this.freeGearRemoveText.gameObject.SetActive(false);
            }
            else
            {
                this.freeGearRemoveText.gameObject.SetActive(true);
            }

            if (CustomGearConfirmDialogContent.freeGearRemoveCount > 0)
            {
                // 無料カウントがある場合、beforeCoinはafterCoinTextと同じ
                this.afterCoinText.text = string.Format("{0:#,0}", beforeCoin);
            }
            else
            {
                this.afterCoinText.text = string.Format("{0:#,0}", beforeCoin - beforeGearData.rejectCoin);

                if (beforeCoin - beforeGearData.rejectCoin < 0)
                {
                    this.afterCoinText.color = UIUtility.decreaseColor;
                }
            }

            //外す
            if (afterGearData == null)
            {
                this.confirmText.text        = Masters.LocalizeTextDB.Get("ConfirmGearRemove");
                this.yesNo.yes.onClick       = this.CallGearUnsetApi;
                this.freeGearRemoveText.text = Masters.LocalizeTextDB.GetFormat("FreeGearRemove", CustomGearConfirmDialogContent.freeGearRemoveCount);
            }
            //変更
            else
            {
                this.confirmText.text        = Masters.LocalizeTextDB.Get("ConfirmGearChange");
                this.yesNo.yes.onClick       = this.CallGearChageApi;
                this.freeGearRemoveText.text = Masters.LocalizeTextDB.GetFormat("FreeGearRemove", CustomGearConfirmDialogContent.freeGearRemoveCount);
            }

            //コイン不足・無料回数が0
            if (beforeGearData.rejectCoin > beforeCoin && CustomGearConfirmDialogContent.freeGearRemoveCount <= 0)
            {
                //ボタン押せなくしてグレースケールに
                this.yesNo.yes.button.interactable = false;
                this.yesNo.yes.image.material      = SharedUI.Instance.grayScaleMaterial;
                this.yesNo.yes.text.material       = SharedUI.Instance.grayScaleMaterial;
                this.freeGearRemoveText.text       = Masters.LocalizeTextDB.GetFormat("FreeGearRemove", CustomGearConfirmDialogContent.freeGearRemoveCount);
            }
        }
    }
Exemplo n.º 10
0
    /// <summary>
    /// まとめて分解確認ダイアログのデータロード
    /// </summary>
    public void Set(uint itemType, List <uint> partsServerIdList)
    {
        // 分解確認テキスト
        this.disassemblyQuestionText.text = Masters.LocalizeTextDB.GetFormat("DisassemblyQuestion", partsServerIdList.Count.ToString());
        List <Master.ItemSellData> getItemList = new List <Master.ItemSellData>();

        // パーツ名検索してリストに追加
        if (itemType == (uint)ItemType.Battery)
        {
            for (int i = 0; i < partsServerIdList.Count; i++)
            {
                // パーツデータ取得
                this.partsData = UserData.Get().batteryData
                                 .Where(x => x.serverId == partsServerIdList[i])
                                 .First();

                // パーツ名リストに追加
                this.partsName.Add(Masters.BatteryDB.FindById(this.partsData.itemId).name);
                // パーツ販売マスターID取得
                var sellItemId = Masters.BatteryDB.FindById(partsData.itemId).itemSellId;
                // パーツ販売データ取得
                this.getItem = Masters.ItemSellDB.GetList().FindAll(x => x.itemSellId == sellItemId).ToArray();

                // パーツ販売データリストに追加
                for (int y = 0; y < this.getItem.Length; y++)
                {
                    getItemList.Add(getItem[y]);
                }

                // パーツのギアマスターID
                var gearId = partsData.gearMasterIds;

                // ギアを装着している場合、ギア名をも検索してリストに追加
                for (int y = 0; y < gearId.Length; y++)
                {
                    // パーツ名前
                    this.partsName.Add(Masters.GearDB.FindById(gearId[y]).name);
                    // ギア販売マスターID取得
                    var sellGearId = Masters.GearDB.FindById(gearId[y]).itemSellId;

                    // ギアの分解時アイテム取得
                    Master.ItemSellData[] getGearItem = Masters.ItemSellDB.GetList().FindAll(x => x.itemSellId == sellGearId).ToArray();

                    // リストに追加
                    for (int z = 0; z < getGearItem.Length; z++)
                    {
                        getItemList.Add(getGearItem[z]);
                    }
                }
            }
        }
        else if (itemType == (uint)ItemType.Barrel)
        {
            for (int i = 0; i < partsServerIdList.Count; i++)
            {
                // パーツデータ取得
                this.partsData = UserData.Get().barrelData
                                 .Where(x => x.serverId == partsServerIdList[i])
                                 .First();

                // パーツ名リストに追加
                this.partsName.Add(Masters.BarrelDB.FindById(this.partsData.itemId).name);
                // パーツ販売マスターID取得
                var sellItemId = Masters.BatteryDB.FindById(partsData.itemId).itemSellId;
                // パーツ販売データ取得
                this.getItem = Masters.ItemSellDB.GetList().FindAll(x => x.itemSellId == sellItemId).ToArray();

                // パーツ販売データリストに追加
                for (int y = 0; y < this.getItem.Length; y++)
                {
                    getItemList.Add(getItem[y]);
                }

                // パーツのギアマスターID
                var gearId = partsData.gearMasterIds;

                // ギアを装着している場合、ギア名をも検索してリストに追加
                for (int y = 0; y < gearId.Length; y++)
                {
                    // パーツ名前
                    this.partsName.Add(Masters.GearDB.FindById(gearId[y]).name);
                    // ギア販売マスターID取得
                    var sellGearId = Masters.GearDB.FindById(gearId[y]).itemSellId;

                    // ギアの分解時アイテム取得
                    Master.ItemSellData[] getGearItem = Masters.ItemSellDB.GetList().FindAll(x => x.itemSellId == sellGearId).ToArray();

                    // リストに追加
                    for (int z = 0; z < getGearItem.Length; z++)
                    {
                        getItemList.Add(getGearItem[z]);
                    }
                }
            }
        }
        else if (itemType == (uint)ItemType.Bullet)
        {
            for (int i = 0; i < partsServerIdList.Count; i++)
            {
                // パーツデータ取得
                this.partsData = UserData.Get().bulletData
                                 .Where(x => x.serverId == partsServerIdList[i])
                                 .First();

                // パーツ名リストに追加
                this.partsName.Add(Masters.BarrelDB.FindById(this.partsData.itemId).name);
                // パーツ販売マスターID取得
                var sellItemId = Masters.BatteryDB.FindById(partsData.itemId).itemSellId;
                // パーツ販売データ取得
                this.getItem = Masters.ItemSellDB.GetList().FindAll(x => x.itemSellId == sellItemId).ToArray();

                // パーツ販売データリストに追加
                for (int y = 0; y < this.getItem.Length; y++)
                {
                    getItemList.Add(getItem[y]);
                }

                // パーツのギアマスターID
                var gearId = partsData.gearMasterIds;

                // ギアを装着している場合、ギア名をも検索してリストに追加
                for (int y = 0; y < gearId.Length; y++)
                {
                    // パーツ名前
                    this.partsName.Add(Masters.GearDB.FindById(gearId[y]).name);
                    // ギア販売マスターID取得
                    var sellGearId = Masters.GearDB.FindById(gearId[y]).itemSellId;

                    // ギアの分解時アイテム取得
                    Master.ItemSellData[] getGearItem = Masters.ItemSellDB.GetList().FindAll(x => x.itemSellId == sellGearId).ToArray();

                    // リストに追加
                    for (int z = 0; z < getGearItem.Length; z++)
                    {
                        getItemList.Add(getGearItem[z]);
                    }
                }
            }
        }
        else if (itemType == (uint)ItemType.Accessory)
        {
            for (int i = 0; i < partsServerIdList.Count; i++)
            {
                // パーツデータ取得
                this.partsData = UserData.Get().accessoriesData
                                 .Where(x => x.serverId == partsServerIdList[i])
                                 .First();

                // パーツ名リストに追加
                this.partsName.Add(Masters.BarrelDB.FindById(this.partsData.itemId).name);
                // パーツ販売マスターID取得
                var sellItemId = Masters.BatteryDB.FindById(partsData.itemId).itemSellId;
                // パーツ販売データ取得
                this.getItem = Masters.ItemSellDB.GetList().FindAll(x => x.itemSellId == sellItemId).ToArray();

                // パーツ販売データリストに追加
                for (int y = 0; y < this.getItem.Length; y++)
                {
                    getItemList.Add(getItem[y]);
                }
            }
        }
        else if (itemType == (uint)ItemType.Gear)
        {
            for (int i = 0; i < partsServerIdList.Count; i++)
            {
                // パーツデータ取得
                this.gearData = UserData.Get().gearData
                                .Where(x => x.serverId == partsServerIdList[i])
                                .First();

                // パーツ名リストに追加
                this.partsName.Add(Masters.GearDB.FindById(this.gearData.gearId).name);
                // パーツ販売マスターID取得
                var sellItemId = Masters.GearDB.FindById(this.gearData.gearId).itemSellId;
                // パーツ販売データ取得
                this.getItem = Masters.ItemSellDB.GetList().FindAll(x => x.itemSellId == sellItemId).ToArray();

                // パーツ販売データリストに追加
                for (int y = 0; y < this.getItem.Length; y++)
                {
                    getItemList.Add(getItem[y]);
                }
            }
        }

        this.getItem = getItemList.ToArray();

        // パーツ名アイテムセット
        this.partsNameScrollView.Initialize(
            this.partsNameItemPrefab.gameObject,
            this.partsName.Count,
            this.OnUpdatePartsScrollViewItem
            );

        this.decompositionScrollView.Initialize(
            this.decompositionItemPrefab.gameObject,
            this.getItem.Length,
            this.OnUpdateDecompositionScrollViewItem

            );
    }
 protected PartsInfoBase(UserGearData data)
 {
 }
    /// <summary>
    /// ギア情報セット
    /// </summary>
    public void SetGearData(UserGearData data, Action onReflesh, Action onRefleshDecomposition)
    {
        this.gearData  = data;
        this.onReflesh = onReflesh;
        this.onRefleshDecomposition = onRefleshDecomposition;

        // CommonIconをギアに変更
        this.commonIcon.SetGearCommonIcon(true);
        // ギアアイコン情報セット
        this.gearCommonIcon.Set(
            data: data,
            isEquipped: data.partsServerId > 0,
            isLock: data.lockFlg,
            onClick: null
            );

        // マスターデータ
        var gearMaster = Masters.GearDB.FindById(data.gearId);

        //現在ギアと所有するギアを比較の上、同数
        uint[] gearIds = UserData.Get().gearData.Select(x => x.gearId).ToArray();
        int    count   = 0;

        for (int i = 0; i < gearIds.Length; i++)
        {
            var userGearIds    = gearIds[i].ToString();
            var currentGearIds = data.gearId.ToString();

            if (currentGearIds == userGearIds)
            {
                count++;
            }
        }

        // 同一のギア数テキスト
        this.overlapCountText.text = Masters.LocalizeTextDB.GetFormat("GearOverlapCount", count - 1);

        // 名前
        this.gearNameText.text = gearMaster.name;
        // 説明
        this.gearDescriptionText.text = gearMaster.description;

        // ゲージ、ギアを能力値
        var config  = Masters.ConfigDB.FindById(1);
        var power   = gearMaster.power;
        var speed   = gearMaster.speed;
        var fvPoint = gearMaster.fvPoint;

        // ゲージセット
        this.powerGauge.SetGaugeValue(Mathf.Clamp01((float)power / config.maxGearPower));
        this.bulletSpeedGauge.SetGaugeValue(Mathf.Clamp01((float)speed / config.maxGearSpeed));
        this.fvPointGetCalueGauge.SetGaugeValue(Mathf.Clamp01((float)fvPoint / config.maxGearFvPoint));

        // パーツ別に、情報ロード
        PartsInfoBase partsInfo = null;

        if (this.gearData.gearType == (uint)GearType.Battery)
        {
            partsInfo = new BatteryPartsInfo(data);
        }
        else if (this.gearData.gearType == (uint)GearType.Barrel)
        {
            partsInfo = new BarrelPartsInfo(data);
        }
        else if (this.gearData.gearType == (uint)GearType.Bullet)
        {
            partsInfo = new BulletPartsInfo(data);
        }

        if (data.partsServerId == null)
        {
            this.partsCommonIcon.gameObject.SetActive(false);
            this.needCoinArea.gameObject.SetActive(false);
            this.lockbutton.gameObject.SetActive(false);
            this.decompositionButton.gameObject.SetActive(true);
            this.lockbutton.gameObject.SetActive(false);
        }
        else
        {
            // パーツアイコン
            this.partsCommonIcon.countText.text = null;
            this.partsCommonIcon.gearArea.gameObject.SetActive(true);
            this.decompositionButton.gameObject.SetActive(false);
            this.lockbutton.gameObject.SetActive(true);

            // CommonIconパーツスプライトセット
            string Key  = CommonIconUtility.GetSpriteKey((uint)partsInfo.itemType, partsInfo.partsMasterId);
            string Path = CommonIconUtility.GetSpritePath((uint)partsInfo.itemType, partsInfo.partsMasterId);

            var partsHandle = AssetManager.FindHandle <Sprite>(Path);
            this.partsCommonIcon.SetIconSprite(partsHandle.asset as Sprite);

            // CommonIconパーツランキングセット
            var partsRank = CommonIconUtility.GetRarity((uint)partsInfo.itemType, partsInfo.partsMasterId);
            this.partsCommonIcon.SetRank(partsRank);

            // CommonIconパーツ装着中ギアセット
            var partsGearSize = partsInfo.partsGearSize;

            for (int i = 0; i < this.partsCommonIcon.gearIcon.Length; i++)
            {
                this.partsCommonIcon.gearIcon[i].enabled = i < partsInfo.partsGearSlotCount;
                if (i < partsGearSize)
                {
                    this.partsCommonIcon.gearOnIcon[i].gameObject.SetActive(true);
                }
            }

            // 装着中表示
            this.partsEquippedMark.SetActive(partsInfo.partsIsEquiped);
            // 外すテキスト
            this.unEquipGearText.text = Masters.LocalizeTextDB.GetFormat("unitNeedCoin", Masters.GearDB.FindById(gearData.gearId).rejectCoin);
        }

        // ロックチェック
        if (data.lockFlg == 1)
        {
            this.lockOn.gameObject.SetActive(true);
            this.lockOff.gameObject.SetActive(false);
        }
        else
        {
            this.lockOn.gameObject.SetActive(false);
            this.lockOff.gameObject.SetActive(true);
        }

        // 分解詩修得アイテムマスターID取得
        this.getItem = Masters.ItemSellDB.GetList().FindAll(x => x.itemSellId == Masters.GearDB.FindById(data.gearId).itemSellId).ToArray();

        // 分解詩修得アイテムスクロールビュー
        this.decompositionScrollView.Initialize(
            this.decompositionItemPrefab.gameObject,
            this.getItem.Length,
            this.OnUpdateDecompositionScrollViewItem
            );

        // ボタングレーアウトON/OFF
        if (this.gearData.lockFlg == 1)
        {
            this.SetGrayout(true);
            this.decompositionButton.interactable = false;
        }
        else
        {
            this.SetGrayout(false);
        }
    }