From 7fa9e4639ecb00729b7145bb28f023554a72afe1 Mon Sep 17 00:00:00 2001 From: Raeven0 Date: Tue, 1 Apr 2014 20:26:16 -0500 Subject: [PATCH] correct Tilemap.hasTile(...) parameter typing Member methods of Tilemap which take a layer parameter use getLayer on that parameter to allow passing int, string, and TilemapLayer objects. Tilemap.hasTile(...) should do so as well. --- src/tilemap/Tilemap.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tilemap/Tilemap.js b/src/tilemap/Tilemap.js index 79cc20924..2d7c75809 100644 --- a/src/tilemap/Tilemap.js +++ b/src/tilemap/Tilemap.js @@ -996,6 +996,8 @@ Phaser.Tilemap.prototype = { */ hasTile: function (x, y, layer) { + layer = this.getLayer(layer); + return (this.layers[layer].data[y] !== null && this.layers[layer].data[y][x] !== null); },