예제 #1
0
    public void SetByte(int x, int y, byte value, ByteDataLyerID id)
    {
        PixelInformation info = GetPixelInformation(x, y);
        AreaIndex        area = _areas[info.areaX, info.areaY];

        switch (id)
        {
        case ByteDataLyerID.WaterLayerData:
            area.DataLayer.WaterLayerData.data[info.areaPixelX, info.areaPixelY] = value;
            break;
        }
    }
예제 #2
0
    public byte GetByte(int x, int y, ByteDataLyerID id)
    {
        if (AreCoordinatesInvalid(x, y))
        {
            return(1);
        }

        PixelInformation info = GetPixelInformation(x, y);

        if (IsPixelInformationInvalid(info))
        {
            Debug.LogWarning("THigns went BAD " + info);
        }

        AreaIndex area = _areas[info.areaX, info.areaY];

        switch (id)
        {
        case ByteDataLyerID.WaterLayerData:
            return(area.DataLayer.WaterLayerData.data[info.areaPixelX, info.areaPixelY]);
        }

        return(0);
    }