#ifndef SYSTEM_LIGHT_HPP_ #define SYSTEM_LIGHT_HPP_ #include #include #include #include #include struct Light { vec2 pos; float radius; Color color; Light(vec2 p = vec2(), float r = 0, Color c = Color()) : pos(p), radius(r), color(c) {} }; class LightSystem : public entityx::System { private: static std::vector lights; public: void update(entityx::EntityManager& en, entityx::EventManager& ev, entityx::TimeDelta dt) override; static void render(void); static int addLight(vec2 pos, float radius, Color color = Color(1, 1, 1)); static void updateLight(int index, vec2 pos, float radius = -1); static void removeLight(int index); }; #endif // SYSTEM_LIGHT_HPP_