50 lines
2.5 KiB
C#
50 lines
2.5 KiB
C#
#if UNITY_EDITOR
|
|
using System;
|
|
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
namespace BlockOutReplica.Gameplay
|
|
{
|
|
public sealed partial class BlockOutGameController
|
|
{
|
|
public IEnumerator ReviewUiComparison()
|
|
{
|
|
if(IsFullLoopSandbox)throw new InvalidOperationException("Restore the manual sandbox before UI review.");
|
|
BeginFullLoopSandbox();
|
|
try
|
|
{
|
|
// Match the observed original Home L10 wallet, not the real local
|
|
// player's save. This fixture checks presentation, not level parity.
|
|
progress.MoveBy(1);Player.SpendCoins(Player.Coins-270);
|
|
Journey.TryClaim(10,CompletedLevels,out var ignored);
|
|
GoHome(false);yield return null;yield return null;
|
|
CaptureUi("home");yield return null;
|
|
OpenHomeTab(true);yield return null;yield return null;
|
|
CaptureUi("journey");yield return null;
|
|
OpenHomeTab(false);RequestEnterLevel();yield return null;yield return null;
|
|
CaptureUi("prelevel");yield return null;
|
|
EnterPreparedLevel();RequestPause();yield return null;yield return null;
|
|
CaptureUi("pause");yield return null;
|
|
int livesBeforeQuit=Player.Lives;
|
|
RequestQuit();yield return null;yield return null;
|
|
CaptureUi("quit");yield return null;
|
|
ConfirmQuit();ConfirmQuit();yield return null;yield return null;
|
|
if(Modal!=GameModal.Failed||ScreenState!=BlockOutScreenState.Failed||Player.Lives!=livesBeforeQuit-1)
|
|
throw new InvalidOperationException("Quit must debit once and open FAILED, including before first drag.");
|
|
CaptureUi("failed");yield return null;
|
|
CloseModal();yield return null;yield return null;
|
|
if(ScreenState!=BlockOutScreenState.Home)throw new InvalidOperationException("FAILED close must return Home.");
|
|
CaptureUi("returned-home");yield return null;
|
|
Debug.Log("BLOCKOUT_UI_REVIEW: captured=Home,Journey,PreLevel,Pause,Quit,Failed,ReturnedHome, quitDebitedOnce=True, isolatedSaves=True, originalLevelContentNotValidated=True");
|
|
}
|
|
finally{RestoreFullLoopSandbox();}
|
|
}
|
|
private static void CaptureUi(string screen)
|
|
{
|
|
System.IO.Directory.CreateDirectory("Docs/iterations");
|
|
ScreenCapture.CaptureScreenshot("Docs/iterations/2026-10-20-ui-"+screen+".png");
|
|
}
|
|
}
|
|
}
|
|
#endif
|