Jump to content

map.setTileIndexCallback doesn't work, what am I doing wrong?


farkerhaiku
 Share

Recommended Posts

I made a tiled map with 2 tiles from a spritesheet I found online somewhere.  The floor tile is index 2 in the tilesheet, and the "lava" tile is index 245 in the sprite sheet.  I can post the relevant exported json from tile if need be.   The map loads correctly, physics is "correct" in that the player collides with the floor tile and passes through the lava tile.

 

My problem is that I can't seem to get the "burn" callback to fire using the following code.  no console messages are spit out.  

https://gist.github.com/anonymous/d67ba81f26274402736c

I'm not sure what I'm doing wrong that this callback doesn't happen.  I'm using the following example, http://examples.phaser.io/_site/view_full.html?d=tilemaps&f=tile+callbacks.js&t=tile%20callbacks, but it's using arcade physics and not p2 physics.  I think I need p2 physics because in theory I'm going to be making some swinging ropes.

 

Any thoughts on what I'm doing wrong?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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