タンク開放価格変更

This commit is contained in:
kimura 2021-11-11 19:00:41 +09:00
parent 2c9482743c
commit cfc87c43b5
1 changed files with 15 additions and 14 deletions

View File

@ -18,6 +18,19 @@ public class ProductManagement : MonoBehaviour
[SerializeField] private GameObject tastingDisabledObject;
[SerializeField] private ProductManagementView view;
private readonly ReactiveProperty<ManagementState> state = new ReactiveProperty<ManagementState>();
// tank price list
private static readonly List<int> PriceList = new List<int>
{
0,
500,
1000,
2000,
3000,
4000,
5000
};
private void Start()
{
state.AddTo(this);
@ -38,23 +51,11 @@ public class ProductManagement : MonoBehaviour
// 補充方法設定
view.SetRefillType(gameData.RefillMode);
// tank price list
var priceList = new List<int>
{
0,
300,
500,
1000,
1500,
2000,
2500,
};
// タンク並び替え
gameData.StorageTanks = gameData.StorageTanks.OrderBy(tank => tank.IsEmpty).ToList();
// タンク設定
var tankList = view.SetTanks(priceList);
var tankList = view.SetTanks(PriceList);
var rarityDataList = SpreadsheetDataManager.Instance.GetBaseDataList<RarityData>(Const.RarityDataSheet);
var productList = SpreadsheetDataManager.Instance.GetBaseDataList<ProductData>(Const.ProductDataSheet);
foreach (var tankView in tankList)
@ -76,7 +77,7 @@ public class ProductManagement : MonoBehaviour
{
nameId = 0,
name = "タンク",
price = priceList[tankView.TankNumber - 1],
price = PriceList[tankView.TankNumber - 1],
text = "ポップコーンを保存する容器",
category = 3,
consumeType = 2,