internal void execute(int messageId, object[] args, Action <int> action) { ConfigSet <int, MsgData> configSet = Coo.configManager.GetConfig <int, MsgData>(); MsgData config = configSet[messageId]; if (config == null) { Debug.LogError("[SysmsgManager] 系统消息没有找到对应ID配置 messageId=" + messageId); } /** 滚屏 */ if (config.Type == 0) { Coo.menuManager.OpenMenu(MenuType.MsgScroll, new MsgMenuData(config.Format(args))); } else if (config.Type == 1) { Coo.menuManager.OpenMenu(MenuType.MsgAlert, new MsgMenuData(config, config.Format(args), action)); } else if (config.Type == 2) { Coo.menuManager.OpenMenu(MenuType.MsgAlert, new MsgMenuData(config, config.Format(args), action)); } else if (config.Type == 3) { Coo.menuManager.OpenMenu(MenuType.MsgAlert, new MsgMenuData(config, config.Format(args), action)); } }
internal void executeLua(int type, object[] args, Action <int> action) { string content = (string)args[0]; if (type == 0) { Coo.menuManager.OpenMenu(MenuType.MsgScroll, new MsgMenuData(content)); } else { MsgData data = new MsgData(); if (args.Length > 1) { data.Type = Convert.ToInt32(args[1]); } else { data.Type = 2; } Coo.menuManager.OpenMenu(MenuType.MsgAlert, new MsgMenuData(data, content, action)); } }
public MsgMenuData(MsgData config, string content, Action <int> handle) { this.config = config; this.content = content; this.handle = handle; }
public MsgMenuData(MsgData config, string content) { this.config = config; this.content = content; }