mirror of
https://github.com/wassname/phaser.git
synced 2026-09-11 12:31:29 +08:00
Merge pull request #76 from XekeDeath/dev
Fix for particles emitting in the wrong area when using emitter.width/height. And small change to make animation looping more robust.
This commit is contained in:
@@ -223,7 +223,7 @@ Phaser.Animation.prototype = {
|
||||
{
|
||||
if (this.looped)
|
||||
{
|
||||
this._frameIndex = this._frameIndex - this._frames.length;
|
||||
this._frameIndex %= this._frames.length;
|
||||
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
|
||||
|
||||
if (this.currentFrame)
|
||||
@@ -401,4 +401,4 @@ Phaser.Animation.generateFrameNames = function (prefix, min, max, suffix, zeroPa
|
||||
|
||||
return output;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user