| | |
| | | public delegate void CSharpNetPackage(ushort cmd); |
| | | static CSharpNetPackage onCSharpNetPackage; |
| | | |
| | | [CSharpCallLua] |
| | | public delegate void GeneralDelegate(); |
| | | static GeneralDelegate configInit; |
| | | |
| | | public static void Init() |
| | | { |
| | | LuaUtility.DoString("protocol.LuaProtocalRegister"); |
| | |
| | | |
| | | LuaUtility.DoString("protocol.CSharpProtocalEvent"); |
| | | onCSharpNetPackage = LuaUtility.Global.Get<CSharpNetPackage>("OnCSharpNetEvent"); |
| | | |
| | | LuaUtility.DoString("config.ConfigInit"); |
| | | configInit = LuaUtility.Global.Get<GeneralDelegate>("ConfigInit"); |
| | | |
| | | if (configInit != null) |
| | | { |
| | | configInit(); |
| | | } |
| | | } |
| | | |
| | | public static void OnRecieveLuaNetPackage(ushort cmd, byte[] bytes) |