From 77ef03d696d42b1ea0a0d877a157dd1996d372d5 Mon Sep 17 00:00:00 2001 From: fusijie Date: Fri, 14 Aug 2015 15:12:57 +0800 Subject: [PATCH] Fixed JS-Tests TiledMap VertexZ bug. --- tests/js-tests/src/TileMapTest/TileMapTest.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/js-tests/src/TileMapTest/TileMapTest.js b/tests/js-tests/src/TileMapTest/TileMapTest.js index 3ee0bc3848..099d381d79 100644 --- a/tests/js-tests/src/TileMapTest/TileMapTest.js +++ b/tests/js-tests/src/TileMapTest/TileMapTest.js @@ -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) {