mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 09:03:42 +00:00
added new Constructor for SpriteComponent as Tiles wont work with enums
This commit is contained in:
parent
ac217e931b
commit
27a80d9766
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user