mirror of https://github.com/axmolengine/axmol.git
fix FastTMXLayer (#20065)
This commit is contained in:
parent
66c4892b22
commit
73ad115702
|
@ -141,8 +141,8 @@ void TMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flags)
|
|||
{
|
||||
Size s = Director::getInstance()->getVisibleSize();
|
||||
const Vec2 &anchor = getAnchorPoint();
|
||||
auto rect = Rect(Camera::getVisitingCamera()->getPositionX() - s.width * anchor.x,
|
||||
Camera::getVisitingCamera()->getPositionY() - s.height * anchor.y,
|
||||
auto rect = Rect(Camera::getVisitingCamera()->getPositionX() - s.width * (anchor.x == 0.0f ? 0.5f : anchor.x),
|
||||
Camera::getVisitingCamera()->getPositionY() - s.height * (anchor.y == 0.0f ? 0.5f : anchor.y),
|
||||
s.width,
|
||||
s.height);
|
||||
|
||||
|
|
Loading…
Reference in New Issue