Fix setSprite never updating progress on ProgressTimer

Basically whenever you set a new sprite on a ProgressTimer, the new sprite is hidden.

 Calling setPercentage once with the same value doesn't work because the new percentage is the same as the old one. I've got a workaround setting the percentage to 0 and then back to the old value, but this change seems to solve that issue entirely.
This commit is contained in:
TankorSmash 2015-05-03 14:35:50 -04:00
parent 254a4b0b0c
commit 88833213ca
1 changed files with 2 additions and 0 deletions

View File

@ -115,6 +115,8 @@ void ProgressTimer::setSprite(Sprite *sprite)
CC_SAFE_FREE(_vertexData);
_vertexDataCount = 0;
}
updateProgress();
}
}