mirror of
https://github.com/wassname/phaser.git
synced 2026-08-04 13:14:14 +08:00
Fixed small bug in Game where AUTO didn't detect the lack of WebGL properly. Tidied up Math a bit more.
This commit is contained in:
@@ -91,16 +91,15 @@ Phaser.Sprite = function (game, x, y, key, frame) {
|
||||
*/
|
||||
this._height = 0;
|
||||
|
||||
// if (texture.baseTexture.hasLoaded)
|
||||
// {
|
||||
this.updateFrame = true;
|
||||
// }
|
||||
|
||||
this.updateFrame = true;
|
||||
this.renderable = true;
|
||||
|
||||
this.position.x = x;
|
||||
this.position.y = y;
|
||||
|
||||
// Replaces the PIXI.Point with a slightly more flexible one
|
||||
this.scale = new Phaser.Point(1, 1);
|
||||
|
||||
};
|
||||
|
||||
Phaser.Sprite.prototype = Object.create(PIXI.Sprite.prototype);
|
||||
@@ -116,6 +115,18 @@ Phaser.Sprite.prototype.update = function() {
|
||||
|
||||
}
|
||||
|
||||
Object.defineProperty(Phaser.Sprite.prototype, 'angle', {
|
||||
|
||||
get: function() {
|
||||
return Phaser.Math.radToDeg(this.rotation);
|
||||
},
|
||||
|
||||
set: function(value) {
|
||||
this.rotation = Phaser.Math.degToRad(value);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Object.defineProperty(Phaser.Sprite.prototype, 'x', {
|
||||
|
||||
get: function() {
|
||||
|
||||
Reference in New Issue
Block a user