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; |         var gameData = GameDataManager.GameData; | ||||||
|         // 店頭の空きに追加 |         // 店頭の空きに追加 | ||||||
|  |  | ||||||
|  | @ -65,73 +65,38 @@ public class DebugOptionManager : MonoBehaviour | ||||||
|          |          | ||||||
|         refillManyProductButton.OnClickAsObservable().Subscribe(_ => |         refillManyProductButton.OnClickAsObservable().Subscribe(_ => | ||||||
|         { |         { | ||||||
|             gameData.ShopStock.Clear(); |             gameData.StorageTanks.Clear(); | ||||||
|             gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData() |             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 |                 Capacity = 50, | ||||||
|             }, 5)); |                 FlavorId = 6, | ||||||
|             gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData() |                 Stocks = new List<ProductStockData> | ||||||
|                 { |                 { | ||||||
|                 FlavorId = 2, Rarity = ProductRarity.Yellow |                     new ProductStockData | ||||||
|             }, 5)); |  | ||||||
|             gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData() |  | ||||||
|                     { |                     { | ||||||
|                 FlavorId = 3, Rarity = ProductRarity.Copper |                         Rarity = ProductRarity.Gold,  | ||||||
|             }, 5)); |                         Stock = 17 | ||||||
|             gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData() |                     } | ||||||
|             { |                 } | ||||||
|                 FlavorId = 4, Rarity = ProductRarity.Silver |             }); | ||||||
|             }, 5)); |             CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Normal); | ||||||
|             // gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData() |             CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Yellow); | ||||||
|             // { |             CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Copper); | ||||||
|             //     FlavorId = 5, Rarity = ProductRarity.Gold |             CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Silver); | ||||||
|             // }, 5)); |             CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Gold); | ||||||
|              |             CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Rainbow); | ||||||
|             gameData.StorageTanks = new List<StorageTank> |             CookingResult.AddStock(new ProductData(){volume = 20, id = 2}, ProductRarity.Silver); | ||||||
|             { |             CookingResult.AddStock(new ProductData(){volume = 30, id = 3}, ProductRarity.Gold); | ||||||
|                 // 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> |  | ||||||
|                 { |  | ||||||
|                     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}}}, |  | ||||||
|             }; |  | ||||||
|         }).AddTo(this); |         }).AddTo(this); | ||||||
|          |          | ||||||
|         refillLittleProductButton.OnClickAsObservable().Subscribe(_ => |         refillLittleProductButton.OnClickAsObservable().Subscribe(_ => | ||||||
|         { |         { | ||||||
|             gameData.StorageTanks.ForEach(x => x.ClearStock()); |             gameData.StorageTanks.ForEach(x => x.ClearStock()); | ||||||
|             gameData.ShopStock.Clear(); |             CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Yellow); | ||||||
|             gameData.ShopStock.AddRange(Enumerable.Repeat(new ProductStockData() |             CookingResult.AddStock(new ProductData(){volume = 5, id = 1}, ProductRarity.Gold); | ||||||
|             { |  | ||||||
|                 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)); |  | ||||||
|         }).AddTo(this); |         }).AddTo(this); | ||||||
| 
 | 
 | ||||||
|         coinCount.text = $"{gameData.Coin}"; |         coinCount.text = $"{gameData.Coin}"; | ||||||
|  |  | ||||||
|  | @ -169,6 +169,7 @@ public sealed class ProductData | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     public ProductData(){} | ||||||
|     public ProductData(ProductData productData, int value) |     public ProductData(ProductData productData, int value) | ||||||
|     { |     { | ||||||
|         id = productData.id; |         id = productData.id; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue