/// <summary> /// 打开mod List /// </summary> private void OpenModList() { if (m_CurrentSelectedCell == null) { return; } MsgWarshipPanelState msg = MessageSingleton.Get <MsgWarshipPanelState>(); msg.BeforeState = m_CurrentState; msg.State = WarshipPanelState.ListMod; msg.CurrentWeaponData = new MsgWarshipPanelState.DataBase <IWeapon>( m_CurrentWeapon, m_WeaponContainerUID, m_WeaponContainerPOS); msg.CurrentModData = new MsgWarshipPanelState.ModData( m_CurrentSelectedCell.GetData(), m_CurrentSelectedCell.GetContainerUID(), m_CurrentSelectedCell.GetContainerPOS()); msg.CurrentModData.ModType1 = m_CurrentSelectedCell.GetEquipmentModL1(); msg.CurrentModData.ModType2 = m_CurrentSelectedCell.GetEquipmentModL2(); UIManager.Instance.ClosePanel(OwnerView); // GameFacade.Instance.SendNotification(NotificationName.MSG_3DVIEWER_CHANGE); GameFacade.Instance.SendNotification(NotificationName.MSG_WARSHIP_PANEL_CHANGE, msg); UIManager.Instance.OpenPanel(UIPanel.WarshipChipPanel, msg); }
/// <summary> /// mod选中 /// </summary> /// <param name="cell"></param> private void ModCellOnSelected(WarshipModPanelElement cell) { if (cell == m_CurrentSelectedCell) { return; } if (!EventSystem.current.alreadySelecting) { //FocusTo(cell.gameObject); EventSystem.current.SetSelectedGameObject(cell.gameObject); } m_CurrentSelectedCell = cell; State.GetAction(UIAction.Common_Select).Enabled = true; ShowModMessageTips(cell); State.SetTipData(m_CurrentSelectedCell.GetData()); }