You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've checked through this and removeTile and removeAll doesn't null anything anymore, it just creates -1 indexed tiles. I've searched the whole of Tilemap.js for = null and it's not happening anywhere, so I'm going to close this off unless you've a test case you can show me please.
I can confirm it works. I just tested with the Starstruck example from the phaser-examples repo (using Phaser 2.1.0). I used some of the code from the Paint tiles example to test it. My test code is in this Gist.
If you use getTile, it works well,
if you then delete that tile using removeTile()
it clears the data, and then if you use getTile on the same coord's, it crashes at this line;
this.layers[layer].data[y][x].index ()
this.layers[layer].data[y][x] is NULL, undefined. removed;
so this would also explain why hasTile is true for tiles that are not actually there?
removeTile, and non tile's are not being set to -1 somewhere, Tomorrow's adventure time .
for now, im just going to use a check
if(!this.layers[layer].data[y][x] ) { return null; };
The text was updated successfully, but these errors were encountered: