Пример #1
0
    /// <summary>
    /// 添加决赛区域竞猜点-用于竞猜定位
    /// <param name="vector3">位置</param>
    /// <param name="groupIndex">组下标-排序用</param>
    /// <param name="index">组里面的下标-排序用</param>
    /// <param name="isGuess">是否可竞猜</param>
    /// <param name="tapIndex">tap下标</param>
    /// <param name="pointName">区域点名</param>
    /// </summary>
    public void AddFocusCuessPoint(Vector3 vector3, int groupIndex, int index, bool isGuess, int tapIndex, string pointName)
    {
        FocusPointInfo focusPointInfo = new FocusPointInfo(vector3, groupIndex, index, isGuess, tapIndex, pointName);

        if (focusCuessList.Contains(focusPointInfo))
        {
            return;
        }
        focusCuessList.Add(focusPointInfo);
    }
Пример #2
0
    /// <summary>
    /// 聚焦竞猜点
    /// </summary>
    public FocusPointInfo focusCuessPoint()
    {
        if (focusCuessList.Count == 0)
        {
            return(null);
        }
        FocusPointInfo focusPointInfo = getActiveCuessPoint();

        if (focusPointInfo == null)
        {
            focusPointInfo = getPassiveCuessPoint();
            if (focusPointInfo != null)
            {
                AddCurrentFocusIndex();
            }
        }
        return(focusPointInfo);
    }
Пример #3
0
        public int compare(object o1, object o2)
        {
            if (o1 == null)
            {
                return(1);
            }
            if (o2 == null)
            {
                return(-1);
            }
            if (!(o1 is FocusPointInfo) || !(o2 is FocusPointInfo))
            {
                return(-1);
            }
            FocusPointInfo info1 = (FocusPointInfo)o1;
            FocusPointInfo info2 = (FocusPointInfo)o2;

            if (info1.isGuessd() && !info2.isGuessd())
            {
                return(-1);
            }
            if (!info1.isGuessd() && info2.isGuessd())
            {
                return(1);
            }
            if (info1.isGuessd() && info2.isGuessd())
            {
                if (info1.getIndexWeight() > info2.getIndexWeight())
                {
                    return(1);
                }
                if (info1.getIndexWeight() < info2.getIndexWeight())
                {
                    return(-1);
                }
                return(0);
            }
            return(0);
        }