Add Entity#GetSprite
This commit is contained in:
parent
17610b1c82
commit
05ae937acf
|
@ -53,6 +53,8 @@ namespace simpleengine {
|
||||||
void UpdateComponents(const float& delta_time);
|
void UpdateComponents(const float& delta_time);
|
||||||
void RenderComponents(sf::RenderTarget* target);
|
void RenderComponents(sf::RenderTarget* target);
|
||||||
void AddComponent(std::unique_ptr<Component> component);
|
void AddComponent(std::unique_ptr<Component> component);
|
||||||
|
|
||||||
|
sf::Sprite& GetSprite();
|
||||||
protected:
|
protected:
|
||||||
sf::Sprite& sprite;
|
sf::Sprite& sprite;
|
||||||
std::vector<std::unique_ptr<Component>> components;
|
std::vector<std::unique_ptr<Component>> components;
|
||||||
|
|
|
@ -64,3 +64,7 @@ void simpleengine::Entity::DestroyLater() {
|
||||||
const bool &simpleengine::Entity::IsGettingDestroyed() const {
|
const bool &simpleengine::Entity::IsGettingDestroyed() const {
|
||||||
return destroying;
|
return destroying;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sf::Sprite &simpleengine::Entity::GetSprite() {
|
||||||
|
return sprite;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue