Exemple #1
0
        public void convertBlock(GeoBlock block, byte type)
        {
            int      blockX = block.getBlockX();
            int      blockY = block.getBlockY();
            GeoBlock convertedBlock;

            //
            switch (type)
            {
            case GeoEngine.GEO_BLOCK_TYPE_FLAT:
                convertedBlock = GeoBlockFlat.convertFrom(block).setRegion(this);
                break;

            case GeoEngine.GEO_BLOCK_TYPE_COMPLEX:
                convertedBlock = GeoBlockComplex.convertFrom(block).setRegion(this);
                break;

            case GeoEngine.GEO_BLOCK_TYPE_MULTILAYER:
                convertedBlock = GeoBlockMultiLayer.convertFrom(block).setRegion(this);
                break;

            default:
                throw new ArgumentException("Unkown type: " + type, "type");
            }
            //
            block.unload();
            _geoBlocks[blockX, blockY] = convertedBlock;
        }
Exemple #2
0
 public GeoCellFlat(GeoBlockFlat block, short height) : base(block)
 {
     _height = GeoEngine.getGeoHeightOfHeight(height);
 }