public void Flash(float3 tint) { flashTicks = 5; flashModifiers = TintModifiers.None; flashTint = tint; flashAlpha = null; }
public void Flash(Color color, float alpha) { flashTicks = 5; flashModifiers = TintModifiers.ReplaceColor; flashTint = new float3(color.R, color.G, color.B) / 255f; flashAlpha = alpha; }
public FlashTarget(Actor target, Color color, float alpha = 0.5f, int count = 2, int interval = 2, int delay = 0) : this(target, count, interval, delay) { modifiers = TintModifiers.ReplaceColor; tint = new float3(color.R, color.G, color.B) / 255f; this.alpha = alpha; }
public SpriteRenderable(Sprite sprite, WPos pos, WVec offset, int zOffset, PaletteReference palette, float scale, float alpha, float3 tint, TintModifiers tintModifiers, bool isDecoration) { this.sprite = sprite; this.pos = pos; this.offset = offset; this.zOffset = zOffset; this.palette = palette; this.scale = scale; this.tint = tint; this.isDecoration = isDecoration; this.tintModifiers = tintModifiers; this.alpha = alpha; }
public SpriteRenderable(Sprite sprite, WPos pos, WVec offset, int zOffset, PaletteReference palette, float scale, float alpha, float3 tint, TintModifiers tintModifiers, bool isDecoration) { this.sprite = sprite; this.pos = pos; this.offset = offset; this.zOffset = zOffset; this.palette = palette; this.scale = scale; this.tint = tint; this.isDecoration = isDecoration; this.tintModifiers = tintModifiers; this.alpha = alpha; // PERF: Remove useless palette assignments for RGBA sprites // HACK: This is working around the fact that palettes are defined on traits rather than sequences // and can be removed once this has been fixed if (sprite.Channel == TextureChannel.RGBA && !(palette?.HasColorShift ?? false)) { this.palette = null; } }
public SpriteRenderable(Sprite sprite, WPos pos, WVec offset, int zOffset, PaletteReference palette, float scale, bool isDecoration, TintModifiers tintModifiers) : this(sprite, pos, offset, zOffset, palette, scale, 1f, float3.Ones, tintModifiers, isDecoration) { }