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:
71
SVSim.BattleEngine/Engine/Wizard/GatheringIDInput.cs
Normal file
71
SVSim.BattleEngine/Engine/Wizard/GatheringIDInput.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class GatheringIDInput : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private UIButton _searchButton;
|
||||
|
||||
[SerializeField]
|
||||
private UIButton _pasteButton;
|
||||
|
||||
[SerializeField]
|
||||
private UIInputWizard _idInput;
|
||||
|
||||
public Action<GatheringGetInfoTask> OnGetInfo { get; set; }
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_searchButton.onClick.Add(new EventDelegate(delegate
|
||||
{
|
||||
OnClickSearchButton();
|
||||
}));
|
||||
_idInput.onChange.Add(new EventDelegate(delegate
|
||||
{
|
||||
OnChangeInputId();
|
||||
}));
|
||||
_pasteButton.onClick.Add(new EventDelegate(delegate
|
||||
{
|
||||
Paste();
|
||||
}));
|
||||
UIManager.SetObjectToGrey(_searchButton.gameObject, b: true);
|
||||
}
|
||||
|
||||
private void OnChangeInputId()
|
||||
{
|
||||
UIManager.SetObjectToGrey(_searchButton.gameObject, !UIUtil.IsValidIdDigits(_idInput.value, 6));
|
||||
}
|
||||
|
||||
private void OnClickSearchButton()
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE);
|
||||
GatheringGetInfoTask task = new GatheringGetInfoTask();
|
||||
task.SetParameter(_idInput.value);
|
||||
StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate
|
||||
{
|
||||
OnSuccessGetGatheringInfo(task);
|
||||
}));
|
||||
}
|
||||
|
||||
private void OnSuccessGetGatheringInfo(GatheringGetInfoTask task)
|
||||
{
|
||||
OnGetInfo(task);
|
||||
}
|
||||
|
||||
private void Paste()
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_DECIDE);
|
||||
string clipboard = ClipboardHelper.Clipboard;
|
||||
clipboard = Regex.Replace(clipboard, "[0-9]", (Match match) => ((char)(match.Value[0] - 65296 + 48)).ToString());
|
||||
clipboard = Regex.Replace(clipboard, "\\s", "");
|
||||
if (UIUtil.IsValidIdDigits(clipboard, 6))
|
||||
{
|
||||
_idInput.value = clipboard;
|
||||
OnChangeInputId();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user