private void SortTabs() { _tabs.Sort((t1, t2) => t1.SortIndex.CompareTo(t2.SortIndex)); for (var i = 0; i < _tabs.Count; i++) { if (_tabs[i].TabButton != null) { _tabs[i].TabButton.CachedTransform.SetSiblingIndex(i); } } }
private void InternalPerformScan() { while (_nearUnits.Count > 0) { RecycleBandit((Bandit)_nearUnits.PopLast()); } PerformScan(); _nearUnits.Sort((p, q) => p.Distance.CompareTo(q.Distance)); if (Time.realtimeSinceStartup > NextCacheCheck) { CleanCache(); } }