示例#1
0
        private void SetupInternal()
        {
            if (_layers == null)
            {
                _layers = new Dictionary <UISortingLayer.Layers, UILayerManager>(UISortingLayer.count, UISortingLayer.LayerComparer.Get());
                IEnumerator <UISortingLayer.Layers> layerIter = UISortingLayer.GetEnumerator();
                while (layerIter.MoveNext())
                {
                    _layers.Add(layerIter.Current, GenerateLayer(layerIter.Current));
                }
            }
            else
            {
                throw new UIManagerSetupException();
            }

            if (_uiToLayerMap == null)
            {
                _uiToLayerMap = new Dictionary <UIID, UISortingLayer.Layers>(UIID.UIIDComparer.Get());
            }
            else
            {
                throw new UIManagerSetupException();
            }

            if (_layerCullRefCount == null)
            {
                _layerCullRefCount = new Dictionary <UISortingLayer.Layers, int>(UISortingLayer.count, UISortingLayer.LayerComparer.Get());
                IEnumerator <UISortingLayer.Layers> layerIter = UISortingLayer.GetEnumerator();
                while (layerIter.MoveNext())
                {
                    _layerCullRefCount.Add(layerIter.Current, 0);
                }
            }
        }
示例#2
0
        public bool Remove(UIID ui)
        {
            IEnumerator <UISortingLayer.Layers> layerIter = UISortingLayer.GetEnumerator();

            do
            {
                Remove(layerIter.Current, ui);
            }while(layerIter.MoveNext());

            return(false);
        }