From 8be2f4f18194ed0742f2240d072e0c04b9caadd1 Mon Sep 17 00:00:00 2001 From: kimura Date: Mon, 27 Dec 2021 14:36:52 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=82=AF=E6=83=85=E5=A0=B1?= =?UTF-8?q?=E3=82=92=E3=82=B9=E3=83=97=E3=83=AC=E3=83=83=E3=83=89=E3=82=B7?= =?UTF-8?q?=E3=83=BC=E3=83=88=E3=81=8B=E3=82=89=E3=81=AE=E8=AA=AD=E3=81=BF?= =?UTF-8?q?=E8=BE=BC=E3=81=BF=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/marketing/Scripts/ProductManagement.cs | 14 ++++---------- popcorn/Assets/MyGame/Scripts/Const.cs | 1 + 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ProductManagement.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ProductManagement.cs index e5c5e2c2..e00700c0 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ProductManagement.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ProductManagement.cs @@ -78,6 +78,7 @@ public class ProductManagement : MonoBehaviour var tankList = view.SetTanks(PriceList); var rarityDataList = SpreadsheetDataManager.Instance.GetBaseDataList(Const.RarityDataSheet); var productList = SpreadsheetDataManager.Instance.GetBaseDataList(Const.ProductDataSheet); + var shopDataList = SpreadsheetDataManager.Instance.GetBaseDataList(Const.ShopDataSheet); foreach (var tankView in tankList) { tankView.SetArrow(tankView.TankNumber != 4 && tankView.TankNumber != 7 && tankView.TankNumber != gameData.StorageTanks.Count); @@ -93,16 +94,8 @@ public class ProductManagement : MonoBehaviour tankView.SetState(TankState.Unavailable); } // タンク購入 - var shopData = new ShopData - { - nameId = 0, - name = "タンク", - price = PriceList[tankView.TankNumber - 1], - text = "ポップコーンを保存する容器", - category = 3, - consumeType = 2, - prefabName = "tank" - }; + var shopData = shopDataList.First(data => data.id == Const.ShopTankId); + // 購入可否 tankView.SetCanBuy(shopData.price <= CoinManager.Instance.OwnCoin); @@ -127,6 +120,7 @@ public class ProductManagement : MonoBehaviour tankList[tankView.TankNumber].SetCanBuy(PriceList[tankView.TankNumber] <= CoinManager.Instance.OwnCoin); } }; + shopData.price = PriceList[tankView.TankNumber - 1]; ShopItemPurchaseView.ShowDialog((shopData, 0), purchaseAction); }).AddTo(tankView); } diff --git a/popcorn/Assets/MyGame/Scripts/Const.cs b/popcorn/Assets/MyGame/Scripts/Const.cs index f57c434e..0484af00 100644 --- a/popcorn/Assets/MyGame/Scripts/Const.cs +++ b/popcorn/Assets/MyGame/Scripts/Const.cs @@ -10,6 +10,7 @@ public static class Const { public static readonly int DefaultMachineLevel = 1; public static readonly int DefaultRecipeId = 1; public static readonly int DefaultPanId = 1; + public static readonly int ShopTankId = 20; public static readonly int MaxShopLevel = 14; public static readonly int TankCapacity = 20; public static readonly int SpecialShopLevel = 9999;