mirror of
https://github.com/wassname/phaser.git
synced 2026-07-14 01:10:16 +08:00
Loads of issues reported on Github resolved (sprite crop, music resume, etc).
This commit is contained in:
@@ -103,6 +103,19 @@ Phaser.Rectangle.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Runs Math.floor() on the x, y, width and height values of this Rectangle.
|
||||
* @method Phaser.Rectangle#floorAll
|
||||
**/
|
||||
floorAll: function () {
|
||||
|
||||
this.x = Math.floor(this.x);
|
||||
this.y = Math.floor(this.y);
|
||||
this.width = Math.floor(this.width);
|
||||
this.height = Math.floor(this.height);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Copies the x, y, width and height properties from any given object to this Rectangle.
|
||||
* @method Phaser.Rectangle#copyFrom
|
||||
|
||||
Reference in New Issue
Block a user