(function(k){var g,c,b;(function(){var a={},d={};g=function(b,d,f){a[b]={deps:d,callback:f}};b=c=function(h){function n(a){if("."!==a.charAt(0))return a;a=a.split("/");for(var e=h.split("/").slice(0,-1),b=0,f=a.length;bc||isNaN(c))throw TypeError("n must be a positive number");this._maxListeners=c;return this};g.prototype.emit=function(c){var b,a,d,h;this._events||(this._events={});if("error"===c&&!this._events.error){b=arguments[1];if(b instanceof Error)throw b; throw Error('Uncaught, unspecified "error" event.');}a=this._events[c];if(cc.isUndefined(a))return!1;if(cc.isFunction(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:b=arguments.length;d=Array(b-1);for(h=1;ha&&(this._events[c].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[c].length),console.trace());return this};g.prototype.on=g.prototype.addListener;g.prototype.once=function(c,b){function a(){this.removeListener(c,a);d||(d=!0,b.apply(this,arguments))}if(!cc.isFunction(b))throw TypeError("listener must be a function");var d=!1;a.listener=b;this.on(c,a); return this};g.prototype.removeListener=function(c,b){var a,d,h;if(!cc.isFunction(b))throw TypeError("listener must be a function");if(!this._events||!this._events[c])return this;a=this._events[c];h=a.length;d=-1;if(a===b||cc.isFunction(a.listener)&&a.listener===b)delete this._events[c],this._events.removeListener&&this.emit("removeListener",c,b);else if(cc.isObject(a)){for(;0d)return this;1===a.length?(a.length=0,delete this._events[c]): a.splice(d,1);this._events.removeListener&&this.emit("removeListener",c,b)}return this};g.prototype.removeAllListeners=function(c){var b;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[c]&&delete this._events[c],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);this.removeAllListeners("removeListener");this._events={};return this}b=this._events[c];if(cc.isFunction(b))this.removeListener(c, b);else if(Array.isArray(b))for(;b.length;)this.removeListener(c,b[b.length-1]);delete this._events[c];return this};g.prototype.listeners=function(c){return this._events&&this._events[c]?cc.isFunction(this._events[c])?[this._events[c]]:this._events[c].slice():[]};g.listenerCount=function(c,b){return c._events&&c._events[b]?cc.isFunction(c._events[b])?1:c._events[b].length:0};cc.EventEmitter=g;cc.EventEmitter.create=function(){return new g}})(this);(function(k){function g(e){return Array.isArray(e)}function c(e){return"string"===typeof e}function b(e){return"object"===typeof e&&null!==e}function a(e){return e.replace(/\-(\w)/ig,function(e,a){return a.toUpperCase()})}Object.defineProperty(cc,"exports",{get:function(){return k},set:function(e){cc.mixin(k,e)},enumerable:!0,configurable:!1});k.console||(k.console={log:cc.log,error:cc.log,trace:cc.log,warn:cc.log});"undefined"==typeof navigator&&(cc.navigator?k.navigator=cc.navigator:(k.navigator= {},navigator.userAgent="Cocos2dx Mac OSX"));var d=0<=navigator.userAgent.indexOf("Mac OSX"),h=0>navigator.userAgent.indexOf("Cocos2dx"),n=0<=navigator.userAgent.indexOf("Android"),f=0<=navigator.userAgent.indexOf("iOS");cc.isOSX=d;cc.isHtml5=h;cc.isAndroid=n;cc.isIOS=f;cc.isOpenGL=cc.sys.capabilities.opengl;cc.isOpenGL||(cc.TransitionCrossFade=cc.TransitionFadeBL=cc.TransitionFadeTR=cc.TransitionFade);cc.mixin=function(e,a,b){b=b||function(e,a){if("undefined"===typeof e)return a};!0==b&&(b=function(e, a){return a});for(var f in a){var d=b(e[f],a[f],f,e,a);"undefined"!==typeof d&&(e[f]=d)}return e};cc.isArray=g;cc.isBoolean=function(e){return"boolean"===typeof e};cc.isNull=function(e){return null===e};cc.isNullOrUndefined=function(e){return null==e};cc.isNumber=function(e){return"number"===typeof e};cc.isString=c;cc.isSymbol=function(e){return"symbol"===typeof e};cc.isUndefined=function(e){return void 0===e};cc.isRegExp=function(e){return b(e)&&"[object RegExp]"===objectToString(e)};cc.isObject= b;cc.isDate=function(e){return b(e)&&"[object Date]"===objectToString(e)};cc.isError=function(e){return b(e)&&("[object Error]"===objectToString(e)||e instanceof Error)};cc.isFunction=function(e){return"function"===typeof e};cc.random=function(e,a){if("number"===typeof e)return a=a||0,0|e+Math.random()*(a-e);if(e instanceof Array){var b=e.length;return null==a?e[0|Math.random()*b]:cc.arrayShuffle(e.slice(0)).slice(0,a)}return Math.random()};cc.tmpl=function(a,b,f){return a=a.replace(/\{([^\{\}]*)\}/g, function(a,e){if(!e)return"";try{var d=(new Function("data","with(data){return ("+e+");}"))(b);return f?f(d,e):d}catch(c){return a}})};cc.arrayShuffle=function(a){for(var b=a.length-1;0a.length&&(a[3]=255),cc.color.apply(null,a);a=l[a]}return D(a)};cc.fontFamily={_fonts:{},add:function(a,b){this._fonts[a]=b}};cc.textureCache.getTextureForKey||(cc.textureCache.getTextureForKey=cc.textureCache.textureForKey);cc.getSpriteFrame=function(a,b){var f=cc.spriteFrameCache.getSpriteFrame(a);if(!b&&!f){var d=cc.textureCache.getTextureForKey(a);d||(d=cc.textureCache.addImage(a)); d&&(f=d.getContentSize(),f=cc.SpriteFrame.create(d,cc.rect(0,0,f.width,f.height)))}return f};cc.createSprite=function(a,b){"object"!==typeof a||a instanceof cc.Sprite||null!=b||(b=a,a.texture?(a=a.texture,delete b.texture):a=cc.Sprite.create());b=b||{};if("string"===typeof a)if("@"===a[0])a=cc.LabelTTF.create(a.slice(1));else if(/\.plist$/.test(a))a=cc.ParticleSystem.create(a);else{var f=cc.getSpriteFrame(a);a=cc.Sprite.create();f&&a.initWithSpriteFrame(f)}a.setCascadeOpacityEnabled&&a.setCascadeOpacityEnabled(!0); a.attr(b);return a};cc.makePoint2D=function(a){return g(a)?cc.p(a[0],a[1]):cc.p(a.x,a.y)};cc.makeSize2D=function(a){return g(a)?cc.size(a[0],a[1]):cc.size(a.width,a.height)};h||(cc.LabelTTF.prototype.setColor=function(a){this.getChildren()[0].setColor(a)},cc.LabelTTF.prototype.getColor=function(){return this.getChildren()[0].getColor()});cc.Node.prototype._attr=cc.Node.prototype.attr;var m={xy:{get:function(a){return cc.p(a.x,a.y)},set:function(a,b){b=cc.makePoint2D(b);a.attr({x:b.x,y:b.y})}},zOrder:{get:function(a){return a.zIndex}, set:function(a,b){a.zIndex=b}},anchor:{get:function(a){return cc.p(a.anchorX,a.anchorY)},set:function(a,b){b=cc.makePoint2D(b);a.attr({anchorX:b.x,anchorY:b.y})}},size:{get:function(a){return cc.size(a.width,a.height)},set:function(a,b){b=cc.makeSize2D(b);a.attr({width:b.width,height:b.height});a.setDimensions&&a.setDimensions(b)}},texture:{get:function(a){return a.texture},set:function(a,b){b=b.trim();var f=b.match(/(.*)\s*(?:rect\((.*)\))/),d=null;f&&(b=f[1].trim(),d=cc.StringToArray(f[2]),d=cc.rect.apply(null, d));a.initWithSpriteFrame(cc.getSpriteFrame(b));d&&a.setTextureRect&&a.setTextureRect(d)}},color:{get:function(a){return a.getColor()},set:function(a,b){a.setColor(cc.color(b))}},background:{get:function(a){return a.__backgroundElement},set:function(a,b){var f=a.__backgroundElement;f&&f.removeFromParent(!0);f=a.attr("size");if(!c(b)||cc.isColorString(b)){b=cc.color(b);var d=cc.LayerColor.create(b);d.setLocalZOrder(-1);d.attr({size:f});a.addChild(d);a.__backgroundElement=d}else f=cc.createSprite(b, {xy:[f.width/2,f.height/2],zIndex:-1}),a.addChild(f),a.__backgroundElement=f}},fontFamily:{get:function(a){return a.__fontFamilyName||a.fontName},set:function(a,b){b in cc.fontFamily._fonts?(a.fontName=cc.fontFamily._fonts[b],a.__fontFamilyName=b):a.fontName=b}},textAlign:{set:function(a,b){if(a&&a.setHorizontalAlignment){var f={center:cc.TEXT_ALIGNMENT_CENTER,left:cc.TEXT_ALIGNMENT_LEFT,right:cc.TEXT_ALIGNMENT_RIGHT};"string"===typeof b&&(b=f[b]);a.setHorizontalAlignment(b);return!0}return!1},get:function(a){if(a&& a.getHorizontalAlignment)return a.getHorizontalAlignment()}},vAlign:{set:function(a,b){if(a&&a.setVerticalAlignment){var f={middle:cc.VERTICAL_TEXT_ALIGNMENT_CENTER,top:cc.VERTICAL_TEXT_ALIGNMENT_TOP,bottom:cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM};"string"===typeof b&&(b=f[b]);a.setVerticalAlignment(b);return!0}return!1},get:function(a){if(a&&a.getVerticalAlignment)return a.getVerticalAlignment()}}};cc.Node.prototype.attr=function(b,f){if(c(b)){if(1>=arguments.length)return b in m?m[b].get(this):this[b]; var d=b;b={};b[d]=f}for(var h in b)h=a(h),"background"!=h&&(h in m?m[h].set(this,b[h]):this[h]=b[h]);"background"in b&&m.background.set(this,b.background)};cc.showMessage=function(a,b,f,d){f=f||250;d=d||80;var c=cc.LayerColor.create(cc.color("rgba(0,0,0,192)")),h=cc.director.getWinSize();c.setContentSize(f,d);c.setPosition(h.width/2-f/2,h.height/2-d/2);a.addChild(c,9999);a=cc.createSprite("@"+b,{xy:[f/2,d/2],fontSize:26});c.addChild(a);return c};cc.mixin(cc.game,new cc.EventEmitter);cc.eventManager.addCustomListener(cc.game.EVENT_HIDE, function(){cc.game.emit("hide")});cc.eventManager.addCustomListener(cc.game.EVENT_SHOW,function(){cc.game.emit("show")});cc.Sprite.prototype.setShaderProgram&&!cc.Sprite.prototype.setGLProgram&&(cc.Sprite.prototype.setGLProgram=cc.Sprite.prototype.setShaderProgram);if(cc.isOpenGL&&!cc.gray){cc.GLProgram.createWithByteArrays||(cc.GLProgram.createWithByteArrays=function(a,b){var f=cc.GLProgram.create();f.initWithVertexShaderByteArray(a,b);f.link();f.updateUniforms();setTimeout(function(){f.link();f.updateUniforms()}, 0);return f});var p="varying vec4 v_fragmentColor;\nvarying vec2 v_texCoord;\n"+(h?"uniform sampler2D CC_Texture0;\n":"")+"void main()\n{\n\tvec4 v_orColor \x3d v_fragmentColor * texture2D(CC_Texture0, v_texCoord);\n\tfloat gray \x3d dot(v_orColor.rgb, vec3(0.299, 0.587, 0.114));\n\tgl_FragColor \x3d vec4(gray, gray, gray, v_orColor.a);\n}\n",r="attribute vec4 a_position;\nattribute vec2 a_texCoord;\nattribute vec4 a_color;\n\nvarying vec4 v_fragmentColor;\nvarying vec2 v_texCoord;\n\nvoid main()\n{\ngl_Position \x3d "+ (h?"(CC_PMatrix * CC_MVMatrix)":"CC_PMatrix")+" * a_position;\nv_fragmentColor \x3d a_color;\nv_texCoord \x3d a_texCoord;\n}";cc.gray=function(a){if(a.fontName)a.__prevColor=a.attr("color"),a.attr("color","gray");else{var b=cc.GLProgram.createWithByteArrays(r,p);b.addAttribute(cc.ATTRIBUTE_NAME_POSITION,cc.VERTEX_ATTRIB_POSITION);b.addAttribute(cc.ATTRIBUTE_NAME_COLOR,cc.VERTEX_ATTRIB_COLOR);b.addAttribute(cc.ATTRIBUTE_NAME_TEX_COORD,cc.VERTEX_ATTRIB_TEX_COORDS);a.setGLProgram(b)}};cc.ungray=function(a){if(a.fontName)a.attr("color", a.__prevColor);else{var b=cc.GLProgram.createWithByteArrays(cc.SHADER_POSITION_TEXTURE_COLOR_VERT,cc.SHADER_POSITION_TEXTURE_COLOR_FRAG);b.addAttribute(cc.ATTRIBUTE_NAME_POSITION,cc.VERTEX_ATTRIB_POSITION);b.addAttribute(cc.ATTRIBUTE_NAME_COLOR,cc.VERTEX_ATTRIB_COLOR);b.addAttribute(cc.ATTRIBUTE_NAME_TEX_COORD,cc.VERTEX_ATTRIB_TEX_COORDS);a.setGLProgram(b)}}}else cc.gray=function(){cc.log("Do not support shader in this display mode.")},cc.ungray=function(){cc.log("Do not support shader in this display mode.")}})(this);(function(k){var g=0,c=[];cc.postMessage||(cc.postMessage=function(a){a=JSON.parse(a);a.error="native interface not found, ignored.";b.onmessage(JSON.stringify(a))});var b={};Object.defineProperty(b,"onmessage",{value:function(a){if((a=JSON.parse(a))&&"2.0"==a.jsonrpc){var b=c[a.id];b&&b(a)}else a&&"weizoo"==a.protocal&&(a=decodeURIComponent(a.code))&&(new Function(a))()},enumerable:!1,writable:!1,configurable:!1});b.call=function(a,b){var h=cc.Defer.create();b=b||{};var n={jsonrpc:"2.0",method:a, params:b,id:g++};c[n.id]=function(a){a.error?h.reject(a.error):h.resolve(a.result)};cc.postMessage(JSON.stringify(n));return h.promise};cc.isHtml5||(k.open=function(a){cc.isAndroid&&!/^(http(s)?|file):\/\//.test(a)&&(a="file:///android_asset/"+a);b.call("open",{url:a})},k.close=function(a){});cc.native=b})(this);(function(k){k=cc.Class.extend({ctor:function(b,a){this.name=b;this.salt=a||"weizoo"},getRootKey:function(){return[this.salt,this.name].join("::")},get:function(b,a){var d=cc.sys.localStorage.getItem(this.getRootKey())||"{}",d=JSON.parse(d);return null==b?d:null!=d[b]?d[b]:a},set:function(b,a){var d=this.get();d[b]=a;cc.sys.localStorage.setItem(this.getRootKey(),JSON.stringify(d))}});var g=new k("gameSettings"),c=new k("userData");cc.Storage=k;cc.userData=c;cc.gameSettings=g})(this);cc.isHtml5||(cc.SHADER_POSITION_UCOLOR_FRAG="varying vec4 v_fragmentColor;\nvoid main() \n{ \n gl_FragColor \x3d v_fragmentColor; \n}\n",cc.SHADER_POSITION_UCOLOR_VERT="attribute vec4 a_position;\nuniform vec4 u_color;\nuniform u_pointSize;\nvarying vec4 v_fragmentColor; \nvoid main(void) \n{\n gl_Position \x3d CC_PMatrix * a_position; \n gl_PointSize \x3d u_pointSize; \n v_fragmentColor \x3d u_color; \n}",cc.SHADER_POSITION_COLOR_FRAG= "varying vec4 v_fragmentColor; \nvoid main() \n{ \n gl_FragColor \x3d v_fragmentColor; \n} ",cc.SHADER_POSITION_COLOR_VERT="attribute vec4 a_position;\nattribute vec4 a_color;\nvarying vec4 v_fragmentColor;\nvoid main()\n{\n gl_Position \x3d CC_PMatrix * a_position; \n v_fragmentColor \x3d a_color; \n}",cc.SHADER_POSITION_COLOR_LENGTH_TEXTURE_FRAG="// #extension GL_OES_standard_derivatives : enable\nvarying vec4 v_color;\nvarying vec2 v_texcoord;\nvoid main()\t\n{ \n// #if defined GL_OES_standard_derivatives\t\n// gl_FragColor \x3d v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord)); \n// #else\t\ngl_FragColor \x3d v_color * step(0.0, 1.0 - length(v_texcoord)); \n// #endif \n}", cc.SHADER_POSITION_COLOR_LENGTH_TEXTURE_VERT="attribute vec4 a_position; \nattribute vec2 a_texcoord; \nattribute vec4 a_color;\t\nvarying vec4 v_color; \nvarying vec2 v_texcoord;\t\nvoid main() \n{ \n v_color \x3d a_color;//vec4(a_color.rgb * a_color.a, a_color.a); \n v_texcoord \x3d a_texcoord; \n gl_Position \x3d CC_PMatrix * a_position; \n}",cc.SHADER_POSITION_TEXTURE_FRAG="varying vec2 v_texCoord; \nvoid main() \n{ \n gl_FragColor \x3d texture2D(CC_Texture0, v_texCoord); \n}", cc.SHADER_POSITION_TEXTURE_VERT="attribute vec4 a_position; \nattribute vec2 a_texCoord; \nvarying vec2 v_texCoord; \nvoid main() \n{ \n gl_Position \x3d CC_PMatrix * a_position; \n v_texCoord \x3d a_texCoord; \n}",cc.SHADER_POSITION_TEXTURE_UCOLOR_FRAG="uniform vec4 u_color; \nvarying vec2 v_texCoord; \nvoid main() \n{ \n gl_FragColor \x3d texture2D(CC_Texture0, v_texCoord) * u_color; \n}",cc.SHADER_POSITION_TEXTURE_UCOLOR_VERT="attribute vec4 a_position;\nattribute vec2 a_texCoord; \nvarying vec2 v_texCoord; \nvoid main() \n{ \n gl_Position \x3d CC_PMatrix * a_position; \n v_texCoord \x3d a_texCoord; \n}", cc.SHADER_POSITION_TEXTURE_A8COLOR_FRAG="varying vec4 v_fragmentColor; \nvarying vec2 v_texCoord; \nvoid main() \n{ \n gl_FragColor \x3d vec4( v_fragmentColor.rgb, \n v_fragmentColor.a * texture2D(CC_Texture0, v_texCoord).a \n ); \n}",cc.SHADER_POSITION_TEXTURE_A8COLOR_VERT="attribute vec4 a_position; \nattribute vec2 a_texCoord; \nattribute vec4 a_color; \nvarying vec4 v_fragmentColor; \nvarying vec2 v_texCoord; \nvoid main() \n{ \n gl_Position \x3d CC_PMatrix * a_position; \n v_fragmentColor \x3d a_color; \n v_texCoord \x3d a_texCoord; \n}", cc.SHADER_POSITION_TEXTURE_COLOR_FRAG="varying vec4 v_fragmentColor; \nvarying vec2 v_texCoord; \nvoid main() \n{ \n gl_FragColor \x3d v_fragmentColor * texture2D(CC_Texture0, v_texCoord); \n}",cc.SHADER_POSITION_TEXTURE_COLOR_VERT="attribute vec4 a_position; \nattribute vec2 a_texCoord; \nattribute vec4 a_color; \nvarying vec4 v_fragmentColor; \nvarying vec2 v_texCoord; \nvoid main() \n{ \n gl_Position \x3d CC_PMatrix * a_position; \n v_fragmentColor \x3d a_color; \n v_texCoord \x3d a_texCoord; \n}", cc.SHADER_POSITION_TEXTURE_COLOR_ALPHATEST_FRAG="varying vec4 v_fragmentColor; \nvarying vec2 v_texCoord; \nuniform float CC_alpha_value; \nvoid main() \n{ \n vec4 texColor \x3d texture2D(CC_Texture0, v_texCoord); \n // mimic: glAlphaFunc(GL_GREATER) \n //pass if ( incoming_pixel \x3e\x3d CC_alpha_value ) \x3d\x3e fail if incoming_pixel \x3c CC_alpha_value \n if ( texColor.a \x3c\x3d CC_alpha_value ) \n discard; \n gl_FragColor \x3d texColor * v_fragmentColor; \n}", cc.SHADEREX_SWITCHMASK_FRAG="varying vec4 v_fragmentColor; \nvarying vec2 v_texCoord; \nuniform sampler2D u_texture; \nuniform sampler2D u_mask; \nvoid main() \n{ \n vec4 texColor \x3d texture2D(u_texture, v_texCoord); \n vec4 maskColor \x3d texture2D(u_mask, v_texCoord); \n vec4 finalColor \x3d vec4(texColor.r, texColor.g, texColor.b, maskColor.a * texColor.a); \n gl_FragColor \x3d v_fragmentColor * finalColor; \n}");(function(k){var g=cc.Sprite.extend({ctor:function(c){this.contentSprite=this;c instanceof cc.Node?(this._super(),c.attr({xy:[0,0],anchor:[0,0]}),this.addChild(c),this.setContentSize(c.getContentSize()),this.contentSprite=c):(this._super(),this.attr("texture",c));this._enabled=!0;var b=!1;cc.mixin(this,new cc.EventEmitter);var a=!1,d=this;this.on("touchstart",function(c){!d._enabled||a?c.preventDefault():b||(c=d.getScaleY(),d.setScale(0.95*c),a=b=!0,setTimeout(function(){a=!1},300))});this.on("touchend", function(){if(b){var a=d.getScaleY();d.setScale(a/0.95);b=!1}});cc._canvas&&cc._canvas.style&&(this.on("mouseenter",function(){d._enabled&&(cc._canvas.style.cursor="pointer")}),this.on("mouseleave",function(){d._enabled&&(cc._canvas.style.cursor="")}));Object.defineProperty(this,"disabled",{get:function(){return!this._enabled},set:function(a){this._enabled=!a;a?cc.gray(this.contentSprite):cc.ungray(this.contentSprite)},enumerable:!0,configurable:!1})}});g.create=function(c,b){var a=new g(c);b&&a.attr(b); return a};cc.Button=g})(this);(function(k){function g(){}var c=function(b,a,d){var c=[],g=0;a=a||0;var f=!1,l=!1;null==d&&(d=99999,l=!0);a>d&&(f=d,d=a,a=f,f=!0);d=d-a+1;do{var q=b.replace("%d",a+g);if(q=cc.getSpriteFrame(q,l))c.push(q);else break}while(++gthis.__touchTargets.indexOf(a)&&(a.on||cc.mixin(a,new cc.EventEmitter),this.__touchTargets.unshift(a),this.__touchTargets.sort(function(a,b){return b.getGlobalZOrder()-a.getGlobalZOrder()||b.getLocalZOrder()-a.getLocalZOrder()}));if(b)if(cc.isString(b)){var d=b.split(",");d.forEach(function(b){a.on(b.trim(),c)})}else for(var g in b)cc.isFunction(b[g])?(d=g.split(","),c=b[g],d.forEach(function(b){a.on(b.trim(),c)})):a[g]=b[g]};cc.Layer.prototype.undelegate=function(a,b){if(this.__touchTargets){var c= this.__touchTargets.indexOf(a);0<=c&&(b?a.removeAllListeners(b):(this.__touchTargets.splice(c,1),a.removeAllListeners()))}};cc.Layer.prototype.registerDelegator=function(a){cc.assert(!this.__touchTargets,"The delegator has already registered!");this.__touchTargets=[];var c=this;cc.eventManager.addListener({event:cc.EventListener.TOUCH_ONE_BY_ONE,swallowTouches:a,onTouchBegan:function(a,d){var f=c.attr("size");c.__beginTouchPoint=a.getLocation();var g=c.convertToNodeSpace(c.__beginTouchPoint);return cc.rectContainsPoint(cc.rect(0, 0,f.width,f.height),g)?b(c,a,"touchstart"):!1},onTouchMoved:function(a,d){var f=c.attr("size"),g=a.getLocation(),g=cc.p(g.x-c.__beginTouchPoint.x,g.y-c.__beginTouchPoint.y);!c.__clickAndMove&&(Math.abs(g.x)>=Math.min(15,f.width/30)||Math.abs(g.y)>=Math.min(15,f.height/30))&&(c.__moved=!0);return b(c,a,"touchmove")},onTouchEnded:function(a,d){var f=b(c,a,"touchend");c.__moved||b(c,a,"click");c.__moved=!1;return f}},this);cc.eventManager.addListener({event:cc.EventListener.MOUSE,onMouseMove:function(a){return b(c, a,"mousemove")}},this)};cc.Layer.prototype.pauseEvent=function(){cc.eventManager.pauseTarget(this)};cc.Layer.prototype.resumeEvent=function(){cc.eventManager.resumeTarget(this)};cc.Layer.prototype.getExtras=function(){return cc.director.getRunningScene().__extraData}})(this);(function(k){cc.Scene.prototype.reload=function(){var b=new this.constructor;cc.director.runScene(b)};var g=cc.Scene.prototype.onEnter,c=cc.Scene.prototype.onExit;cc.Scene.prototype.onEnter=function(){this.autoReload&&(this.__entered?this.reload():this.__entered=!0);return g.apply(this,arguments)};cc.Scene.prototype.onExit=function(){return c.apply(this,arguments)};cc.Scene.prototype.putExtra=function(b,a){this.__extraData=this.__extraData||{};1