fix new pieces not appearing

This commit is contained in:
2022-08-02 14:40:46 +00:00
parent 8e6f57c78d
commit 7ad637c936

View File

@@ -165,7 +165,7 @@
(set save.data.backgroundIndex 0)) (set save.data.backgroundIndex 0))
(set pieceCamera.bgColor (nth backgroundOptions save.data.backgroundIndex)) (set pieceCamera.bgColor (nth backgroundOptions save.data.backgroundIndex))
(unless (= lastRewardFileIndex rewardFileIndex) (unless (and (= lastRewardFileIndex rewardFileIndex) (= lastTotalPoints (m.totalPoints)))
(set rewardSprite (set rewardSprite
(new FlxSprite 0 0 (new FlxSprite 0 0
(BitmapData.fromFile (BitmapData.fromFile
@@ -287,6 +287,8 @@
(doFor i (range TOTAL_PIECES) (doFor i (range TOTAL_PIECES)
(checkMatches i)))) (checkMatches i))))
(set lastRewardFileIndex rewardFileIndex) (set lastRewardFileIndex rewardFileIndex)
(prop &mut lastTotalPoints -1)
(set lastTotalPoints (m.totalPoints))
(pieceCamera.calculateScrollBounds rewardSprites uiCamera SCROLL_BOUND_MARGIN) (pieceCamera.calculateScrollBounds rewardSprites uiCamera SCROLL_BOUND_MARGIN)