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;