Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

set tile's interesting face || one-way jump tiles


nak3ddogs
 Share

Recommended Posts

in the new version of the phaser i could. 

here the code for it

important: dont set the collision for these instances of tiles. then it will be buggy

var mapArray = layer1.getTiles(0, 0, game.world.width, game.world.height);var myOneWayJumpTile = 2; for (var i = 0; i < mapArray.length; i++) {     if ( mapArray[i].index == myOneWayJumpTile  ) {        mapArray[i].setCollision(false, false, true, false); // left, right, top, bottom    };}
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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