lucbloom Posted May 27, 2014 Share Posted May 27, 2014 I have fixed a bug. This is how to repro it: At startup:this.sprite.loadTexture("walk.png"); // Sprite sheet 3x4 frames Some time later:this.sprite.loadTexture("dead.png"); // Single frame My game sets this.sprite.frame each update. If the object is 'dead', the frame number is 0. The BUG is: the old frameData in this.sprite.animations resets the texure to walk.png's first frame.I SOLVED this by executing this.animations.loadFrameData(null);in the "cache.isSpritesheet == false" part of Phaser.Sprite.prototype.loadTexture Link to comment Share on other sites More sharing options...
rich Posted May 27, 2014 Share Posted May 27, 2014 https://github.com/photonstorm/phaser/commit/0c76e9aada0b7c771155e922d5b1e5e62c94517a If you wish to fix any more bugs (and please do!) then try doing a github pull request next time Link to comment Share on other sites More sharing options...
oliversb Posted May 27, 2014 Share Posted May 27, 2014 Thanks for your contribution. Link to comment Share on other sites More sharing options...
Recommended Posts