From 65295ee29b93a8c7193ed69027a097c4a5dd60af Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 13 May 2022 17:38:40 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=AB=E3=82=B9=E3=82=BF=E3=83=9E=E3=82=A4?= =?UTF-8?q?=E3=82=BA=E6=A9=9F=E8=83=BD=E3=83=87=E3=83=90=E3=83=83=E3=82=B0?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DebugOption/Scripts/DebugOptionManager.cs | 40 +++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) 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); /*