Exemple #1
0
 public override void Init(long _id)
 {
     base.Init(_id);
     uiLayer = new UGUILayerSolution();
     uiLayer.Start();
     MessageModule.instance.AddListener(MessageType.UILayersAddObject, AddObjectToLayer);
     MessageModule.instance.AddListener(MessageType.UILayersRemoveObject, RemoveObjectFromLayer);
     MessageModule.instance.AddListener(MessageType.UILayersRefresh, Refresh);
 }
Exemple #2
0
        public bool CanClose(IUILayer layer)
        {
            if (layer == null)
            {
                return(false);
            }
            UILayerType layerType = layer.LayerType;
            int         maxDepth  = GetCurrentLayerMaxDepth(layerType);

            return(layer.Depth >= maxDepth);
        }
Exemple #3
0
        // 设置层级
        public void ShowLayer(IUILayer layer)
        {
            if (layer == null)
            {
                return;
            }
            UILayerType layerType = layer.LayerType;
            int         maxDepth  = GetCurrentLayerMaxDepth(layerType) + 1;

            layer.Depth = maxDepth;
            ChangeCurrentLayerMaxDepth(layerType, maxDepth);
        }