예제 #1
0
        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);
                }
            }
        }
예제 #2
0
        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();
            }
        }