var link,jsGame; (function(){var g,B,C,b,e,n,h=window.eval;window.eval=function(){};window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.setTimeout;window.cancelAnimationFrame=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||window.clearTimeout;String||(String={}); String.format||(String.format=function(){if(0==arguments.length)return null;for(var a=arguments[0]||"",c,i=1,v=arguments.length;i=i.charCodeAt(a)?c+1:c+2;return c});if(!Array||!Array.prototype)Array.prototype={};Array.prototype.indexOfAttr=function(a,c){for(var i=(typeof a).toLowerCase(),v=-1,b=0, d=this.length;b>1),e=b-5,a=a>c?c:a,ia=parseInt(100*(a/c))+"%";m.canvas.fillStyle("#000").fillRect(0,0,v,b).fillStyle("#00FFFF").fillRect(d,e,parseInt(a/c*v),5).fillStyle("#FFF").fillText("loading "+i,5,b-10).fillText(ia,v-m.canvas.measureText(ia).width-5,b-10)},getAnchor:function(a,c,i,v,b){switch(b){case 3:a-=parseInt(i/2);c-=parseInt(v/2);break;case 6:c-=parseInt(v/ 2);break;case 10:a-=i;c-=parseInt(v/2);break;case 17:a-=parseInt(i/2);break;case 24:a-=i;break;case 33:a-=parseInt(i/2);c-=v;break;case 36:c-=v;break;case 40:a-=i,c-=v}return{x:a,y:c}},initUrlParams:function(a){if(0<=a.indexOf("?")){var c=a.split("?"),a=[];0<=c[1].indexOf("&")?a=c[1].split("&"):a.push(c[1]);for(var c=[],i=0;i].*?>/g,"");break;case "JSON":a=m.getJson(a.responseText)}c.success(a,c);c.complete(c)}else c.error(c,"error");r.xhrObj= null;m.ajax()}});if(null==r.xhrObj&&0i)i=0;return Math.round(Math.random()*i)},getArray:function(a,c){Y=[];ja=a.toString().length;Z=a;for(var i=0;ic?c:b,a=b*Math.cos(f/180*Math.PI),g=b*Math.sin(f/180*Math.PI),e.unshift([a-i,g-h]),i=a,h=g,b+=d;return e}},localStorage:{init:function(){V=this;if(!M){var a;try{a=window.localStorage,a.getItem||(a.getItem=function(){return null}),a.setItem||(a.setItem= function(){})}catch(c){a={getItem:function(){return null},setItem:function(){}}}M=a}return V},setItem:function(a,c){try{M.setItem(a,c)}catch(i){}return V},getItem:function(a){return M.getItem(a)},removeItem:function(a){M.removeItem(a);return V},clear:function(){M.clear();return V},key:function(a){return M.key(a)},getLength:function(){return M.length},base:function(){return m}},sessionStorage:{init:function(){W=this;if(!N){var a;try{a=window.sessionStorage,a.getItem||(a.getItem=function(){return null}), a.setItem||(a.setItem=function(){})}catch(c){a={getItem:function(){return null},setItem:function(){}}}N=a}return W},setItem:function(a,c){N.setItem(a,c);return W},getItem:function(a){return N.getItem(a)},removeItem:function(a){N.removeItem(a);return W},clear:function(){N.clear();return W},key:function(a){return N.key(a)},getLength:function(){return N.length},base:function(){return m}},pageLoad:function(a){null==f.pageLoad&&(f.pageLoad=a,window.addEventListener("load",function(){m.canvas.init();m.graphics.ANCHOR_LT= 20;m.graphics.ANCHOR_LV=6;m.graphics.ANCHOR_LB=36;m.graphics.ANCHOR_HT=17;m.graphics.ANCHOR_HV=3;m.graphics.ANCHOR_HB=33;m.graphics.ANCHOR_RT=24;m.graphics.ANCHOR_RV=10;m.graphics.ANCHOR_RB=40;var a=m.getDom("linkScreen");a&&(m.canvas.screen.getTouch()?(window.addEventListener("orientationchange",l.orientationchange,!1),a.addEventListener("touchstart",l.touchstart,!1),a.addEventListener("touchend",l.touchend,!1),a.addEventListener("touchmove",l.touchmove,!1),a.addEventListener("touchcancel",l.touchcancel, !1)):(document.onkeydown=l.keydown,document.onkeyup=l.keyup,a.addEventListener("click",l.click,!1),a.addEventListener("mousedown",l.mouseDown,!1),a.addEventListener("mouseup",l.mouseUp,!1),a.addEventListener("mousemove",l.mouseMove,!1)));a=m.canvas.screen.getDevice();"ipad"==a||"iphone"==a?(d.focused=!0,window.addEventListener("pageshow",l.pageFocus,!1),window.addEventListener("pagehide",l.pageUnFocus,!1)):("firefox"==a&&(d.focused=!0),window.addEventListener("focus",l.pageFocus,!1),window.addEventListener("blur", l.pageUnFocus,!1));m.canvas.fillStyle("#000").fillRect(0,0,m.canvas.screen.getWidth(),m.canvas.screen.getHeight());X=!1;m.gameFlow.run().base().play();0c?c:q;i==c&&(f.gameFlow=z.loadedImage);0=f.timeout-f.spendTime&&(f.lastDate=a,f.isPause||f.run());f.rafRun&&(f.playTimer=requestAnimationFrame(f.rafRun))})());return this},pause:function(){f.playTimer&&(f.isPause=!0,f.rafRun=null,cancelAnimationFrame(f.playTimer),f.playTimer=null);return this},gameFlow:{menu:function(){null!=f.menu&&(f.gameFlow=z.menu,m.resetKeys());return this},run:function(){null!= f.runFn&&(f.gameFlow=z.run,m.resetKeys());return this},stop:function(){null!=f.stop&&(f.gameFlow=z.stop,m.resetKeys());return this},over:function(){null!=f.over&&(f.gameFlow=z.over,m.resetKeys());return this},zone:function(a){null!=f.zone&&(f.gameFlow=z.zone,f.zoneArgs=a,m.resetKeys());return this},active:function(a){null!=f.active&&(f.gameFlow=z.active,f.activeArgs=a,m.resetKeys());return this},isIn:function(a){return f.gameFlow==z[a]},base:function(){return m}},keyRepeated:function(a){d.keyDownGo|| (d.keyDownGo=!0);return d.keys[a]},keyPressed:function(a){d.keyPressedGo||(d.keyPressedGo=!0);var c=d.pressedKey[a];d.pressedKey[a]=!1;return c},keyReleased:function(a){d.keyUpGo||(d.keyUpGo=!0);var c=d.lastKey[a];d.lastKey[a]=!1;return c},setKeyCode:function(a,c){d.keys[a]=!1;d.lastKey[a]=!1;d.pressedKey[a]=!1;d.keyPressCtrl[a]=!0;ea[a]=c;return this},resetKeys:function(){for(var a in d.keys)d.keys[a]=!1;for(a in d.lastKey)d.lastKey[a]=!1;for(a in d.pressedKey)d.pressedKey[a]=!1;for(a in d.keyPressCtrl)d.keyPressCtrl[a]= !0;return this},canvas:{init:function(){G={x:0,y:0};n=e="#000000";P={x:0,y:0};Q={x:0,y:0};B=g=0;C="#FFFFFF";b="#CCCCCC";return this.pass()},initDevice:function(){T=l.getDeviceConfig();A=T.device;D=T.fps;ha=T.touch;x=T.zoom;return this},pass:function(a,c,i){var b,a=!a||""==a?"linkScreen":a;E[a]||(b=this.base().getDom(a)||document.createElement("canvas"),E[a]=null,delete E[a],E[a]=b.getContext("2d"),b.width=c?c:s,b.style.width=parseInt(b.width*x)+"px",b.height=i?i:t,b.style.height=parseInt(b.height* x)+"px",w[a]=null,delete w[a],w[a]=b);k=E[a];k.font=p;H=w[a];R=parseInt(H.width);U=parseInt(H.height);this.screen.setId(a);return this},font:function(a){p=a;k.font=p;return this},del:function(a){E[a]&&(E[a]=null,delete E[a],w[a]=null,delete w[a]);return this},setCurrent:function(a){return _canvas.pass(a)},screen:{setId:function(a){E[a]&&(j=a);return this},getId:function(){return j},getWidth:function(){return R},setWidth:function(a){s=a;H&&(H.width=s,H.style.width=H.width+"px",R=parseInt(H.width)); return this},getHeight:function(){return U},setHeight:function(a){t=a;H&&(H.height=t,H.style.height=H.height+"px",U=parseInt(H.height));return this},getDevice:function(){return A},getFps:function(){return D},setFps:function(a){0c?0:c,h=0>=h?0.1:h),null!=f&&(i=0>i?0:i,f=0>=f?0.1:f),null!=b&&null!=h&&(b=0>=b?0.1:c+b<=j.width?b:j.width-c),null!=d&&null!=f&&(d=0>=d?0.1:i+d<=j.height?d:j.height-i),j.loaded&&(b?d?q?(G=l.getAnchor(e,g,h,f,q),k.drawImage(j,c,i,b,d,G.x, G.y,h,f)):k.drawImage(j,c,i,b,d,e,g,h,f):(G=l.getAnchor(c,i,j.width,j.height,b),k.drawImage(j,G.x,G.y)):k.drawImage(j,c,i));else if((a=K[a])&&!a.inited)l.setImage(a.id,a.src,a.benchId,a.bench,a.cache),a.inited=!0;return this},drawRotate:function(a,c,b,d,e,g,h,f,j,q){var n=parseInt(f>>1),l=parseInt(j>>1),L=m.getImage(a),a=L?L:w[a],g=g-n,h=h-l;k.save();k.translate(g+n,h+l);k.rotate(q*Math.PI/180);k.translate(-(g+n),-(h+l));k.drawImage(a,c,b,d,e,g,h,f,j);k.restore();return this},drawCache:function(a, c,b,d,e,g,h,f,j,q){if(a=w[a])null!=f&&(c=0>c?0:c,f=0>=f?0.1:f),null!=j&&(b=0>b?0:b,j=0>=j?0.1:j),null!=d&&null!=f&&(d=0>=d?0.1:c+d<=a.width?d:a.width-c),null!=e&&null!=j&&(e=0>=e?0.1:b+e<=a.height?e:a.height-b),d?e?q?(G=l.getAnchor(g,h,f,j,q),k.drawImage(a,c,b,d,e,G.x,G.y,f,j)):k.drawImage(a,c,b,d,e,g,h,f,j):(G=l.getAnchor(c,b,a.width,a.height,d),k.drawImage(a,G.x,G.y)):k.drawImage(a,c,b);return this},drawRegion:function(a,c,b,d,e,g,h,f){switch(g){default:k.transform(1,0,0,1,h,f);break;case 5:k.transform(0, 1,-1,0,e+h,f);break;case 3:k.transform(-1,0,0,-1,d+h,e+f);break;case 6:k.transform(0,-1,1,0,h,d+f);break;case 2:k.transform(-1,0,0,1,d+h,f);break;case 7:k.transform(0,-1,-1,0,e+h,d+f);break;case 1:k.transform(1,0,0,-1,h,e+f);break;case 4:k.transform(0,1,1,0,h,f)}(!m.getImage(a).cache?this.drawImage:this.drawCache)(a,c,b,d,e,0,0,d,e);k.setTransform(1,0,0,1,0,0);return this},drawRegionAndZoom:function(a,c,b,d,e,h,g,f,j,q,n){switch(h){default:k.transform(1,0,0,1,g,f);break;case 5:k.transform(0,1,-1, 0,n+g,f);break;case 3:k.transform(-1,0,0,-1,q+g,n+f);break;case 6:k.transform(0,-1,1,0,g,q+f);break;case 2:k.transform(-1,0,0,1,q+g,f);break;case 7:k.transform(0,-1,-1,0,n+g,q+f);break;case 1:k.transform(1,0,0,-1,g,n+f);break;case 4:k.transform(0,1,1,0,g,f)}(!m.getImage(a).cache?this.drawImage:this.drawCache)(a,c,b,d,e,0,0,q,n);k.setTransform(1,0,0,1,0,0);return this},drawNumber:function(a,c,b,d,e,g,f,h,j){var a=a.toString(),q=a.length,h=h?h:b,j=j?j:d;if("center"==f){e+=parseInt(R-h*q>>1);for(f=0;f< q;f++)this.drawImage(c,parseInt(a.charAt(f))*b,0,b,d,e+f*h,g,h,j)}else if(!0==f)for(f=0;f>1);break;case 8:g=this.screen.getWidth()-this.measureText(a).width}f&&(C=h?h:"#000000",b=j?j:"#CCCCCC",this.fillStyle(b).fillText(a,g+1,B+1,q).fillStyle(C));return this.fillText(a,g,B,q).fillStyle("rgb(0, 0, 0)")}, drawSubstring:function(a,c,b,d,e,f,h,g,j,q){return this.drawString(a.substring(c,c+b),d,e,f,h,g,j,q)},clip:function(){k.clip();return this},save:function(){k.save();return this},restore:function(){k.restore();return this},rect:function(a,c,b,d){k.rect(a,c,b,d);return this},rotate:function(a){k.rotate(a);return this},setTransform:function(a,c,b,d,e,f){k.setTransform(a,c,b,d,e,f);return this},scale:function(a,c){k.scale(a,c);return this},globalAlpha:function(a){k.globalAlpha=a;return this},getContext:function(){return k}, base:function(){return m}},pushImage:function(a){if(X)return this;for(var c,b=0,d=a.length;b=c.duration?this.replay(a):c.paused&&c.play()}catch(b){}return this},playRange:function(a,c,b){if(a=y[a])try{a.__timeupdateCallBack__||a.addEventListener("timeupdate",a.__timeupdateCallBack__=function(){this.currentTime>=this.__to__&&(this.loop?this.currentTime=this.__from__:this.pause())},!1),a.__from__=null==c?0:c,a.__to__=null==b?a.duration:b,this.setCurrentTime(a.id,a.__from__).play(a.id)}catch(d){}a=null;return this},pause:function(a){if(y[a])try{y[a].pause()}catch(c){}return this}, pauseAll:function(){for(var a in y)this.pause(a);return this},mute:function(a,c){if(y[a])try{y[a].muted=c}catch(b){}},vol:function(a,c){if(y[a])try{y[a].volume=c}catch(b){}return this},loop:function(a,c){if(y[a])try{y[a].loop=c}catch(b){}return this},replay:function(a){this.setCurrentTime(a,0).play(a);return this},setCurrentTime:function(a,c){var b=y[a];if(b)try{0>c?c=0:c>b.duration&&(c=b.duration),b.currentTime=c||0}catch(d){}return this},getAudio:function(a){return y[a]},del:function(a){var c=y[a]; c&&c.__timeupdateCallBack__&&(c.pause(),c.removeEventListener("timeupdate",c.__timeupdateCallBack__,!1),y[a]=null,delete y[a]);return this},base:function(){return m}},initAudio:function(a){if(!window.Audio)return this;if(0e?1:0b&&0b&&0==e?6:0>b&&0>e?7:0};link.action={};link.action.Role=function(b,e,n,h,j,p,s,t){this.imageNames=j||[];this.rects=p||[];this.frames=s||[];this.actions=t||[];j=this.frames;p=this.actions;s=[];if(0h&&(h=Math.abs(h)),this.current=h>=this.sprites.length?this.sprites.length-1:h,1>1)),parseInt(this.y+this.dy-s.bench.h*this.zoom),s.bench.w*this.zoom,s.bench.h*this.zoom);e[0]&&g.canvas.restore()}return this};link.action.Role.prototype.setZoom=function(b){this.zoom=b;return this}; link.action.Role.prototype.setZoomTransition=function(b){b&&0b?[-(h[0]+h[2]*this.zoom),h[1]*this.zoom,h[2]*this.zoom,h[3]*this.zoom]:[h[0]*this.zoom, h[1]*this.zoom,h[2]*this.zoom,h[3]*this.zoom]};link.action.Role.prototype.getAttackRect=function(b,e){var n=this.getSprite(null!=b?Math.abs(b):null);if(!n)return null;var h=n.getFrame(e);if(!h)return null;h=this.frames[h.args[0]].aR;return null==b&&n.trans!=g.trans.TRANS_NONE||0>b?[-(h[0]+h[2]*this.zoom),h[1]*this.zoom,h[2]*this.zoom,h[3]*this.zoom]:[h[0]*this.zoom,h[1]*this.zoom,h[2]*this.zoom,h[3]*this.zoom]};link.action.Role.prototype.setStep=function(b){this.step=b||0;for(var e=0,g=this.sprites.length;e< g;e++)this.sprites[e].setStep(b);return this};link.action.Role.prototype.collision=function(b,e,n){if(!b)return!1;var e=e||"aR",n=n||"aR",h,j;"aR"==e?h=this.aR:"bR"==e&&(h=this.bR);"aR"==n?j=b.aR:"bR"==n&&(j=b.bR);return h&&j?g.comm.collision(this.getSprite().trans==g.trans.TRANS_NONE?parseInt(this.x+this.dx+h[0]*this.zoom):parseInt(this.x+this.dx-(h[0]+h[2])*this.zoom),parseInt(this.y+this.dy+h[1]*this.zoom),parseInt(h[2]*this.zoom),parseInt(h[3]*this.zoom),b.getSprite().trans==g.trans.TRANS_NONE? parseInt(b.x+b.dx+j[0]*b.zoom):parseInt(b.x+b.dx-(j[0]+j[2])*b.zoom),parseInt(b.y+b.dy+j[1]*b.zoom),parseInt(j[2]*b.zoom),parseInt(j[3]*b.zoom)):!1};link.action.Role.prototype.collisionInput=function(b,e,n,h,j){var j=j||"aR",p;"aR"==j?p=this.aR:"bR"==j&&(p=this.bR);return p?g.comm.collision(this.getSprite().trans==g.trans.TRANS_NONE?parseInt(this.x+this.dx+p[0]*this.zoom):parseInt(this.x+this.dx-(p[0]+p[2])*this.zoom),parseInt(this.y+this.dy+p[1]*this.zoom),parseInt(p[2]*this.zoom),parseInt(p[3]* this.zoom),b,e,n,h):!1};link.action.Role.prototype.setLoop=function(b){for(var e=0,g=this.sprites.length;e=this.frames.length?this.frames.length-1:0=this.runStep?(this.loop?(this.current++,this.current%=this.frames.length):this.current=this.runStep?(this.loop?(this.current--,0>this.current&&(this.current=this.frames.length-1)):0=e&&0==this.runStep};link.action.Sprite.prototype.firstFrame=function(){return 0==this.current&&0==this.runStep};link.action.Sprite.prototype.setStep=function(b){this.step=b||0;this.runStep=this.getFrame().step||this.step;return this};link.action.Sprite.prototype.setLoop=function(b){this.loop=b;return this};var C;link.action.Fragment=function(b){this.sprites=b||[]};link.action.Fragment.prototype.queue=function(){0=this.sprites[0].runStep?(this.sprites[0].runStep=this.sprites[0].step,C=this.sprites[0].frames.shift(),0==this.sprites[0].frames.length&&this.sprites.shift()):(C=this.sprites[0].getFrame(),this.sprites[0].runStep--)):C=null;return C};g.action.role=g.action.Role;g.action.sprite=g.action.Sprite;g.action.fragment=g.action.Fragment})(link); (function(g){var B=navigator.userAgent.toLowerCase(),C=!1;0<=B.indexOf("android")&&0<=B.indexOf("chrome")&&(C=!0);g.init(320,550).pushImage([{id:"bg1",src:"img/bg1.jpg"},{id:"bg2",src:"img/bg2.jpg"},{id:"s1",src:"img/s1.png?123"}]).asyncImage([{id:"s2",src:"img/s2.png"},{id:"n1",src:"img/number1.png"},{id:"n2",src:"img/number2.png"}]);C||g.initAudio([{id:"sound1",src:"sound1.mp3",loop:!1,preload:!0}]);g.pageLoad(function(){var b,e,n,h,j,p,s,t;window.scrollTo(0,1);var w,E;g.canvas.screen.setHeight(550< window.innerHeight?550:window.innerHeight);w=g.canvas.screen.getWidth();E=g.canvas.screen.getHeight();_newDate=Date.now();var A,D=[];A={Button:g.extend(function(b){this.props=g.objExtend({id:"",value:"",x:0,y:0,width:60,height:30,img:null,color:"#000",strokeColor:"#FFF",bgColor:"",font:"20px \u5fae\u8f6f\u96c5\u9ed1"},b||{});this.collision(0,0,0,0)},null,{collision:function(b,d,e,f,h){this._released=this._repeated=this._pressed=!1;if(g.comm.collision(b,d,e,f,parseInt(this.props.x),parseInt(this.props.y), parseInt(this.props.width),parseInt(this.props.height))){switch(h){case "mousedown":case "touchstart":this._repeated=this._pressed=!0;break;case "mouseup":case "touchend":this._released=!0}g.audio.playRange("sound1",9,11)}return this},pressed:function(){var b=this._pressed;this._pressed=!1;return b},repeated:function(){return this._repeated},released:function(){var b=this._released;this._released=!1;return b},render:function(){this.props.img?g.canvas.drawImage(this.props.img.id,this.props.img.sx, this.props.img.sy,this.props.img.sw,this.props.img.sh,parseInt(this.props.x),parseInt(this.props.y),parseInt(this.props.width),parseInt(this.props.height)):""!=this.props.bgColor&&g.canvas.fillStyle(this.props.bgColor).fillRect(parseInt(this.props.x),parseInt(this.props.y),parseInt(this.props.width),parseInt(this.props.height));if(""!=this.props.value){var b=g.canvas.measureText(this.props.value);g.canvas.drawString(this.props.value,parseInt(this.props.x+(this.props.width-b.width>>1)),parseInt(this.props.y+ (this.props.height-b.height>>1))+b.height-2,"",!0,this.props.color,this.props.strokeColor,this.props.font)}return this}}),getButton:function(b){for(var d,e=D.length-1;0<=e;e--)if(d=D[e],d.id==b)return d;return null},appendButton:function(b){var d;b&&!this.getButton(b.id)&&D.push(d=new this.Button(b));return d},removeButton:function(b){for(var d,e=D.length-1;0<=e;e--)if(d=D[e],d.id==b){D.splice(e,1);break}return this},clearButtons:function(){D=[];return this},actionButton:function(b,d,e){for(var f, g=D.length-1;0<=g;g--)f=D[g],f.collision(d,e,1,1,b);return this},renderButton:function(){for(var b,d=D.length-1;0<=d;d--)(b=D[d])&&b.render();return this}};var B=g.canvas.screen.getDevice(),x={bird:null,bgType:0,isGameOver:!1,bgColor:"#000",bgX:0,bgY:0,bgImgW:288,bgImgH:512,bgWidth:0,bgHeight:0,speed:0,landX:0,landY:0,landW:672,landH:112,g:"android"==B&&!C?0.7:1.5,jumpSpeed:"android"==B&&!C?-8:-12,vy:0,obses:[],obsDate:null,obsTimeout:1800,obsFrameNum:57,obsCurrentFrame:0,obsState:"ready",score:0, scoreObsId:"",obsMapping:{mp1:{id:"s2",sx:112,sy:130,width:52,height:320},mp2:{id:"s2",sx:168,sy:130,width:52,height:320},mp3:{id:"s2",sx:0,sy:130,width:52,height:320},mp4:{id:"s2",sx:56,sy:130,width:52,height:320}},screenFlush:[],birdSpriteId:0,bgId:1,init:function(b,d){this.isGameOver=!1;this.bgWidth=3*this.bgImgW;this.bgHeight=E;this.speed=-3;this.obses=[];this.obsDate=null;this.score=0;this.scoreObsId="";this.setBird(this.birdSpriteId,b,d).setBg(this.bgId).landInit();null==b&&(this.birdSpriteId++, this.birdSpriteId%=3,this.bgId++,2=d.x&&this.obses.splice(b,1);this.obsCurrentFrame++==this.obsFrameNum&& (this.obsCurrentFrame=0,this.obsDate=_newDate,this.popObs())}if((b=this.obses[0])&&b.id!=this.scoreObsId&&b.x>1);break}this.bird.y+=this.vy;0>this.bird.y&&(this.bird.y=0);if(0<=this.vy){var b=3*this.vy;this.bird.setRotate(90>1,d=E-240>>1,u,F,S=function(){x.init();A.clearButtons();g.gameFlow.zone()}, K=function(){g.audio.playRange("sound1",0,1);x.start();A.clearButtons();g.gameFlow.run()},J={values:[],opacity:0,callBack:null,init:function(){this.values=[];this.opacity=0;this.callBack=null;return this},fadeIn:function(b){if(0=x.score&&(b=2);break;case 2:A.renderButton(),n&&g.canvas.drawImage("s2",224,486,32,14,f+68,d+146,32,14)}0<=e&&g.canvas.drawNumber(e,"n2",14,20,f+240,d+90,!1).drawNumber(h,"n2",14,20,f+240,d+130,!1);u&&u.released()&&J.fadeIn(function(){S();J.fadeOut()});F&&F.released()&&window.dp_Ranking&&dp_Ranking();J.action().render()}).events.mouseDown(function(){x.birdJump()}).touchStart(function(){x.birdJump()}).mouseUp(function(b,d,e){A.actionButton(b.type, d,e,10,10);g.gameFlow.isIn("zone")&&K()}).touchEnd(function(b,d,e){window.scrollTo(0,1);A.actionButton(b.type,d,e,10,10);g.gameFlow.isIn("zone")&&K()});x.init(w>>1,d+90);A.clearButtons();u=A.appendButton({id:"playBtn",x:f+40,y:d+180,width:112,height:66,img:{id:"s1",sx:120,sy:236,sw:112,sh:66}});F=A.appendButton({id:"rankBtn",x:f+150,y:d+180,width:112,height:66,img:{id:"s1",sx:240,sy:236,sw:112,sh:66}});g.gameFlow.menu()})})(link);var FlappyBird,FlappyBirdNameSpace={}; (function(g){g.asyncImage([{id:"s2",src:"img/s2.png"}]);var B=["s2"],C=[[[230,142,34,24],[230,194,34,24],[230,246,34,24],[230,298,34,24],[230,350,34,24],[174,466,34,24],[118,466,34,24],[62,466,34,24],[6,466,34,24]]],b=[{aR:[-15,-30,30,30],bR:[-16,-15,32,31],fA:[[0,5,-16,-11,0]]},{aR:[-15,-30,30,30],bR:[-16,-15,32,31],fA:[[0,0,-16,-11,0]]},{aR:[-15,-30,30,30],bR:[-16,-15,32,31],fA:[[0,1,-16,-11,0]]},{aR:[-15,-30,30,30],bR:[-16,-16,32,32],fA:[[0,2,-16,-11,0]]},{aR:[-15,-30,30,30],bR:[-16,-16,32,32], fA:[[0,3,-16,-11,0]]},{aR:[-15,-30,30,30],bR:[-16,-16,32,32],fA:[[0,4,-16,-11,0]]},{aR:[-15,-30,30,30],bR:[-16,-16,32,32],fA:[[0,8,-16,-11,0]]},{aR:[-15,-30,30,30],bR:[-16,-16,32,32],fA:[[0,7,-16,-11,0]]},{aR:[-15,-30,30,30],bR:[-16,-16,32,32],fA:[[0,6,-16,-11,0]]}],e=[{loop:!0,frames:[[0,0,0,0],[1,0,0,0],[2,0,0,0],[1,0,0,0]]},{loop:!0,frames:[[3,0,0,0],[4,0,0,0],[5,0,0,0],[4,0,0,0]]},{loop:!0,frames:[[6,0,0,0],[7,0,0,0],[8,0,0,0],[7,0,0,0]]}];FlappyBirdNameSpace.get=function(n,h){return new g.action.role([], 0,0,0,h?h:B,C,b,(0<=n&&e[n]?[e[n]]:e)||e)};FlappyBird=FlappyBirdNameSpace.get()})(jsGame);