Component that handles rendering a 2D sprite for an Actor. Manages the texture, draw order, flipping, culling, and size override for the sprite.
SpriteComponent(Actor* pOwner, Texture& pTexture, int pDrawOrder, Vector3D pSizeOverride);
Constructor of a sprite component. It needs a texture, a draw order (by defalut 100), and if you want to override the size of the texture you can set it (by default 0).
virtual void SetTexture(const Texture& pTexture);
Sets the texture of the sprite.
void SetFlipMethode(IRenderer::Flip pFlipMethode);
Sets the flip method (horizontal / vertical flip).
int GetDrawOrder() const;
Returns the draw order of the texture.
int GetTexWidth() const;
Returns the width of the texture.
int GetTexHeight() const;
Returns the height of the texture.
Texture& GetTexture();
Returns the texture of the sprite.