From 0bd60304f2f2e64115db90a85b4c0b40ef8816e6 Mon Sep 17 00:00:00 2001 From: kimura Date: Fri, 13 May 2022 10:57:05 +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=BDUI=E3=83=9C=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E5=87=A6=E7=90=86=E5=89=B2=E5=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/marketing/Scripts/ShopCustomize.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopCustomize.cs b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopCustomize.cs index 67a49d12..b6fde61c 100644 --- a/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopCustomize.cs +++ b/popcorn/Assets/MyGame/Scenes/marketing/Scripts/ShopCustomize.cs @@ -21,11 +21,12 @@ namespace MyGame.Scenes.marketing.Scripts customizeView.SetLevel(gameData.ShopCustomizeLevel); customizeView.OnCloseObservable.Subscribe(_ => { - // unload scene + GameDataManager.SaveGameData(); // 設定を保存 + TransitionManager.Instance.LoadScene(GameScenes.marketing); }).AddTo(this); customizeView.OnClickInfoObservable.Subscribe(_ => { - // info dialog + ShopCustomizeInfoDialog.ShowDialog(); }).AddTo(this); customizeSelector.Initialize(); // カード生成 @@ -67,16 +68,21 @@ namespace MyGame.Scenes.marketing.Scripts } selectedItem = item; item.SetState(ShopCustomizeItemState.Selected); - marketView.SetItem(customizeData); + gameData.ShopCustomizeSettings.SetSetting(customizeData); + // marketView.SetItem(customizeData); }).AddTo(this); item.DetailObservable.Subscribe(_ => { - // item detail dialog + ShopCustomizePurchaseDialog.ShowDialog(customizeData, true); }).AddTo(this); item.PurchaseObservable.Subscribe(_ => { // purchase dialog - item.SetState(ShopCustomizeItemState.Purchased); + ShopCustomizePurchaseDialog.ShowDialog(customizeData, false, () => + { + PurchaseItem(customizeData); + item.SetState(ShopCustomizeItemState.Selected); + }); }).AddTo(this); } }