diff options
Diffstat (limited to 'src/components/Render.hpp')
-rw-r--r-- | src/components/Render.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/Render.hpp b/src/components/Render.hpp index 451f2d1..6cc26db 100644 --- a/src/components/Render.hpp +++ b/src/components/Render.hpp @@ -19,11 +19,12 @@ #define COMPONENT_RENDER_HPP_ #include "Component.hpp" +#include "texture.hpp" struct Render : Component<Render>, entityx::Component<Render> { public: - std::string texture; + Texture texture; bool visible; Render(std::string _file) : @@ -38,7 +39,7 @@ public: if (tab["visible"].get_type() == sol::type::boolean) this->visible = tab["visible"]; if (tab["texture"].get_type() == sol::type::string) - this->texture = tab["texture"]; + this->texture = Texture(static_cast<std::string>(tab["texture"])); } else { throw std::string( "Render component table formatted incorrectly" |