zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Server/Hotfix/Game/Helper/GlobalMethodHelper.cs

17 lines
458 B
C#

namespace ET
{
public static class GlobalMethodHelper
{
public static void Call(string methodName, string[] args)
{
var dic = Game.Scene.GetComponent<GlobalMethodComponent>().methodDic;
if (!dic.TryGetValue(methodName, out var action))
{
Log.Error($"don't has the mrthod : {methodName}");
return;
}
action?.Invoke(args);
}
}
}