public YuLegoUILayer(RectTransform uiRoot, int everyZ, YuLegoUILayer nextLayer, float layerSpacing) { _uiRoot = uiRoot; _everyZ = everyZ; _layerSpacing = layerSpacing; NextLayer = nextLayer; }
private YuLegoUILayer CreateMountLayers(int currentLayer, int topLayer) { var uiRoot = GameObject.Find(CANVAS_ROOT_PATH).transform; YuLegoUILayer layer; if (currentLayer != topLayer) { layer = new YuLegoUILayer(mountPointDict[(LegoViewType)currentLayer], 100, CreateMountLayers(currentLayer + 1, topLayer), 500); } else { layer = new YuLegoUILayer(mountPointDict[(LegoViewType)topLayer], -100, null, 500); } LegoUIMounter.uiLayers.Add((LegoViewType)currentLayer, layer); return(layer); }