3#include "scene/Component.h"
18 void Update(
float deltaTime)
override;
20 void SetTexture(
const std::shared_ptr<Texture>& texture);
21 const std::shared_ptr<Texture>&
GetTexture()
const;
22 void SetColor(
const glm::vec4& color);
24 void SetSize(
const glm::vec2& size);
25 const glm::vec2&
GetSize()
const;
30 void SetUV(
const glm::vec2& lowerLeftUV,
const glm::vec2& upperRightUV);
31 void SetPivot(
const glm::vec2& pivot);
37 std::shared_ptr<Texture> m_texture;
38 glm::vec4 m_color = glm::vec4(1.0f);
39 glm::vec2 m_size = glm::vec2(100.0f);
40 glm::vec2 m_lowerLeftUV = glm::vec2(0.0f);
41 glm::vec2 m_upperRightUV = glm::vec2(1.0f);
42 glm::vec2 m_pivot = glm::vec2(0.5f);
43 bool m_visible =
true;
void SetPivot(const glm::vec2 &pivot)
const std::shared_ptr< Texture > & GetTexture() const
void SetLowerLeftUV(const glm::vec2 &uv)
void SetUV(const glm::vec2 &lowerLeftUV, const glm::vec2 &upperRightUV)
void SetTexture(const std::shared_ptr< Texture > &texture)
void Update(float deltaTime) override
void LoadProperties(const nlohmann::json &json) override
const glm::vec2 & GetPivot() const
void SetUpperRightUV(const glm::vec2 &uv)
const glm::vec4 & GetColor() const
const glm::vec2 & GetLowerLeftUV() const
const glm::vec2 & GetSize() const
void SetVisibile(bool visible)
void SetColor(const glm::vec4 &color)
const glm::vec2 & GetUpperRightUV() const
void SetSize(const glm::vec2 &size)
#define COMPONENT(ComponentClass)