Jump to content

getTileAbove gives error but getTile does not


Recommended Posts

I create layer from Tiled with these commands:

var map;
var fog;
var flour;
map = this.game.add.tilemap('lesson51');
map.addTilesetImage('tileSheetWinter', 'gameTiles');
flour = map.createLayer('flour');
fog = map.createLayer('fog');

Why `map.getTileAbove(fog, x, y);` gives error TypeError: Cannot read property 'data' of undefined

but map.getTile(x, y, fog); return Tile object as expected?

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...