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); } /*