qichunren Posted November 20, 2014 Report Share Posted November 20, 2014 I am using Phaser 2.1.3. I create a tiled map with Tiled 0.9.1There is only one defualt layer, and one tileset image,4 colr tiles 32x32 . I want to make the orange tile solid, player can't go through this kind of tile. But in my game, the player can't go through orange tiles block and red tiles block on stage. I don't why. This is some of my code, full code here: https://github.com/qichunren/game1/blob/gh-pages/assets/js/game.jsvar map = this.add.tilemap('map1');map.addTilesetImage('tileset');map.setCollisionByExclusion([1]);this.layer1 = map.createLayer('Tile Layer 1');this.layer1.resizeWorld();map.setTileIndexCallback(4, this.reachedDoorEvent, this);You can test it here: http://qichunren.github.io/game1/index.html, move the player(candy) by arrow key. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.