From 91e0ffbf093b9d0566bae3101bc1fe2046b0041f Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 20 May 2022 11:46:31 +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=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/marketing/Scripts/ShopCustomize.cs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopCustomize.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopCustomize.cs index 756e8342..971b0805 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopCustomize.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopCustomize.cs @@ -12,11 +12,8 @@ namespace MyGame.Scenes.marketing.Scripts [SerializeField] private MarketView marketView; [SerializeField] private ShopCustomizeView customizeView; [SerializeField] private ShopCustomizeSelector customizeSelector; - private readonly Subject purchasedNotify = new Subject(); private void Start() { - purchasedNotify.AddTo(this); - SoundManager.Instance.PlayBGM("bgm_marketing"); var gameData = GameDataManager.GameData; var customizeDataList = SpreadsheetDataManager.Instance.GetBaseDataList(Const.ShopCustomizeDataSheet); @@ -70,20 +67,13 @@ myItems {string.Join(",", gameData.ShopCustomizeMyItems.Select(x => x.ToString() { item.SetState(ShopCustomizeItemState.Purchased); } - else if (gameData.ShopCustomizeLevel >= customizeData.level) + else if (gameData.ViewedShopLevel >= customizeData.level) { item.SetState(ShopCustomizeItemState.Unlock); } else { item.SetState(ShopCustomizeItemState.Lock); - purchasedNotify.Distinct() - .Where(_ => gameData.ShopCustomizeLevel >= customizeData.level) - .Take(1) - .Subscribe(x => - { - item.SetState(ShopCustomizeItemState.Unlock); - }).AddTo(this); } item.SelectObservable.Merge(selectSubject).Subscribe(_ => @@ -139,7 +129,6 @@ myItems {string.Join(",", gameData.ShopCustomizeMyItems.Select(x => x.ToString() gameData.ShopCustomizeLevel = level; GameDataManager.SaveGameData(); customizeView.SetLevel(gameData.ShopCustomizeLevel); - purchasedNotify.OnNext(Unit.Default); } /*