diff --git a/include/SpriteComponent.h b/include/SpriteComponent.h index 5cc3b53..4b9f8e2 100644 --- a/include/SpriteComponent.h +++ b/include/SpriteComponent.h @@ -35,9 +35,13 @@ private: int textureXOffset; int textureYOffset; + //should be changed in the future as this is only for the tiles + const char* path; + public: SpriteComponent(Textures texture, int zIndex); SpriteComponent(Textures texture, int xOffset, int yOffset, int zIndex); + SpriteComponent(const char* path, int xOffset, int yOffset, int zIndex); SpriteComponent( Textures texture, bool isAnimated, diff --git a/src/SpriteComponent.cpp b/src/SpriteComponent.cpp index 36f6766..77ad9f1 100644 --- a/src/SpriteComponent.cpp +++ b/src/SpriteComponent.cpp @@ -25,6 +25,11 @@ SpriteComponent::SpriteComponent(Textures texture, int xOffset, int yOffset, int this->textureEnum = texture; } +SpriteComponent::SpriteComponent(const char* path, int xOffset, int yOffset, int zIndex) : RenderObject(zIndex, VEGO_Game().renderManager), textureXOffset(xOffset), textureYOffset(yOffset) { + + this->path = path; +} + SpriteComponent::SpriteComponent( Textures texture, bool isAnimated,