SpriteComponent Class
Definition
Namespace: Brine2D.Systems.Rendering
Component for sprite rendering data. Contains all information needed to render a sprite. Rendering logic is handled by SpriteRenderingSystem with batching.
Inheritance System.Object → Component → SpriteComponent
| Properties | |
|---|---|
| CrossFadeGhosts | Outgoing cross-fade ghosts, one per concurrent fade \(base animator \+ each layer\). Rendered by SpriteRenderingSystem as additional draw calls at fading-out opacity, producing true multi-source cross-fade blends. Set and cleared automatically by AnimationSystem. |
| FlipX | Whether to flip the sprite horizontally. |
| FlipY | Whether to flip the sprite vertically. |
| Layer | Rendering layer/order \(higher = drawn on top\). Used by the batching system to sort sprites. |
| Offset | Draw offset from transform position \(in pixels\). |
| Origin | Origin/pivot point \(0–1 range\). Defaults to center. Overridden each frame by AnimationSystem when an AnimatorComponent is present. |
| Scale | Scale multiplier \(applied to transform scale\). |
| SourceRect | Source rectangle in the texture \(null = entire texture\). Use this for sprite sheets and texture atlases. |
| Texture | Loaded texture reference \(set by SpriteRenderingSystem\). |
| TexturePath | Path to the texture \(for loading\). |
| Tint | Tint color applied to the sprite. |