private void PlaceMetaTile(MetaTileMap metaTileMap, Vector3Int position, MetaTile metaTile) { foreach (LayerTile tile in metaTile.GetTiles()) { metaTileMap.RemoveTile(position, tile.LayerType); metaTileMap.SetTile(position, tile, cells[0].matrix); } }
private void PlaceLayerTile(Vector3Int position, LayerTile tile, Matrix4x4 matrixTransform) { if (!_importMode) { _metaTileMap.RemoveTile(position, tile.LayerType); } SetTile(position, tile, matrixTransform); }
private void RpcRemoveTile(Vector3 position, LayerType layerType, bool onlyRemoveEffect) { if (onlyRemoveEffect) { position.z = -1; } metaTileMap.RemoveTile(position.RoundToInt(), layerType, !onlyRemoveEffect); }
private void InternalRemoveTile(Vector3 position, LayerType layerType, bool onlyRemoveEffect) { if (onlyRemoveEffect) { position.z = -1; } Vector3Int p = position.RoundToInt(); metaTileMap.RemoveTile(p, layerType, !onlyRemoveEffect); }
public override void BoxErase(GridLayout grid, GameObject layer, BoundsInt area) { MetaTileMap metaTileMap = grid.GetComponent <MetaTileMap>(); foreach (Vector3Int position in area.allPositionsWithin) { if (metaTileMap) { metaTileMap.RemoveTile(position, false); } else { layer.GetComponent <Layer>().SetTile(position, null, Matrix4x4.identity, Color.white); } } }
public override void BoxErase(GridLayout grid, GameObject layer, BoundsInt area) { MetaTileMap metaTileMap = grid.GetComponent <MetaTileMap>(); foreach (Vector3Int position in area.allPositionsWithin) { if (metaTileMap) { metaTileMap.RemoveTile(position, LayerType.None); } else { layer.GetComponent <Tilemap>().SetTile(position, null); } } }
private void InternalUpdateTile(Vector3Int position, TileType tileType, string tileName, Matrix4x4?transformMatrix = null, Color?color = null) { LayerTile layerTile = TileManager.GetTile(tileType, tileName); metaTileMap.SetTile(position, layerTile, transformMatrix, color); //if we are changing a tile at z=0, make sure to remove any overlays it has as well //TODO: OVERLAYS - right now it only removes at z = -1, but we will eventually need //to allow multiple overlays on a given location which would require multiple z levels. if (layerTile.TileType != TileType.UnderFloor) { if (position.z == 0) { position.z = -1; if (metaTileMap.HasTile(position, layerTile.LayerType, true)) { metaTileMap.RemoveTile(position, layerTile.LayerType); } } } }
private void PlaceLayerTile(MetaTileMap metaTileMap, Vector3Int position, LayerTile tile) { metaTileMap.RemoveTile(position, tile.LayerType); SetTile(metaTileMap, position, tile); }
private void InternalRemoveTile(Vector3 position, LayerType layerType, bool removeAll) { Vector3Int p = position.RoundToInt(); metaTileMap.RemoveTile(p, layerType, removeAll); }