We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Startup: this.loadTexture("pusher_walk");
During play: this.getFrameForPosition = function(p) { if (this.dead) { return 0; } return ;// Something with p and frame count }
this.update = function(elapsed) { this.frame = this.getFrameForPosition(this); }
On death: this.dead = true; this.loadTexture("pusher_dead");
BUG: This makes the sprite load pusher_walk's frame 0, because this.animations still has frameData belonging to the sprite sheet.
SOLUTION: this.animations.loadFrameData(null); WHEN game.cache.isSpriteSheet is FALSE...
The text was updated successfully, but these errors were encountered:
Sprite animation data wasn't reset when going from a sprite sheet to …
0c76e9a
…a single frame in Sprite.loadTexture (thanks @lucbloom, fix #850)
👍
Sorry, something went wrong.
No branches or pull requests
Startup:
this.loadTexture("pusher_walk");
During play:
this.getFrameForPosition = function(p)
{
if (this.dead)
{
return 0;
}
return ;// Something with p and frame count
}
this.update = function(elapsed)
{
this.frame = this.getFrameForPosition(this);
}
On death:
this.dead = true;
this.loadTexture("pusher_dead");
BUG: This makes the sprite load pusher_walk's frame 0, because this.animations still has frameData belonging to the sprite sheet.
SOLUTION: this.animations.loadFrameData(null); WHEN game.cache.isSpriteSheet is FALSE...
The text was updated successfully, but these errors were encountered: