StrageTank不要変数削除
This commit is contained in:
parent
4f25312cef
commit
29e48856e1
|
|
@ -90,12 +90,12 @@ public class DebugOptionManager : MonoBehaviour
|
|||
gameData.StorageTanks = new List<StorageTank>
|
||||
{
|
||||
// new StorageTank(){Id = 1, Capacity = 50, FlavorId = 1, Stocks = new List<ProductStockData>{new ProductStockData{Rarity = ProductRarity.Normal, Stock = 0}}},
|
||||
new StorageTank(){Id = 2, Capacity = 50, FlavorId = 2, Stocks = new List<ProductStockData>
|
||||
new StorageTank(){Capacity = 50, FlavorId = 2, Stocks = new List<ProductStockData>
|
||||
{
|
||||
new ProductStockData{Rarity = ProductRarity.Normal, Stock = 1},
|
||||
new ProductStockData{Rarity = ProductRarity.Yellow, Stock = 20},
|
||||
}},
|
||||
new StorageTank(){Id = 3, Capacity = 50, FlavorId = 1, Stocks = new List<ProductStockData>
|
||||
new StorageTank(){Capacity = 50, FlavorId = 1, Stocks = new List<ProductStockData>
|
||||
{
|
||||
new ProductStockData{Rarity = ProductRarity.Normal, Stock = 1},
|
||||
new ProductStockData{Rarity = ProductRarity.Yellow, Stock = 9},
|
||||
|
|
@ -104,7 +104,7 @@ public class DebugOptionManager : MonoBehaviour
|
|||
new ProductStockData{Rarity = ProductRarity.Gold, Stock = 10},
|
||||
new ProductStockData{Rarity = ProductRarity.Rainbow, Stock = 20},
|
||||
}},
|
||||
new StorageTank(){Id = 4, Capacity = 50, FlavorId = 1, Stocks = new List<ProductStockData>{new ProductStockData{Rarity = ProductRarity.Gold, Stock = 4}}},
|
||||
new StorageTank(){Capacity = 50, FlavorId = 1, Stocks = new List<ProductStockData>{new ProductStockData{Rarity = ProductRarity.Gold, Stock = 4}}},
|
||||
};
|
||||
}).AddTo(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class ProductManagement : MonoBehaviour
|
|||
Action<int> purchaseAction = amount =>
|
||||
{
|
||||
// タンク追加
|
||||
gameData.StorageTanks.Add(new StorageTank() {Id = tankView.TankNumber, Capacity = 50});
|
||||
gameData.StorageTanks.Add(new StorageTank() {Capacity = 50});
|
||||
tankView.SetData(gameData.StorageTanks[tankView.TankNumber - 1]);
|
||||
tankView.SetState(TankState.Unlock);
|
||||
CoinManager.Instance.SubCoin(shopData.price);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ using UnityEngine;
|
|||
public class StorageTank
|
||||
{
|
||||
// タンクID, タンク内のフレーバーID, フレーバーの個数
|
||||
public int Id;
|
||||
public int Capacity;
|
||||
public int FlavorId;
|
||||
public int Stock
|
||||
|
|
|
|||
|
|
@ -207,6 +207,15 @@ public sealed class GameData {
|
|||
{
|
||||
MyRecipes = new[] {Const.DefaultRecipeId};
|
||||
}
|
||||
if (StorageTanks.Count < 1)
|
||||
{
|
||||
StorageTanks.Add(new StorageTank
|
||||
{
|
||||
Capacity = 50,
|
||||
FlavorId = -1,
|
||||
}
|
||||
);
|
||||
}
|
||||
if (Pans.Length < 1)
|
||||
{
|
||||
Pans = new[] {Const.DefaultPanId};
|
||||
|
|
@ -221,6 +230,7 @@ public sealed class GameData {
|
|||
MyRecipes = MyRecipes ?? new int[0];
|
||||
Material = Material ?? new List<MaterialData>();
|
||||
ShopStock = ShopStock ?? new List<ProductStockData>();
|
||||
StorageTanks = StorageTanks ?? new List<StorageTank>();
|
||||
Pans = Pans ?? new int[0];
|
||||
TotalSalesList = TotalSalesList ?? new List<ProductStockData>();
|
||||
AchievedMission = achievedMission?.ToList() ?? new List<int>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue