Skip to content

Commit

Permalink
Fix bug in Chapter2/BGSpriteComponent.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
HarIgo23 committed Mar 9, 2024
1 parent 22372ca commit a4656d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Chapter02/BGSpriteComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void BGSpriteComponent::Update(float deltaTime)
// the right of the last bg texture
if (bg.mOffset.x < -mScreenSize.x)
{
bg.mOffset.x = (mBGTextures.size() - 1) * mScreenSize.x - 1;
bg.mOffset.x += mScreenSize.x * mBGTextures.size();
}
}
}
Expand Down

0 comments on commit a4656d6

Please sign in to comment.