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,47 @@
|
||||
using System;
|
||||
|
||||
namespace Wizard.Battle.View.Vfx;
|
||||
|
||||
public static class VfxResultEventExtension
|
||||
{
|
||||
public static VfxBase GetAllFuncVfxResults(this Func<VfxBase> func)
|
||||
{
|
||||
return CallAllFunc(func, (Delegate f) => ((Func<VfxBase>)f)());
|
||||
}
|
||||
|
||||
public static VfxBase GetAllFuncVfxResults<T1>(this Func<T1, VfxBase> func, T1 arg1)
|
||||
{
|
||||
return CallAllFunc(func, (Delegate f) => ((Func<T1, VfxBase>)f)(arg1));
|
||||
}
|
||||
|
||||
public static VfxBase GetAllFuncVfxResults<T1, T2>(this Func<T1, T2, VfxBase> func, T1 arg1, T2 arg2)
|
||||
{
|
||||
return CallAllFunc(func, (Delegate f) => ((Func<T1, T2, VfxBase>)f)(arg1, arg2));
|
||||
}
|
||||
|
||||
public static VfxBase GetAllFuncVfxResults<T1, T2, T3>(this Func<T1, T2, T3, VfxBase> func, T1 arg1, T2 arg2, T3 arg3)
|
||||
{
|
||||
return CallAllFunc(func, (Delegate f) => ((Func<T1, T2, T3, VfxBase>)f)(arg1, arg2, arg3));
|
||||
}
|
||||
|
||||
public static VfxBase GetAllFuncVfxResults<T1, T2, T3, T4>(this Func<T1, T2, T3, T4, VfxBase> func, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
|
||||
{
|
||||
return CallAllFunc(func, (Delegate f) => ((Func<T1, T2, T3, T4, VfxBase>)f)(arg1, arg2, arg3, arg4));
|
||||
}
|
||||
|
||||
private static VfxBase CallAllFunc(Delegate func, Func<Delegate, VfxBase> call)
|
||||
{
|
||||
if ((object)func == null)
|
||||
{
|
||||
return NullVfx.GetInstance();
|
||||
}
|
||||
ParallelVfxPlayer parallelVfxPlayer = ParallelVfxPlayer.Create();
|
||||
Delegate[] invocationList = func.GetInvocationList();
|
||||
foreach (Delegate arg in invocationList)
|
||||
{
|
||||
VfxBase vfx = call(arg);
|
||||
parallelVfxPlayer.Register(vfx);
|
||||
}
|
||||
return parallelVfxPlayer;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user