チュートリアル時のタンク初期化を実装

This commit is contained in:
kimura 2022-02-15 17:26:37 +09:00
parent 5ef86a74a2
commit f029ae5728
2 changed files with 12 additions and 7 deletions

View File

@ -83,7 +83,7 @@ public class KitchenManager : MonoBehaviour
gameData.Material.Add(materialData); gameData.Material.Add(materialData);
} }
materialData.Amount++; materialData.Amount++;
gameData.StorageTanks.Clear(); gameData.InitTank();
gameData.ShopStock.Clear(); gameData.ShopStock.Clear();
// ミッションカウンターリセット // ミッションカウンターリセット
gameData.ResetNormalTotalCount(); gameData.ResetNormalTotalCount();

View File

@ -332,6 +332,16 @@ public sealed class GameData {
++adCount; ++adCount;
} }
public void InitTank()
{
StorageTanks.Clear();
StorageTanks.Add(new StorageTank
{
Capacity = Const.TankCapacity,
FlavorId = -1,
});
}
// public void ChangeAvatar(AvatarData avatarData){ // public void ChangeAvatar(AvatarData avatarData){
// newAvatarIdList.Remove(avatarData.id); // newAvatarIdList.Remove(avatarData.id);
// } // }
@ -364,12 +374,7 @@ public sealed class GameData {
} }
if (StorageTanks.Count < 1) if (StorageTanks.Count < 1)
{ {
StorageTanks.Add(new StorageTank InitTank();
{
Capacity = Const.TankCapacity,
FlavorId = -1,
}
);
} }
if (Pans.Length < 1) if (Pans.Length < 1)
{ {