From d82522ad6fc9f26f507a885a80026f6673ca9431 Mon Sep 17 00:00:00 2001 From: 2youyouo2 <501251991@qq.com> Date: Mon, 28 Dec 2015 18:24:40 +0800 Subject: [PATCH] cc.Game should not initEvents in editor mode --- cocos2d/core/CCGame.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos2d/core/CCGame.js b/cocos2d/core/CCGame.js index 5271aa0b31..34137f8875 100644 --- a/cocos2d/core/CCGame.js +++ b/cocos2d/core/CCGame.js @@ -224,7 +224,9 @@ var game = /** @lends cc.game# */{ */ cc.winSize = cc.director.getWinSize(); - this._initEvents(); + if (!CC_EDITOR) { + this._initEvents(); + } this._setAnimFrame(); this._runMainLoop();