addEscEvent = function(node){ cc.eventManager.addListener({ event: cc.EventListener.KEYBOARD, onKeyPressed: function(keyCode, event){ cc.hb.uiMgr.openPanel("Hall/alertBox/AlertBox",cc.hb.alertMgr.ANIMATE_CENTENT,"確認退出遊戲嗎?",function(success){ if (success){cc.game.end();} } ); }, onKeyReleased: function(keyCode, event){ if(keyCode == cc.KEY.back){ cc.log("") } } }, node);}