int IComparer.Compare(object x, object y) { ProgressRateZone obX = (ProgressRateZone)x; ProgressRateZone obY = (ProgressRateZone)y; return(obX.GetProgressRateZoneIndex().CompareTo(obY.GetProgressRateZoneIndex())); }
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); }