17 lines
458 B
C#
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|