カスタマイズ機能UIボタン処理割当
This commit is contained in:
parent
a137e3e259
commit
0bd60304f2
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue