From eb028c960be2eeaee6e5177bc9c83a489e9209f2 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Sun, 1 Sep 2019 19:02:49 -0400 Subject: THE CAT IS BACK --- src/components/Render.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/components') 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, entityx::Component { 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(tab["texture"])); } else { throw std::string( "Render component table formatted incorrectly" -- cgit v1.2.3