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:
@@ -0,0 +1,44 @@
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard.Lottery;
|
||||
|
||||
public class LotteryApplyDialog : MonoBehaviour
|
||||
{
|
||||
private const float DIALOG_AUTO_CLOSE_TIME = 5f;
|
||||
|
||||
[SerializeField]
|
||||
private UITexture _banner;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _label;
|
||||
|
||||
private LotteryApplyData _data;
|
||||
|
||||
public static string GetLotteryTexturePath(LotteryApplyData data, bool isFetch)
|
||||
{
|
||||
return Toolbox.ResourcesManager.GetAssetTypePath(data.BannerFileName, ResourcesManager.AssetLoadPathType.Lottery, isFetch);
|
||||
}
|
||||
|
||||
public static DialogBase Create(LotteryApplyData data, bool autoClose = true)
|
||||
{
|
||||
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
|
||||
dialogBase.SetSize(DialogBase.Size.M);
|
||||
dialogBase.SetTitleLabel(data.DialogTitle);
|
||||
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
|
||||
if (autoClose)
|
||||
{
|
||||
dialogBase.AutoClose(5f);
|
||||
}
|
||||
GameObject gameObject = Object.Instantiate(UIManager.GetInstance()._lotteryApplyPrefab);
|
||||
gameObject.GetComponent<LotteryApplyDialog>()._data = data;
|
||||
dialogBase.SetObj(gameObject);
|
||||
return dialogBase;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_banner.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(GetLotteryTexturePath(_data, isFetch: true));
|
||||
_label.text = _data.DialogMessage;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user