Merge pull request #13372 from fusijie/fix_tiledmap_vertexZ

[ci skip]Fixed JS-Tests TiledMap VertexZ bug.
This commit is contained in:
子龙山人 2015-08-14 15:31:11 +08:00
commit d13f4df356
1 changed files with 4 additions and 0 deletions

View File

@ -1117,11 +1117,13 @@ var TMXIsoVertexZ = TMXFixBugLayer.extend({
onEnter:function () {
this._super();
// TIP: 2d projection should be used
director.setDepthTest(true);
director.setProjection(cc.Director.PROJECTION_2D);
},
onExit:function () {
// At exit use any other projection.
director.setProjection(cc.Director.PROJECTION_DEFAULT);
director.setDepthTest(false);
this._super();
},
repositionSprite:function (dt) {
@ -1191,11 +1193,13 @@ var TMXOrthoVertexZ = TMXFixBugLayer.extend({
this._super();
// TIP: 2d projection should be used
director.setDepthTest(true);
director.setProjection(cc.Director.PROJECTION_2D);
},
onExit:function () {
// At exit use any other projection.
director.setProjection(cc.Director.PROJECTION_DEFAULT);
director.setDepthTest(false);
this._super();
},
repositionSprite:function (dt) {