public override void Execute() { MessageBoxPanelView messagePanel = MYXZUIManager.Instance.GetPanel(UIPanelType.MessageBoxPanel) as MessageBoxPanelView; messagePanel.MessageText.text = "是否退出游戏?"; messagePanel.ConfirmEvent = Application.Quit; messagePanel.CancelEvent = delegate { MYXZUIManager.Instance.PopPanel(); }; MYXZUIManager.Instance.PushPanel(UIPanelType.MessageBoxPanel); //弹出消息框 }
// private static Dictionary<string, string> mSceneId = new Dictionary<string, string>() // { // {"Scene01", "060001"}, // {"Scene02", "060002"} // }; public override void Execute() { Debug.Log("Change Scene"); MessageBoxPanelView MessageBoxView = MYXZUIManager.Instance.GetPanel(UIPanelType.MessageBoxPanel) as MessageBoxPanelView; MessageBoxView.MessageText.text = mMessage[TargetScene]; MessageBoxView.ConfirmEvent = ChangeScene; MessageBoxView.CancelEvent = MYXZUIManager.Instance.PopPanel; MYXZUIManager.Instance.PushPanel(UIPanelType.MessageBoxPanel); }
public override void Execute() { mMessage.Add("Scene01", "确定前往雾隐山 天青观?"); mMessage.Add("StartScene", "返回开始界面?"); mMessage.Add("Scene02", "确定前往苗疆 凤鸣镇?"); MessageBoxPanelView MessageBoxView = MYXZUIManager.Instance.GetPanel(UIPanelType.MessageBoxPanel) as MessageBoxPanelView; MessageBoxView.MessageText.text = mMessage[TargetScene]; MessageBoxView.ConfirmEvent = ChangeScene; MessageBoxView.CancelEvent = MYXZUIManager.Instance.PopPanel; MYXZUIManager.Instance.PushPanel(UIPanelType.MessageBoxPanel); }
public override void Execute() { if (IsTask) //如果刚才的交谈是接取任务的交谈,弹出一个MessageBox来确定是否接受此任务 { MessageBoxPanelView messageBox = MYXZUIManager.Instance.GetPanel(UIPanelType.MessageBoxPanel) as MessageBoxPanelView; messageBox.CancelEvent = RefuseTask; //按下取消键 messageBox.ConfirmEvent = GetTask; //按下确定键 messageBox.MessageText.text = "是否接取任务" + MYXZGameDataManager.Instance.GetTaskById(CurrentTaskId).Name; //显示的消息 PushPanelSignal.Dispatch(UIPanelType.MessageBoxPanel); //弹出 } else //如果只是平常的对话 { MYXZUIManager.Instance.PopPanel(); //关闭对话框 FinishTalkSignal.Dispatch(); //通知玩家对话已经结束 } }