/// <summary> /// 初始化C# 向LUA发送事件 绑定LUA接受事件函数映射 /// </summary> public static bool Init() { LuaEnv env = LuaManager.Ins.GetLuaEnv(); if (env == null) { return(false); } InitToLuaEventMap(); FireEventToLua sendToLuaCall = env.Global.Get <FireEventToLua> ("CSharpCallLuaEvent"); if (sendToLuaCall == null) { return(false); } fireEvent = sendToLuaCall; return(true); }
public static void ReleaseLuaFunction() { fireEvent = null; }