TileSprites are now much more tidy and can run from a frame in a texture. They can also be animated. New TileSprite.autoScroll function added.

This commit is contained in:
photonstorm
2014-02-13 23:13:10 +00:00
parent 5bbb7e390b
commit 35e4c03bad
34 changed files with 1116 additions and 42 deletions
+18
View File
@@ -162,6 +162,12 @@ Phaser.Animation.prototype = {
this.currentFrame = this._frameData.getFrame(this._frames[this._frameIndex]);
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
if (this._parent.__tilePattern)
{
this._parent.__tilePattern = false;
this._parent.tilingTexture = false;
}
if (this._parent.events)
{
this._parent.events.onAnimationStart.dispatch(this._parent, this);
@@ -259,6 +265,12 @@ Phaser.Animation.prototype = {
if (this.currentFrame)
{
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
if (this._parent.__tilePattern)
{
this._parent.__tilePattern = false;
this._parent.tilingTexture = false;
}
}
this._parent.events.onAnimationLoop.dispatch(this._parent, this);
@@ -275,6 +287,12 @@ Phaser.Animation.prototype = {
if (this.currentFrame)
{
this._parent.setTexture(PIXI.TextureCache[this.currentFrame.uuid]);
if (this._parent.__tilePattern)
{
this._parent.__tilePattern = false;
this._parent.tilingTexture = false;
}
}
}