示例#1
0
    int IComparer.Compare(object x, object y)
    {
        ProgressRateZone obX = (ProgressRateZone)x;
        ProgressRateZone obY = (ProgressRateZone)y;

        return(obX.GetProgressRateZoneIndex().CompareTo(obY.GetProgressRateZoneIndex()));
    }
示例#2
0
    public void UpdateCurProgressRateZoneNum(GameObject _objCollided)
    {
        if (curLapNum == MapInfoMgr.getInstance.totalLap)
        {
            return;
        }


        int iTotalProgressZoneNum = progressRateZoneList.Count;

        ProgressRateZone zoneCollided
            = _objCollided.GetComponent <ProgressRateZone>();

        if (zoneCollided == null)
        {
            return;
        }

        if (zoneCollided.GetProgressRateZoneIndex() + (curLapNum * iTotalProgressZoneNum)
            == curProgressRateZoneNum + 1)
        {
            ++curProgressRateZoneNum;
        }
        else
        {
            --curProgressRateZoneNum;
        }

        //Debug.Log("curProgressRateZoneNum : " + curProgressRateZoneNum);
    }