Add Entity#GetSprite

This commit is contained in:
SeanOMik 2020-07-12 22:41:10 -05:00
parent 17610b1c82
commit 05ae937acf
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
2 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,8 @@ namespace simpleengine {
void UpdateComponents(const float& delta_time);
void RenderComponents(sf::RenderTarget* target);
void AddComponent(std::unique_ptr<Component> component);
sf::Sprite& GetSprite();
protected:
sf::Sprite& sprite;
std::vector<std::unique_ptr<Component>> components;

View File

@ -64,3 +64,7 @@ void simpleengine::Entity::DestroyLater() {
const bool &simpleengine::Entity::IsGettingDestroyed() const {
return destroying;
}
sf::Sprite &simpleengine::Entity::GetSprite() {
return sprite;
}