素材リセットを追加

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, - target: {fileID: 5062447477614030396, guid: f19992fe2069b4e16b2f83277fb189cb,
type: 3} type: 3}
propertyPath: m_Text propertyPath: m_Text
value: "\u7D20\u6750\n\u88DC\u5145" value: "\u7D20\u6750\u30EA\n\u30BB\u30C3\u30C8"
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5850834825256791800, guid: f19992fe2069b4e16b2f83277fb189cb, - target: {fileID: 5850834825256791800, guid: f19992fe2069b4e16b2f83277fb189cb,
type: 3} type: 3}
propertyPath: m_Name propertyPath: m_Name
value: RefillButton value: ResetMaterialButton
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5850834825256791800, guid: f19992fe2069b4e16b2f83277fb189cb, - target: {fileID: 5850834825256791800, guid: f19992fe2069b4e16b2f83277fb189cb,
type: 3} type: 3}

View File

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

View File

@ -33,12 +33,15 @@ public class KitchenManager : MonoBehaviour
{ {
var gameData = GameDataManager.GameData; var gameData = GameDataManager.GameData;
// 所持レシピ // 所持レシピ
if (gameData.MyRecipes == null || gameData.MyRecipes.Length == 0)
{
gameData.MyRecipes = new[] gameData.MyRecipes = new[]
{ {
1, 1,
2, 2,
13, 13,
}; };
}
// 所持素材 // 所持素材
if (gameData.Material == null || gameData.Material.Count == 0) if (gameData.Material == null || gameData.Material.Count == 0)