public TileDetail(Tile tile, TilePaint painter, int[,] biomeMap)
 {
     _tile     = tile;
     _biomeMap = biomeMap;
     _painter  = painter;
     _sampler  = new BiomeSampler(_painter.Biomes);
 }
Esempio n. 2
0
        public TilePaint(Tile tile)
        {
            _tile = tile;

            //Get biome combiner from terraconfig
            Biomes        = TerraConfig.Instance.Graph.GetEndNode().GetBiomes();
            _biomeSampler = new BiomeSampler(Biomes);
            _resolution   = TerraConfig.Instance.Generator.SplatmapResolution - 1;
            _gridPosition = _tile.GridPosition;
            _terrain      = _tile.GetComponent <UnityEngine.Terrain>();

            if (_terrain == null)
            {
                Debug.LogError("TilePaint's passed Tile must have an attached Terrain component");
            }
        }