From your documentation i see that u use IgeTileMap2d as example for depth sort mode. Currenly im using the texture map for my map and i would like to use the depth sort mode function. Is it possible im using that fucntion in texture map? I try it but fail with no luck on the sorting with my character.
This is how i write my texture map and define the depth sort mode to 0.
Code: Select all
loadTileMap1: function () {
this.textureMap1 = new IgeTextureMap()
.depth(1)
.tileWidth(40)
.tileHeight(40)
.drawMouse(true)
.depthSortMode(0)
.autoSection(10)
.drawBounds(false)
.isometricMounts(true)
.addComponent(IgeEntityManager)
.mount(ige.client.mainScene);
var texIndex = this.textureMap1.addTexture(this.gameTexture[1]);
this.textureMap1.loadMap(map1);
//console.log(this.textureMap1.map.mapDataString());
},
Code: Select all
loadEntity: function () {
this.entity = new IgeEntity()
.id('tree')
.texture(this.gameTexture[2])
.width(150)
.height(150)
.cell(17)
.isometric(true)
.drawBounds(false)
.mount(ige.client.foregroundMap);
}
Code: Select all
this.foregroundMap = new IgeTileMap2d()
.id('foregroundMap')
.isometricMounts(true)
.tileWidth(40)
.tileHeight(40)
.drawGrid(10)
.drawMouse(true)
.depthSortMode(0)
.drawBounds(false)
.drawBoundsData(false)
.hoverColor('#BFE01B')
.mount(this.foregroundScene);