Fix "Test change animation intenal" under js test can not change back to 60fps

This commit is contained in:
XiaoFeng 2015-10-28 11:18:12 +08:00
parent 0dc42bd9a7
commit c55f030218
1 changed files with 3 additions and 1 deletions

View File

@ -1234,11 +1234,13 @@ var TestChangeAnimationInternal = ArmatureTestLayer.extend({
return "Touch to change animation internal";
},
onTouchesEnded: function (touch, event) {
if (cc.director.getAnimationInterval() == 1 / 30) {
if (cc.director.getAnimationInterval() >= 1 / 40) {
cc.director.setAnimationInterval(1 / 60);
cc.log("Change to 60 fps");
}
else {
cc.director.setAnimationInterval(1 / 30);
cc.log("Change to 30 fps");
}
return false;
},