Sign in to follow this  

getTileAbove gives error but getTile does not

Recommended Posts

I create layer from Tiled with these commands:

var map;
var fog;
var flour;
map ='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?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.