/// <summary> /// 星域点击事件 /// </summary> /// <param name="cell"></param> private void StarPointOnClick(StarmapPointElementBase cell) { m_CurrentCell = cell as StarGalaxyElement; MsgStarmapPanelState msg = new MsgStarmapPanelState(); msg.Data = m_CurrentCell.GetData(); m_CurrentCell = null; UIManager.Instance.OpenPanel(UIPanel.StarPlantPanel, msg); }
private void CheckMissionTeamInStar(StarGalaxyElement cell) { EditorPlanet[] planetData = cell.GetData().planetList; List <EditorStarMapArea> data = new List <EditorStarMapArea>(); for (int i = 0; i < planetData?.Length; i++) { data.AddRange(planetData[i].arealist); } if (data.Count > 0 && (m_MissionTrackings?.Count > 0 || m_TeamMembers.Count > 0)) { bool hasMain = false; bool hasTeamMembers = false; List <uint> s = new List <uint>(); for (int i = 0; i < data.Count; i++) { for (int j = 0; !hasMain && j < m_MissionTrackings?.Count; j++) { if (m_MissionTrackings[j].EndingLeapPointID == data[i].areaId) { hasMain = m_MissionTrackings[j].MissionType == MissionType.Main; } } for (int k = 0; !hasTeamMembers && k < m_TeamMembers.Count; k++) { hasTeamMembers = (ulong)m_TeamMembers[k].AreaId == data[i].areaId; } if (hasMain && hasTeamMembers) //检查如果都有了 就不检查了 { break; } } if (hasMain) { s.Add(31311); } if (hasTeamMembers) { s.Add(31316); } if (s.Count > 0) { cell.SetBottomIcon(s.ToArray()); return; } } cell.SetBottomIcon(null); }