private void InitializeTile(IMapTileInfo tileInfo) { IntVector2 position = new IntVector2(tileInfo.Index.x / MainEditorController.SCALE, tileInfo.Index.y / MainEditorController.SCALE); switch (tileInfo.Type) { case MapTileType.Cube: { _mapViewController.InitializeCube(position); break; } case MapTileType.Square: { _mapViewController.InitializeSquare(position); break; } case MapTileType.Empty: { _mapViewController.InitializeEmpty(position); break; } } }
private void InitializeTile(ITileView tileInfo) { if (_initializedIndexes.Contains(tileInfo.ViewPosition)) { return; } switch (tileInfo.Type) { case MapTileType.Cube: { _mapViewController.InitializeCube(tileInfo.ViewPosition); break; } case MapTileType.Plane: { _mapViewController.InitializePlane(tileInfo.ViewPosition); break; } case MapTileType.Square: { _mapViewController.InitializeSquare(tileInfo.ViewPosition); break; } case MapTileType.Empty: { _mapViewController.InitializeEmpty(tileInfo.ViewPosition); break; } } _initializedIndexes.Add(new IntVector2(tileInfo.ViewPosition.x, tileInfo.ViewPosition.y)); }