3#include "engine/component.h"
4#include <SFML/Graphics/Sprite.hpp>
5#include <SFML/Graphics/RenderWindow.hpp>
11class TransformManager;
18 public ComponentManager<sf::Sprite, static_cast<Component>(ComponentType::SPRITE)>,
24 transformManager_(transformManager)
28 void SetOrigin(
Entity entity, sf::Vector2f origin);
29 void SetTexture(
Entity entity,
const sf::Texture& texture);
30 void SetCenter(sf::Vector2f center) { center_ = center; }
31 void SetWindowSize(sf::Vector2f newWindowSize) { windowSize_ = newWindowSize; }
32 void Draw(sf::RenderTarget& window)
override;
33 void SetColor(
Entity entity, sf::Color color);
37 sf::Vector2f center_{};
38 sf::Vector2f windowSize_{};
ComponentManager is a class that owns Component in a contiguous array. Component indexing is done wit...
Definition: component.h:33
DrawInterface is an interface used by the Engine to be called when the game loop is drawing elements ...
Definition: graphics.h:12
Manages the entities in an array using bitwise operations to know if it has components.
Definition: entity.h:35
SpriteManager is a ComponentManager that manages sprites, order by greater entity index,...
Definition: sprite.h:20
std::uint32_t Entity
Entity is the type used to define an game world entity. An Entity is just an index,...
Definition: entity.h:17