Exemplo n.º 1
0
        public static Layer CreateMapLayer(string layerName, bool clearLayers = false, bool setToMain = false)
        {
            if (clearLayers)
            {
                XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers = null;
            }

            Layer curNewLayer = new Layer();

            curNewLayer.layerName = layerName;
            curNewLayer.mainLayer = setToMain;
            curNewLayer.bgColor   = MapDataConverter.Color32ToCol(new Color(0, 0.023f, 0.05f, 1));
            curNewLayer.forColor  = MapDataConverter.Color32ToCol(new Color32(255, 255, 255, 255));

            if (XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers == null)
            {
                XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers = new Layer[1];
                curLayerIndex = 0;
                return(XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers[0] = curNewLayer);
            }

            Array.Resize(ref XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers, XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers.Length + 1);
            return(XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers[XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers.Length - 1] = curNewLayer);
        }
Exemplo n.º 2
0
 public override void PassColor(Color32 passColor)
 {
     XCPManager.currentXCP.xpcMaps[MapDataManager.mapDataXCPIndex].mapLayers[MapDataManager.mapDataCurrentLayer].forColor = MapDataConverter.Color32ToCol(passColor);
     CameraManager.UpdateCurrentCamera();
 }