34 const float x = (transform !=
nullptr) ? transform->x : 0.F;
35 const float y = (transform !=
nullptr) ? transform->y : 0.F;
42 static_cast<int>(rect->pos_y), rect->size_x, rect->size_y);
This file contains the component definitions.
This file contains the IRenderer class declaration.
This file contains the Registry class declaration.
SpriteSystem & operator=(SpriteSystem &&)=delete
void update(ecs::Registry ®istry, float) override
SpriteSystem(eng::IRenderer &renderer)
SpriteSystem(const SpriteSystem &)=delete
SpriteSystem(SpriteSystem &&)=delete
eng::IRenderer & m_renderer
~SpriteSystem() override=default
SpriteSystem & operator=(const SpriteSystem &)=delete
Class for managing entities and their components.
std::unordered_map< Entity, T > & getAll()
T * getComponent(Entity e)
Interface for the renderer.
virtual void drawSprite(const std::string &name)=0
virtual void setSpritePosition(const std::string &name, float x, float y)=0
virtual void setSpriteTexture(const std::string &name, const std::string &path)=0
virtual void setSpriteFrame(const std::string &name, int fx, int fy, int fnx, int fny)=0