removed Sprite afterFrame func. The same functionality can be achieved by listening to indexChange event

This commit is contained in:
Eric Rowell
2013-12-15 12:55:01 -08:00
parent c5dd9e1090
commit d3eb9990bd
2 changed files with 4 additions and 20 deletions

View File

@@ -108,9 +108,10 @@ suite('Sprite', function() {
// kick once
setTimeout(function() {
sprite.setAnimation('kicking');
sprite.afterFrame(5, function() {
sprite.setAnimation('standing');
sprite.on('indexChange', function(evt) {
if (evt.newVal === 0 && this.getAnimation() === 'kicking') {
sprite.setAnimation('standing');
}
});
}, 2000);
setTimeout(function() {