diff --git a/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs b/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs index e103620d..54215c57 100644 --- a/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs +++ b/popcorn/Assets/MyGame/Scenes/DebugOption/Scripts/DebugOptionManager.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using I2.Loc; +using MyGame.Scenes.marketing.Scripts; using MyGame.Scripts; using UniRx; using UnityEngine; @@ -23,6 +24,8 @@ public class DebugOptionManager : MonoBehaviour [SerializeField] private Button dailyMissionResetButton; [SerializeField] private Button normalMissionResetButton; [SerializeField] private Button autoCookCompleteButton; + [SerializeField] private Button resetShopCustomizeButton; + [SerializeField] private Button completeShopCustomizeButton; [Space] [SerializeField] private Button japaneseButton; @@ -36,6 +39,7 @@ public class DebugOptionManager : MonoBehaviour [SerializeField] private Toggle vipRewardToggle; [SerializeField] private InputField coinCount; [SerializeField] private InputField heartCount; + [SerializeField] private InputField shopCustomizeCoinCount; [SerializeField] private Dropdown shopLevelDropdown; [SerializeField] private Dropdown bulkOrderDropdown; [SerializeField] private Dropdown autoCookDropdown; @@ -158,6 +162,36 @@ public class DebugOptionManager : MonoBehaviour gameData.AutoCookFinishTime = DateTime.UtcNow.ToBinary(); }).AddTo(this); + resetShopCustomizeButton.OnClickAsObservable().Subscribe(_ => + { + gameData.ShopCustomizeLevel = 0; + gameData.ShopCustomizePoint = 0; + gameData.ShopCustomizeCoin = 0; + gameData.ShopCustomizeSettings = new ShopCustomizeSettings(); + gameData.ShopCustomizeMyItems = new[] + { + Const.ShopCustomizeDefaultCartId, + Const.ShopCustomizeDefaultDecoration1Id, + Const.ShopCustomizeDefaultDecoration2Id, + Const.ShopCustomizeDefaultStockId, + Const.ShopCustomizeDefaultSignBoardId, + }; + }).AddTo(this); + + completeShopCustomizeButton.OnClickAsObservable().Subscribe(_ => + { + var shopCustomizeDataList = SpreadsheetDataManager.Instance.GetBaseDataList(Const.ShopCustomizeDataSheet); + var shopCustomizeLevelList = SpreadsheetDataManager.Instance.GetBaseDataList(Const.ShopCustomizeLevelDataSheet); + var maxLevelData = shopCustomizeLevelList.Last(); + + gameData.ShopCustomizeLevel = maxLevelData.level; + gameData.ShopCustomizePoint = maxLevelData.point; + gameData.ShopCustomizeMyItems = gameData.ShopCustomizeMyItems + .Union(shopCustomizeDataList.Select(data => data.id)).ToArray(); + }).AddTo(this); + + // switch lang + japaneseButton.OnClickAsObservable().Subscribe(_ => { LocalizationManager.CurrentLanguage = "Japanese"; @@ -185,10 +219,10 @@ public class DebugOptionManager : MonoBehaviour gameData.Heart = Int32.Parse(x); }).AddTo(this); - heartCount.text = $"{gameData.Heart}"; - heartCount.OnValueChangedAsObservable().Subscribe(x => + shopCustomizeCoinCount.text = $"{gameData.ShopCustomizeCoin}"; + shopCustomizeCoinCount.OnValueChangedAsObservable().Subscribe(x => { - gameData.Heart = Int32.Parse(x); + gameData.ShopCustomizeCoin = Int32.Parse(x); }).AddTo(this); /*