Fixed issue with CocoonJS detection in Device.

Fixed docs issue in Tilemap.
Created landscape pointer test, confirmed working fine (issue #276)
This commit is contained in:
photonstorm
2014-02-28 03:09:04 +00:00
parent 43cd5e4b3f
commit 34ee2b0b20
11 changed files with 218 additions and 107 deletions
+1 -1
View File
@@ -414,7 +414,7 @@ Phaser.Device.prototype = {
*/
_checkFeatures: function () {
this.canvas = !!window['CanvasRenderingContext2D'] || this.iscocoonJS;
this.canvas = !!window['CanvasRenderingContext2D'] || this.cocoonJS;
try {
this.localStorage = !!localStorage.getItem;
+5
View File
@@ -998,11 +998,16 @@ Phaser.Tilemap.prototype = {
* @method Phaser.Tilemap#getTileWorldXY
* @param {number} x - X position to get the tile from (given in pixels)
* @param {number} y - Y position to get the tile from (given in pixels)
* @param {number} [tileWidth] - The width of the tiles. If not given the map default is used.
* @param {number} [tileHeight] - The height of the tiles. If not given the map default is used.
* @param {number|string|Phaser.TilemapLayer} [layer] - The layer to get the tile from.
* @return {Phaser.Tile} The tile at the given coordinates.
*/
getTileWorldXY: function (x, y, tileWidth, tileHeight, layer) {
if (typeof tileWidth === 'undefined') { tileWidth = this.tileWidth; }
if (typeof tileHeight === 'undefined') { tileHeight = this.tileHeight; }
layer = this.getLayer(layer);
x = this.game.math.snapToFloor(x, tileWidth) / tileWidth;
+1
View File
@@ -293,6 +293,7 @@ Phaser.Utils.Debug.prototype = {
this.line('World X: ' + pointer.worldX + " World Y: " + pointer.worldY);
this.line('Screen X: ' + pointer.x + " Screen Y: " + pointer.y);
this.line('Duration: ' + pointer.duration + " ms");
this.line('is Down: ' + pointer.isDown + " is Up: " + pointer.isUp);
this.stop();
},