feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
This commit is contained in:
42
SVSim.BattleEngine/Engine/Wizard/DrumrollDialog.cs
Normal file
42
SVSim.BattleEngine/Engine/Wizard/DrumrollDialog.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class DrumrollDialog : UIBase
|
||||
{
|
||||
[SerializeField]
|
||||
private UtilityDrumrollScroll _drumroll;
|
||||
|
||||
public int CurrentIndex => _drumroll.CurrentIndex;
|
||||
|
||||
public static DialogBase Create(List<string> textList, int defaultIndex, Action<int> selectCallback, Action createCallback = null, Action<int> decideCallBack = null, string dialogTitle = "")
|
||||
{
|
||||
return Create(UnityEngine.Object.Instantiate(UIManager.GetInstance().DrumrollDialogPrefab), textList, defaultIndex, selectCallback, createCallback, decideCallBack, dialogTitle);
|
||||
}
|
||||
|
||||
public static DialogBase Create(DrumrollDialog drumroll, List<string> textList, int defaultIndex, Action<int> selectCallback, Action createCallback = null, Action<int> decideCallBack = null, string dialogTitle = "")
|
||||
{
|
||||
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
|
||||
dialogBase.SetSize(DialogBase.Size.M);
|
||||
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
|
||||
if (dialogTitle.IsNotNullOrEmpty())
|
||||
{
|
||||
dialogBase.SetTitleLabel(dialogTitle);
|
||||
}
|
||||
dialogBase.SetObj(drumroll.gameObject);
|
||||
drumroll.CreateDrumroll(textList, defaultIndex, selectCallback, createCallback);
|
||||
dialogBase.onPushButton1 = delegate
|
||||
{
|
||||
decideCallBack.Call(drumroll.CurrentIndex);
|
||||
};
|
||||
return dialogBase;
|
||||
}
|
||||
|
||||
private void CreateDrumroll(List<string> textList, int defaultIndex, Action<int> selectCallback, Action createCallback = null)
|
||||
{
|
||||
StartCoroutine(_drumroll.CreateDrumrollScroll_Coroutine(textList, defaultIndex, selectCallback, createCallback));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user