public ProtoTileDecal( string localTextureFilePath, Vector2Ushort size, INoiseSelector noiseSelector, Vector2Ushort?interval = null, DecalHidingSetting hidingSetting = DecalHidingSetting.StructureOrFloorObject, DrawOrder drawOrder = DrawOrder.GroundDecals, Vector2Ushort offset = default, bool requiresCompleteNoiseSelectorCoverage = false, bool canFlipHorizontally = true, bool requiresCompleteProtoTileCoverage = false, IReadOnlyList <ProtoTileGroundTexture> requiredGroundTextures = null) : this(CollectTextures(localTextureFilePath), size, noiseSelector, interval, hidingSetting, drawOrder, offset, requiresCompleteNoiseSelectorCoverage, canFlipHorizontally, requiresCompleteProtoTileCoverage, requiredGroundTextures) { }
private static void AddDecalDoubleWithOffset( Settings settings, List <ITextureResource> textures, Vector2Ushort size, INoiseSelector noiseSelector, DrawOrder drawOrder = DrawOrder.GroundDecals, bool requiresFullSizeNoiseCoverage = false, bool canFlipHorizontally = true) { settings.AddDecal( new ProtoTileDecal(textures, size: size, drawOrder: drawOrder, requiresCompleteNoiseSelectorCoverage: requiresFullSizeNoiseCoverage, noiseSelector: noiseSelector, canFlipHorizontally: canFlipHorizontally)); // add the same decal but with a little offset (to make a more dense diagonal placement) settings.AddDecal( new ProtoTileDecal(textures, size: size, drawOrder: drawOrder, offset: Vector2Ushort.One, requiresCompleteNoiseSelectorCoverage: requiresFullSizeNoiseCoverage, noiseSelector: noiseSelector, canFlipHorizontally: canFlipHorizontally)); }
public ProtoTileDecal( IReadOnlyList <ITextureResource> textureResources, Vector2Ushort size, INoiseSelector noiseSelector, Vector2Ushort?interval = null, DecalHidingSetting hidingSetting = DecalHidingSetting.StructureOrFloorObject, DrawOrder drawOrder = DrawOrder.GroundDecals, Vector2Ushort offset = default, bool requiresCompleteNoiseSelectorCoverage = false, bool canFlipHorizontally = true, bool requiresCompleteProtoTileCoverage = false, IReadOnlyList <ProtoTileGroundTexture> requiredGroundTextures = null) { this.Size = size; this.Offset = offset; this.RequiresCompleteNoiseSelectorCoverage = requiresCompleteNoiseSelectorCoverage; this.NoiseSelector = noiseSelector; this.TextureResources = textureResources; this.DrawOrder = drawOrder; this.HidingSetting = hidingSetting; this.RequiredGroundTextures = requiredGroundTextures?.Count > 0 ? requiredGroundTextures : null; this.Interval = new Vector2Ushort((ushort)(this.Size.X + (interval?.X ?? 0)), (ushort)(this.Size.Y + (interval?.Y ?? 0))); this.CanFlipHorizontally = canFlipHorizontally; this.RequiresCompleteProtoTileCoverage = requiresCompleteProtoTileCoverage; }
public ProtoTileGroundTexture( TextureResource texture, ITextureResource blendMaskTexture, INoiseSelector noiseSelector) { this.Texture = texture; this.BlendMaskTexture = new TextureAtlasResource( blendMaskTexture, columns: 4, rows: 1); this.NoiseSelector = noiseSelector; }