From 96cc78c671b116745e803b18d70f65701611e0ce Mon Sep 17 00:00:00 2001 From: kimura Date: Mon, 13 Sep 2021 09:49:30 +0900 Subject: [PATCH] =?UTF-8?q?=E7=B4=A0=E6=9D=90=E3=83=AA=E3=82=BB=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyGame/Scenes/DebugOption/DebugOption.unity | 4 ++-- .../DebugOption/Scripts/DebugOptionManager.cs | 3 ++- .../MyGame/Scenes/Main/Scripts/KitchenManager.cs | 15 +++++++++------ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/DebugOption/DebugOption.unity b/popcorn/Assets/MyGame/Scenes/DebugOption/DebugOption.unity index 34a802b5..7c402c11 100644 --- a/popcorn/Assets/MyGame/Scenes/DebugOption/DebugOption.unity +++ b/popcorn/Assets/MyGame/Scenes/DebugOption/DebugOption.unity @@ -1490,12 +1490,12 @@ PrefabInstance: - target: {fileID: 5062447477614030396, guid: f19992fe2069b4e16b2f83277fb189cb, type: 3} propertyPath: m_Text - value: "\u7D20\u6750\n\u88DC\u5145" + value: "\u7D20\u6750\u30EA\n\u30BB\u30C3\u30C8" objectReference: {fileID: 0} - target: {fileID: 5850834825256791800, guid: f19992fe2069b4e16b2f83277fb189cb, type: 3} propertyPath: m_Name - value: RefillButton + value: ResetMaterialButton objectReference: {fileID: 0} - target: {fileID: 5850834825256791800, guid: f19992fe2069b4e16b2f83277fb189cb, type: 3} diff --git a/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs b/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs index 91961272..6cc4ce43 100644 --- a/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs +++ b/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs @@ -49,9 +49,10 @@ public class DebugOptionManager : MonoBehaviour refillMaterialButton.OnClickAsObservable().Subscribe(_ => { // 所持素材 + gameData.Material = new List{new MaterialData{Id = 2}}; foreach (var material in gameData.Material) { - material.Amount = 10; + material.Amount = 5; } }).AddTo(this); diff --git a/popcorn/Assets/MyGame/Scenes/Main/Scripts/KitchenManager.cs b/popcorn/Assets/MyGame/Scenes/Main/Scripts/KitchenManager.cs index 763fc876..4b62046a 100644 --- a/popcorn/Assets/MyGame/Scenes/Main/Scripts/KitchenManager.cs +++ b/popcorn/Assets/MyGame/Scenes/Main/Scripts/KitchenManager.cs @@ -33,13 +33,16 @@ public class KitchenManager : MonoBehaviour { var gameData = GameDataManager.GameData; // 所持レシピ - gameData.MyRecipes = new[] + if (gameData.MyRecipes == null || gameData.MyRecipes.Length == 0) { - 1, - 2, - 13, - }; - + gameData.MyRecipes = new[] + { + 1, + 2, + 13, + }; + } + // 所持素材 if (gameData.Material == null || gameData.Material.Count == 0) {