45 lines
1.7 KiB
C#
45 lines
1.7 KiB
C#
using System.Collections;
|
|
using Wizard.Battle.Phase;
|
|
using Wizard.DeckCardEdit;
|
|
|
|
namespace Wizard;
|
|
|
|
public static class FreeAndRankMatchDeckSelectConfirmDialog
|
|
{
|
|
|
|
public static void DecideDeck(DeckData deck, bool isBattleEnd, bool notBlack = false, bool notCollider = false)
|
|
{
|
|
DeckListUtility.DataMgrSaveLastSelectDeckData(deck);
|
|
ToolboxGame.UIManager.createInSceneLoadingMatching(notBlack, notCollider);
|
|
|
|
UIManager.GetInstance().StartCoroutine(ChangeMatchingScene(isBattleEnd));
|
|
}
|
|
|
|
private static IEnumerator ChangeMatchingScene(bool isBattleEnd)
|
|
{
|
|
yield return UIManager.GetInstance().StartCoroutine(MasterResetMonthTask.MasterReset());
|
|
// Pre-Phase-5b: gated on mgr.GetCurrentPhase() to trace + BattleControl.BattleEnd
|
|
// on the way out. BattleControl is a stub (chunk 7); collapse to the else branch's
|
|
// UIManager scene change, which is the only observable output.
|
|
UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.RankMatch);
|
|
}
|
|
|
|
private static void ChangeViewSceneAndSetBattleRetry(UIManager.ViewScene viewScene)
|
|
{
|
|
// Pre-Phase-5b: battle-scene branch routed through GameMgr.GetBattleCtrl().BattleEnd.
|
|
// BattleControl is a stub (chunk 7); collapse to the else branch.
|
|
UIManager.ChangeViewSceneParam changeViewSceneParam = new UIManager.ChangeViewSceneParam();
|
|
changeViewSceneParam.OnChange = SetBattleRetryForDeckCardEdit;
|
|
UIManager.GetInstance().ChangeViewScene(viewScene, changeViewSceneParam);
|
|
}
|
|
|
|
private static void SetBattleRetryForDeckCardEdit()
|
|
{
|
|
UIManager instance = UIManager.GetInstance();
|
|
if (instance.IsCurrentScene(UIManager.ViewScene.DeckCardEdit))
|
|
{
|
|
(instance.GetUiBaseOfCurrentScene() as DeckCardEditUI).IsBattleRetry = true;
|
|
}
|
|
}
|
|
}
|