日期:2014-05-18 浏览次数:21048 次
// Sort by distance in descending order private void SortTargetsByDistance () { targets.Sort(delegate(Transform t1, Transform t2) { return Vector3.Distance(t1.position, myTransform.position).CompareTo(Vector3.Distance(t2.position, myTransform.position)); }); }