Example #1
0
        private TileConfigData <T> CreateTileConfigData <T>(Func <GameObject, T> creator) where T : TileConfig
        {
            var tileConfigData = new TileConfigData <T>();

            ExecuteForEachTile((tile, pos, rotation) =>
            {
                var tileConfig = tileConfigData.GetConfig(tile.name);
                if (tileConfig == null)
                {
                    tileConfigData.AddConfig(creator(GetPrefab(tile.name)));
                }
            });
            return(tileConfigData);
        }
        public InputOverlappingData(TileConfigData <TileConfig> tileConfigData, int width, int depth)
        {
            this.tileConfigData = tileConfigData;
            Width = width;
            Depth = depth;

            tiles = new OverlappingModelTile[width, depth];

            for (int x = 0; x < width; x++)
            {
                for (int z = 0; z < depth; z++)
                {
                    tiles[x, z] = OverlappingModelTile.Empty;
                }
            }
        }
 public InputSimpleTiledModelData(TileConfigData <SimpleTiledModelTileConfig> tileConfigData)
 {
     TileConfigData = tileConfigData;
 }