change clear color in onEnter (#17564)

This commit is contained in:
minggo 2017-03-22 11:51:06 +08:00 committed by GitHub
parent ab9104f3ce
commit 1366ea1f97
1 changed files with 5 additions and 1 deletions

View File

@ -1103,7 +1103,6 @@ var FogTestDemo = Camera3DTestDemo.extend({
ctor:function(){
this._super();
cc.director.setClearColor(cc.color(128, 128, 128));
cc.eventManager.addListener({
event:cc.EventListener.TOUCH_ALL_AT_ONCE,
@ -1191,6 +1190,11 @@ var FogTestDemo = Camera3DTestDemo.extend({
layer3D.setCameraMask(2);
},
onEnter: function() {
this._super();
cc.director.setClearColor(cc.color(128, 128, 128));
},
onExit:function(){
this._super();
cc.director.setClearColor(cc.color(0, 0, 0));