private void OnActionMenuItemSelected(int id) { MenuSelectedMsg msg = new MenuSelectedMsg(); msg.option = (EActionMenuOption)id; this.m_ActionMenu.Show(false); GameManager.Instance.UIMgr.SetActivate(this, false); MessageCenter.Instance.SendMessage(UIDefines.ID_MENU_SELECTED, msg); }
// 当取消操作选单 private void OnMenuSelected(IMessage imsg) { if (this.m_CurSelectedCh == null) { return; } MenuSelectedMsg msg = imsg as MenuSelectedMsg; switch (msg.option) { case UI.GameHud.EActionMenuOption.Cancel: { SLG.SLGGame.Instance.MAP_RemoveActorAtPoint(m_CurSelectedCh, m_CurSelectedCh.Point); m_CurSelectedCh.SetCellPos(m_ChLastPoint, false, true); m_CurSelectedCh.ShowRangeView(true); m_Agent.Arrow_ShowPath(m_CursorPath); } break; case UI.GameHud.EActionMenuOption.Attack: break; case UI.GameHud.EActionMenuOption.Skill: break; case UI.GameHud.EActionMenuOption.Standby: { m_CurSelectedCh.Done(); m_CurSelectedCh = null; m_CursorPath = null; m_ChLastPoint = IPoint.Unavailable; CheckCanActCount(); } break; } }