nak3ddogs Posted September 20, 2014 Share Posted September 20, 2014 Hi!i read in the new version we can set tile's interesting face.How can i select every instance of tile to set the collison's direction/face? how can i do one-way jump tiles?thx for any advice and sry for my terrible english Link to comment Share on other sites More sharing options...
nak3ddogs Posted September 28, 2014 Author Share Posted September 28, 2014 in the new version of the phaser i could. here the code for itimportant: dont set the collision for these instances of tiles. then it will be buggyvar 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 More sharing options...
Recommended Posts