/// <summary> /// 将指定的<see cref="UILayer"/>移动到分组最高显示优先级。 /// </summary> /// <param name="layer">图层</param> internal void BringToFront(UILayer layer) { if (layer.Group != this) { throw new ArgumentException("layer"); } if (mLayers.Count <= 1) { return; } mLayers.Remove(layer); layer.Order = mLayers.Last().Order + 1; mLayers.Add(layer); }
/// <summary> /// 当<see cref="UILayer"/>创建完毕后调用此方法。 /// </summary> /// <param name="layer"></param> protected override void OnAddUILayer(UILayer layer) { var canvasLayer = (RectTransformLayer)layer; canvasLayer.SetParent(GroupTransform); }
/// <summary> /// 当<see cref="UILayer"/>创建完毕后调用此方法。 /// </summary> /// <param name="layer"></param> protected virtual void OnAddUILayer(UILayer layer) { }
/// <summary> /// 移除分组中指定的<see cref="UILayer"/>。 /// </summary> /// <param name="layer"></param> internal void Remove(UILayer layer) { mLayers.Remove(layer); }