コード例 #1
0
    /// <summary>
    /// 行星点击事件
    /// </summary>
    /// <param name="cell"></param>
    private void StarPointOnClick(StarmapPointElementBase cell)
    {
        if (m_Tweener != null)
        {
            return;
        }

        cell.SetToggleIsOn(false);

        m_CurrentPoint = cell as StarPlantElement;
        MsgStarmapPanelState msg = new MsgStarmapPanelState();

        msg.Data       = m_CurrentPoint.GetData();
        m_CurrentPoint = null;

        m_Tweener = cell.transform.DOMove(CameraManager.GetInstance().GetUICameraComponent().transform.position, 1f).SetEase(Ease.OutCirc)
                    .OnComplete(
            () =>
        {
            m_Tweener = null;
            UIManager.Instance.OpenPanel(UIPanel.StarAreaPanel, msg);
        });
    }
コード例 #2
0
    private void CheckMissionTeamInPlant(StarPlantElement cell)
    {
        EditorStarMapArea[] data = cell.GetData().arealist;

        if (data?.Length > 0 && (m_MissionTrackings?.Count > 0 || m_TeamMembers.Count > 0))
        {
            bool        hasMain        = false;
            bool        hasBranch      = false;
            bool        hasTeamMembers = false;
            List <uint> s = new List <uint>();

            for (int i = 0; i < data.Length; i++)
            {
                if (!hasMain || !hasBranch)                //检查如果主线支线都有了 就不检查任务相关的了
                {
                    for (int j = 0; j < m_MissionTrackings?.Count; j++)
                    {
                        if (m_MissionTrackings[j].EndingLeapPointID == data[i].areaId)
                        {
                            if (m_MissionTrackings[j].MissionType == MissionType.Main)
                            {
                                hasMain = true;
                            }
                            else if (m_MissionTrackings[j].MissionType == MissionType.Branch)
                            {
                                hasBranch = true;
                            }
                        }
                    }
                }

                for (int k = 0; !hasTeamMembers && k < m_TeamMembers.Count; k++)
                {
                    hasTeamMembers = (ulong)m_TeamMembers[k].AreaId == data[i].areaId;
                }

                if (hasMain && hasBranch && hasTeamMembers)                //检查如果都有了 就不检查了
                {
                    break;
                }
            }

            if (hasMain)
            {
                s.Add(31311);
            }
            if (hasBranch)
            {
                s.Add(31312);
            }
            if (hasTeamMembers)
            {
                s.Add(31316);
            }
            if (s.Count > 0)
            {
                cell.SetBottomIcon(s.ToArray());
                return;
            }
        }
        cell.SetBottomIcon(null);
    }