タンク情報をスプレッドシートからの読み込みに修正
This commit is contained in:
parent
90d80eccd7
commit
8be2f4f181
|
|
@ -78,6 +78,7 @@ public class ProductManagement : MonoBehaviour
|
|||
var tankList = view.SetTanks(PriceList);
|
||||
var rarityDataList = SpreadsheetDataManager.Instance.GetBaseDataList<RarityData>(Const.RarityDataSheet);
|
||||
var productList = SpreadsheetDataManager.Instance.GetBaseDataList<ProductData>(Const.ProductDataSheet);
|
||||
var shopDataList = SpreadsheetDataManager.Instance.GetBaseDataList<ShopData>(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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue