feat(battle-engine): EffectType full enum + collection/card/vfx extension copies
Replaces partial EffectMgr.EffectType with all 226 decomp values; copies the IsNotNullOrEmpty/EquelsID/FindFromCardId/GetAllFuncVfxResults extension files + UI extensions; adds Renderer/MeshFilter shared-material/mesh/sortingOrder. Compile loop then closed the revealed deps (3242 files). 9.1k -> 18 errors.
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class BattlePassProductDetailDialog : MonoBehaviour
|
||||
{
|
||||
private const string PATH_DIALOG_PREFAB = "UI/layoutParts/BattlePass/DialogBattlePassProductDetail";
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _descriptionLabel;
|
||||
|
||||
[SerializeField]
|
||||
private UITexture _posterTexture;
|
||||
|
||||
private List<string> _loadedResourceList;
|
||||
|
||||
public static void Create(BattlePassProduct product)
|
||||
{
|
||||
DialogBase dialogBase = UIManager.GetInstance().CreateDialogClose();
|
||||
dialogBase.SetSize(DialogBase.Size.M);
|
||||
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.OkBtn);
|
||||
dialogBase.SetPanelDepth(100);
|
||||
dialogBase.SetTitleLabel(Data.SystemText.Get("BattlePass_0003"));
|
||||
GameObject gameObject = UnityEngine.Object.Instantiate(Resources.Load("UI/layoutParts/BattlePass/DialogBattlePassProductDetail")) as GameObject;
|
||||
dialogBase.SetObj(gameObject);
|
||||
gameObject.GetComponent<BattlePassProductDetailDialog>().Initialize(product);
|
||||
}
|
||||
|
||||
public void Initialize(BattlePassProduct product)
|
||||
{
|
||||
_descriptionLabel.text = product.Description;
|
||||
_loadedResourceList = new List<string>();
|
||||
LoadResources(product, delegate
|
||||
{
|
||||
_posterTexture.mainTexture = Toolbox.ResourcesManager.LoadObject(product.GetDetailPosterTexturePath(isFetch: true)) as Texture;
|
||||
});
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
UnloadResources();
|
||||
}
|
||||
|
||||
private void LoadResources(BattlePassProduct product, Action onFinishLoad)
|
||||
{
|
||||
UIManager.GetInstance().createInSceneCenterLoading();
|
||||
List<string> loadPassList = new List<string>();
|
||||
loadPassList.Add(product.GetDetailPosterTexturePath(isFetch: false));
|
||||
StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(loadPassList, delegate
|
||||
{
|
||||
_loadedResourceList.AddRange(loadPassList);
|
||||
UIManager.GetInstance().closeInSceneCenterLoading();
|
||||
onFinishLoad.Call();
|
||||
}));
|
||||
}
|
||||
|
||||
private void UnloadResources()
|
||||
{
|
||||
Toolbox.ResourcesManager.RemoveAssetGroup(_loadedResourceList);
|
||||
_loadedResourceList = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user