素材リセットを追加

This commit is contained in:
kimura 2021-09-13 09:49:30 +09:00
parent d0f1f514ce
commit 96cc78c671
3 changed files with 13 additions and 9 deletions

View File

@ -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}

View File

@ -49,9 +49,10 @@ public class DebugOptionManager : MonoBehaviour
refillMaterialButton.OnClickAsObservable().Subscribe(_ =>
{
// 所持素材
gameData.Material = new List<MaterialData>{new MaterialData{Id = 2}};
foreach (var material in gameData.Material)
{
material.Amount = 10;
material.Amount = 5;
}
}).AddTo(this);

View File

@ -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)
{