PixiPatch and other 1.0.7 features

This commit is contained in:
Richard Davey
2013-09-27 09:57:08 +01:00
parent 6353d8c7ab
commit 18c695e9dd
10 changed files with 413 additions and 26 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame,
this.onInputUp.add(callback, callbackContext);
}
this.input.start(0, false, true);
this.input.start(0, true);
// Redirect the input events to here so we can handle animation updates, etc
this.events.onInputOver.add(this.onInputOverHandler, this);
+2 -2
View File
@@ -255,7 +255,7 @@ Phaser.Sprite.prototype.preUpdate = function() {
}
// Frame updated?
if (this.currentFrame.uuid != this._cache.frameID)
if (this.currentFrame && this.currentFrame.uuid != this._cache.frameID)
{
this._cache.frameWidth = this.texture.frame.width;
this._cache.frameHeight = this.texture.frame.height;
@@ -263,7 +263,7 @@ Phaser.Sprite.prototype.preUpdate = function() {
this._cache.dirty = true;
}
if (this._cache.dirty)
if (this._cache.dirty && this.currentFrame)
{
this._cache.width = Math.floor(this.currentFrame.sourceSizeW * this._cache.scaleX);
this._cache.height = Math.floor(this.currentFrame.sourceSizeH * this._cache.scaleY);
+4 -4
View File
@@ -94,7 +94,7 @@ Object.defineProperty(Phaser.Text.prototype, 'angle', {
});
Object.defineProperty(Phaser.Text.prototype, 'text', {
Object.defineProperty(Phaser.Text.prototype, 'content', {
get: function() {
return this._text;
@@ -106,14 +106,14 @@ Object.defineProperty(Phaser.Text.prototype, 'text', {
if (value !== this._text)
{
this._text = value;
this.dirty = true;
this.setText(value);
}
}
});
Object.defineProperty(Phaser.Text.prototype, 'style', {
Object.defineProperty(Phaser.Text.prototype, 'font', {
get: function() {
return this._style;
@@ -125,7 +125,7 @@ Object.defineProperty(Phaser.Text.prototype, 'style', {
if (value !== this._style)
{
this._style = value;
this.dirty = true;
this.setStyle(value);
}
}