| | |
| | | |
| | | [CSharpCallLua] |
| | | public delegate void GeneralDelegate(); |
| | | static GeneralDelegate configInit; |
| | | static GeneralDelegate modelInit; |
| | | |
| | | static GeneralDelegate beforePlayerDataInitialize; |
| | | static GeneralDelegate afterPlayerDataInitialize; |
| | |
| | | static boolReturnedValueDelegate isLuaDailyQuest; |
| | | static boolReturnedValueDelegate gotoLuaDailyQuest; |
| | | |
| | | public static void Init() |
| | | public static void RegisterLuaEvent() |
| | | { |
| | | LuaUtility.DoString("protocol.manager.LuaProtocalRegister"); |
| | | onRecieveLuaNetPackage = LuaUtility.Global.Get<LuaNetPackage>("OnRecieveNetPackage"); |
| | |
| | | LuaUtility.DoString("interface.DailyQuestInterface"); |
| | | isLuaDailyQuest = LuaUtility.Global.Get<boolReturnedValueDelegate>("IsLuaDailyQuest"); |
| | | gotoLuaDailyQuest = LuaUtility.Global.Get<boolReturnedValueDelegate>("GotoDailyQuest"); |
| | | |
| | | LuaUtility.DoString("config.ConfigInit"); |
| | | configInit = LuaUtility.Global.Get<GeneralDelegate>("ConfigInit"); |
| | | if (configInit != null) |
| | | { |
| | | configInit(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public static void ModelInit() |
| | | public static void LaunchStart() |
| | | { |
| | | LuaUtility.DoString("manager.ModelCenter"); |
| | | modelInit = LuaUtility.Global.Get<GeneralDelegate>("ModelInit"); |
| | | if (modelInit != null) |
| | | LuaUtility.DoString("manager.Launch"); |
| | | var launchAction = LuaUtility.Global.Get<GeneralDelegate>("LaunchStart"); |
| | | if (launchAction != null) |
| | | { |
| | | modelInit(); |
| | | launchAction(); |
| | | } |
| | | |
| | | #if !UNITY_EDITOR |
| | | Do("hotfix.hotfix"); |
| | | #endif |
| | | } |
| | | |
| | | public static void LaunchPostProcess() |
| | | { |
| | | LuaUtility.DoString("manager.Launch"); |
| | | var action = LuaUtility.Global.Get<GeneralDelegate>("LaunchPostProcess"); |
| | | if (action != null) |
| | | { |
| | | action(); |
| | | } |
| | | } |
| | | |
| | | public static void ConfigInit() |
| | | { |
| | | LuaUtility.DoString("config.ConfigInit"); |
| | | var configInit = LuaUtility.Global.Get<GeneralDelegate>("ConfigInit"); |
| | | if (configInit != null) |
| | | { |
| | | configInit(); |
| | | } |
| | | } |
| | | |