Fix sprite priority
because sprites should be drawn over the background, set priority (like background layer) to 0
This commit is contained in:
parent
05bee78dd3
commit
0c47c02d5b
|
@ -13,7 +13,7 @@ Sprite::Sprite(const Sprite &other) : Sprite(nullptr, 0, other.x, other.y, other
|
|||
}
|
||||
|
||||
Sprite::Sprite(const void *imageData, int imageSize, int x, int y, SpriteSize size)
|
||||
: x(x), y(y), data(imageData), imageSize(imageSize), spriteSize(size),
|
||||
: x(x), y(y), data(imageData), imageSize(imageSize), spriteSize(size), priority(0),
|
||||
animationDelay(0), numberOfFrames(0), beginFrame(0), currentFrame(0), animationCounter(0) {
|
||||
setAttributesBasedOnSize(size);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue