SpriteRenderer
Add this in your code:
#include <engine/graphics/2d_graphics/sprite_renderer.h>
Description
Component that renders a sprite with a texture and material.
Public Methods
GetColor
Get the color of the sprite.
const Color& GetColor() const
SetColor
Set the color of the sprite.
Parameters:
color
: New color
void SetColor(const Color& color)
GetMaterial
Get the material of the sprite.
const std::shared_ptr<Material>& GetMaterial() const
SetMaterial
Set the material of the sprite.
Parameters:
material
: New material
void SetMaterial(const std::shared_ptr<Material>& material)
GetTexture
Get the texture of the sprite.
const std::shared_ptr<Texture>& GetTexture() const
SetTexture
Set the texture of the sprite.
Parameters:
texture
: New texture
void SetTexture(const std::shared_ptr<Texture>& texture)