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:
102
SVSim.BattleEngine/Engine/Wizard/DialogCreator.cs
Normal file
102
SVSim.BattleEngine/Engine/Wizard/DialogCreator.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
using Wizard.Lottery;
|
||||
using Wizard.Scripts.Network.Data.TaskData.Arena;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public static class DialogCreator
|
||||
{
|
||||
public static DialogBase CreateRewardReceiveDialog(List<ReceivedReward> rewardList)
|
||||
{
|
||||
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
|
||||
dialogBase.SetLayer("Loading");
|
||||
dialogBase.SetSize(DialogBase.Size.M);
|
||||
dialogBase.SetTitleLabel(Data.SystemText.Get("Mail_0021"));
|
||||
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
|
||||
RewardBase component = NGUITools.AddChild(dialogBase.gameObject, Resources.Load<GameObject>("UI/layoutParts/StoryRewardPanel")).GetComponent<RewardBase>();
|
||||
for (int i = 0; i < rewardList.Count; i++)
|
||||
{
|
||||
component.AddReward(rewardList[i]);
|
||||
}
|
||||
component.EndCreate();
|
||||
dialogBase.SetObj(component.gameObject);
|
||||
dialogBase.OnClose = delegate
|
||||
{
|
||||
List<string> cardListAssetPathList = Toolbox.ResourcesManager.CardListAssetPathList;
|
||||
if (cardListAssetPathList.Count > 0)
|
||||
{
|
||||
Toolbox.ResourcesManager.RemoveAssetGroup(cardListAssetPathList);
|
||||
cardListAssetPathList.Clear();
|
||||
}
|
||||
};
|
||||
return dialogBase;
|
||||
}
|
||||
|
||||
public static DialogBase CreateSupplyReceiveDialog(List<Wizard.Scripts.Network.Data.TaskData.Arena.Reward> supplyList)
|
||||
{
|
||||
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
|
||||
dialogBase.SetSize(DialogBase.Size.M);
|
||||
dialogBase.SetTitleLabel(Data.SystemText.Get("Dia_BuyCard_004_Title"));
|
||||
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
|
||||
RewardBase component = NGUITools.AddChild(dialogBase.gameObject, Resources.Load<GameObject>("UI/layoutParts/StoryRewardPanel")).GetComponent<RewardBase>();
|
||||
for (int i = 0; i < supplyList.Count; i++)
|
||||
{
|
||||
component.AddReward(supplyList[i]);
|
||||
}
|
||||
component.EndCreate();
|
||||
dialogBase.SetObj(component.gameObject);
|
||||
return dialogBase;
|
||||
}
|
||||
|
||||
public static CardDetailUI CreateCardDetailDialog(GameObject rootObject, string layerName)
|
||||
{
|
||||
CardDetailUI component = NGUITools.AddChild(rootObject, Resources.Load<GameObject>("UI/CardDetail")).GetComponent<CardDetailUI>();
|
||||
component.Initialize(LayerMask.NameToLayer(layerName), CardMaster.CardMasterId.Default);
|
||||
return component;
|
||||
}
|
||||
|
||||
public static UICardList CreateDeckViewerDialog(GameObject rootObject)
|
||||
{
|
||||
CardDetailUI cardDetailUI = CreateCardDetailDialog(rootObject, "Detail");
|
||||
cardDetailUI.gameObject.SetActive(value: false);
|
||||
UICardList deckViewerDialog = NGUITools.AddChild(rootObject, Resources.Load<GameObject>("UI/UICardList")).GetComponent<UICardList>();
|
||||
deckViewerDialog.Init(rootObject, cardDetailUI, string.Empty, delegate
|
||||
{
|
||||
deckViewerDialog.SetActive(in_Active: false);
|
||||
}, "Detail", in_DetailCameraUse: true);
|
||||
deckViewerDialog.SetActive(in_Active: false);
|
||||
return deckViewerDialog;
|
||||
}
|
||||
|
||||
public static DialogBase CreateStageSelectDialog()
|
||||
{
|
||||
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
|
||||
dialogBase.SetTitleLabel(Data.SystemText.Get("Common_0021"));
|
||||
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
|
||||
dialogBase.SetObj(NGUITools.AddChild(dialogBase.gameObject, Resources.Load<GameObject>("UI/DeckList/StageSelect")));
|
||||
return dialogBase;
|
||||
}
|
||||
|
||||
public static void ShowCpAppliedDialog(LotteryApplyData lotteryData, Action onFinish)
|
||||
{
|
||||
if (!lotteryData.IsEnable)
|
||||
{
|
||||
onFinish.Call();
|
||||
return;
|
||||
}
|
||||
UIManager.GetInstance().LoadingViewManager.CreateInSceneCenter();
|
||||
string path = LotteryApplyDialog.GetLotteryTexturePath(lotteryData, isFetch: false);
|
||||
UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetAsync(path, delegate
|
||||
{
|
||||
UIManager.GetInstance().closeInSceneCenterLoading();
|
||||
LotteryApplyDialog.Create(lotteryData, autoClose: false).OnClose = delegate
|
||||
{
|
||||
onFinish.Call();
|
||||
Toolbox.ResourcesManager.RemoveAsset(path);
|
||||
};
|
||||
}));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user