Resultの商品補充処理をデバッグで使用可能にした/ デバッグでの商品補充方法を変更
This commit is contained in:
parent
0dd54a6c16
commit
2e9235c3a2
|
|
@ -146,7 +146,7 @@ public class CookingResult : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
private void AddStock(ProductData productData, ProductRarity rarity = ProductRarity.Normal)
|
||||
public static void AddStock(ProductData productData, ProductRarity rarity = ProductRarity.Normal)
|
||||
{
|
||||
var gameData = GameDataManager.GameData;
|
||||
// 店頭の空きに追加
|
||||
|
|
|
|||
|
|
@ -65,73 +65,38 @@ public class DebugOptionManager : MonoBehaviour
|
|||
|
||||
refillManyProductButton.OnClickAsObservable().Subscribe(_ =>
|
||||
{
|
||||
gameData.ShopStock.Clear();
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
gameData.StorageTanks.Clear();
|
||||
gameData.StorageTanks.Add(new StorageTank(){Capacity = 50});
|
||||
gameData.StorageTanks.Add(new StorageTank(){Capacity = 50});
|
||||
gameData.StorageTanks.Add(new StorageTank(){Capacity = 50});
|
||||
gameData.StorageTanks.Add(new StorageTank()
|
||||
{
|
||||
FlavorId = 1, Rarity = ProductRarity.Normal
|
||||
}, 5));
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
{
|
||||
FlavorId = 2, Rarity = ProductRarity.Yellow
|
||||
}, 5));
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
{
|
||||
FlavorId = 3, Rarity = ProductRarity.Copper
|
||||
}, 5));
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
{
|
||||
FlavorId = 4, Rarity = ProductRarity.Silver
|
||||
}, 5));
|
||||
// gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
// {
|
||||
// FlavorId = 5, Rarity = ProductRarity.Gold
|
||||
// }, 5));
|
||||
|
||||
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(){Capacity = 50, FlavorId = 2, Stocks = new List<ProductStockData>
|
||||
Capacity = 50,
|
||||
FlavorId = 6,
|
||||
Stocks = new List<ProductStockData>
|
||||
{
|
||||
new ProductStockData{Rarity = ProductRarity.Normal, Stock = 1},
|
||||
new ProductStockData{Rarity = ProductRarity.Yellow, Stock = 20},
|
||||
}},
|
||||
new StorageTank(){Capacity = 50, FlavorId = 1, Stocks = new List<ProductStockData>
|
||||
{
|
||||
new ProductStockData{Rarity = ProductRarity.Normal, Stock = 1},
|
||||
new ProductStockData{Rarity = ProductRarity.Yellow, Stock = 9},
|
||||
new ProductStockData{Rarity = ProductRarity.Copper, Stock = 5},
|
||||
new ProductStockData{Rarity = ProductRarity.Silver, Stock = 5},
|
||||
new ProductStockData{Rarity = ProductRarity.Gold, Stock = 10},
|
||||
new ProductStockData{Rarity = ProductRarity.Rainbow, Stock = 20},
|
||||
}},
|
||||
new StorageTank(){Capacity = 50, FlavorId = 1, Stocks = new List<ProductStockData>{new ProductStockData{Rarity = ProductRarity.Gold, Stock = 4}}},
|
||||
};
|
||||
new ProductStockData
|
||||
{
|
||||
Rarity = ProductRarity.Gold,
|
||||
Stock = 17
|
||||
}
|
||||
}
|
||||
});
|
||||
CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Normal);
|
||||
CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Yellow);
|
||||
CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Copper);
|
||||
CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Silver);
|
||||
CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Gold);
|
||||
CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Rainbow);
|
||||
CookingResult.AddStock(new ProductData(){volume = 20, id = 2}, ProductRarity.Silver);
|
||||
CookingResult.AddStock(new ProductData(){volume = 30, id = 3}, ProductRarity.Gold);
|
||||
}).AddTo(this);
|
||||
|
||||
refillLittleProductButton.OnClickAsObservable().Subscribe(_ =>
|
||||
{
|
||||
gameData.StorageTanks.ForEach(x => x.ClearStock());
|
||||
gameData.ShopStock.Clear();
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
{
|
||||
FlavorId = 1, Rarity = ProductRarity.Normal
|
||||
}, 5));
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
{
|
||||
FlavorId = 2, Rarity = ProductRarity.Yellow
|
||||
}, 5));
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
{
|
||||
FlavorId = 3, Rarity = ProductRarity.Copper
|
||||
}, 5));
|
||||
gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
{
|
||||
FlavorId = 4, Rarity = ProductRarity.Silver
|
||||
}, 5));
|
||||
// gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData()
|
||||
// {
|
||||
// FlavorId = 5, Rarity = ProductRarity.Gold
|
||||
// }, 5));
|
||||
CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Yellow);
|
||||
CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Gold);
|
||||
}).AddTo(this);
|
||||
|
||||
coinCount.text = $"{gameData.Coin}";
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ public sealed class ProductData
|
|||
}
|
||||
}
|
||||
|
||||
public ProductData(){}
|
||||
public ProductData(ProductData productData, int value)
|
||||
{
|
||||
id = productData.id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue