text: var extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},__extends=function(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;r>n;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},__rest=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},__decorate=function(e,t,n,r){var o,i=arguments.length,a=3>i?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(3>i?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},__param=function(e,t){return function(n,r){t(n,r,e)}},__metadata=function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},__awaiter=function(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{u(r.next(e))}catch(t){i(t)}}function c(e){try{u(r["throw"](e))}catch(t){i(t)}}function u(e){e.done?n(e.value):o(e.value).then(a,c)}u((r=r.apply(e,t||[])).next())})},__generator=function(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(a=2&n[0]?i["return"]:n[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=t.call(e,u)}catch(r){n=[6,r],i=0}finally{o=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,a,c,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return c={next:n(0),"throw":n(1),"return":n(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c},__exportStar=function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||__createBinding(t,e,n)},__createBinding=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-->0)&&!(r=i.next()).done;)a.push(r.value)}catch(c){o={error:c}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a},__spread=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e},__spreadArrays=function(){for(var e=0,t=0,n=arguments.length;n>t;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;n>t;t++)for(var i=arguments[t],a=0,c=i.length;c>a;a++,o++)r[o]=i[a];return r},__await=function(e){return this instanceof __await?(this.v=e,this):new __await(e)},__asyncGenerator=function(e,t,n){function r(e){l[e]&&(s[e]=function(t){return new Promise(function(n,r){f.push([e,t,n,r])>1||o(e,t)})})}function o(e,t){try{i(l[e](t))}catch(n){u(f[0][3],n)}}function i(e){e.value instanceof __await?Promise.resolve(e.value.v).then(a,c):u(f[0][2],e)}function a(e){o("next",e)}function c(e){o("throw",e)}function u(e,t){e(t),f.shift(),f.length&&o(f[0][0],f[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,l=n.apply(e,t||[]),f=[];return s={},r("next"),r("throw"),r("return"),s[Symbol.asyncIterator]=function(){return this},s},__asyncDelegator=function(e){function t(t,o){n[t]=e[t]?function(n){return(r=!r)?{value:__await(e[t](n)),done:"return"===t}:o?o(n):n}:o}var n,r;return n={},t("next"),t("throw",function(e){throw e}),t("return"),n[Symbol.iterator]=function(){return this},n},__asyncValues=function(e){function t(t){r[t]=e[t]&&function(r){return new Promise(function(o,i){r=e[t](r),n(o,i,r.done,r.value)})}}function n(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=e[Symbol.asyncIterator];return o?o.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),r={},t("next"),t("throw"),t("return"),r[Symbol.asyncIterator]=function(){return this},r)},__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},__setModuleDefault=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t},__importStar=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t},__importDefault=function(e){return e&&e.__esModule?e:{"default":e}},__classPrivateFieldGet=function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)},__classPrivateFieldSet=function(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n},__reflect=function(e,t,n){e.__class__=t,n?n.push(t):n=[t],e.__types__=e.__types__?n.concat(e.__types__):n};!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){n(1),n(2),n(0),n(3),n(4),n(5);var r=function(e){function t(){var t=e.call(this)||this;return t.gameSceneStart(),t}return __extends(t,e),t.prototype.gameSceneStart=function(){this.scene=new SceneManager(this),this.event=new egret.EventDispatcher,this.scene.onStart()},t.prototype.touchLock=function(){SceneManager.mainScene.touchEnabled=!1},t.prototype.touchUnlock=function(){SceneManager.mainScene.touchEnabled=!0},t}(egret.DisplayObjectContainer);window.Main=r,__reflect(r.prototype,"Main",[])},function(e,t){var n=function(e){function t(t){var n=e.call(this)||this;return n.createAwl(t),n}return __extends(t,e),t.prototype.createAwl=function(e){this.image=new egret.Bitmap,this.image.texture=RES.getRes("awl_png"),this.image.y=SceneManager.STAGE_ONE_WIDTH-2.8*this.image.height,this.image.x=e,this.addChild(this.image)},t.prototype.update=function(){this.deleteAwl()||(this.image.x-=1*t.SPEED,this.isCollisionToCharacter())},t.prototype.deleteAwl=function(){return this.image.x<-this.image.width?(this.destroy(),!0):!1},t.prototype.isCollisionToCharacter=function(){var e=new egret.Rectangle(this.image.x+5,this.image.y+5,this.image.width-10,this.image.height-10),t=new egret.Rectangle(SceneManager.mainScene.character.sprite.x+80,SceneManager.mainScene.character.sprite.y,Runner.CHARACTER_WIDTH,Runner.CHARACTER_HEIGHT);e.intersects(t)&&SceneManager.mainScene.event.dispatchEventWith("COLLISION")},t.prototype.destroy=function(){this.parent&&this.image&&(this.parent.removeChild(this),this.removeChild(this.image))},t.prototype.boundTest=function(e,t,n,r){var o=new egret.Shape;return o.graphics.beginFill(16711680),o.graphics.drawRect(e,t,n,r),o.graphics.endFill(),this.addChild(o),o},t.SPEED=3,t}(egret.DisplayObjectContainer);window.Awl=n,__reflect(n.prototype,"Awl",[])},function(e,t){var n=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.getResource=function(e){this.image=new egret.Bitmap,this.image.texture=RES.getRes(e),this.createBG()},Object.defineProperty(t.prototype,"imageY",{set:function(e){this.image.y=e},enumerable:!1,configurable:!0}),t.prototype.createBG=function(){this.image.fillMode=egret.BitmapFillMode.REPEAT,this.image.width*=3,this.addChild(this.image)},t.prototype.update=function(){this.image.x<=-SceneManager.STAGE_ONE_WIDTH&&(this.image.x=0),this.image.x-=1*t.SPEED},t.SPEED=3,t}(egret.DisplayObjectContainer);window.BackgroundObject=n,__reflect(n.prototype,"BackgroundObject",[])},function(e,t){var n=function(){function e(){}return e.prototype.loadMainResource=function(e,t){return __awaiter(this,void 0,void 0,function(){var n,r,o;return __generator(this,function(i){switch(i.label){case 0:n=0,r=e,i.label=1;case 1:return n<r.length?(o=r[n],[4,this.loadResource(o,t)]):[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},e.prototype.loadResource=function(e,t){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,RES.loadConfig(t,"resource/")];case 1:return r.sent(),[4,RES.loadGroup(e,0)];case 2:return r.sent(),console.log("Load Complete!! ["+t+"]"+e),[3,4];case 3:return n=r.sent(),console.error(n),[3,4];case 4:return[2]}})})},e.prototype.createMovieClip=function(e,t,n){var r=new egret.MovieClipDataFactory(RES.getRes(e),RES.getRes(t)),o=new egret.MovieClip(r.generateMovieClipData(n));return o},e}();window.ResourceLoader=n,__reflect(n.prototype,"ResourceLoader",[])},function(e,t){var n=function(e){function t(){var t=e.call(this)||this;return t.createSprite(),t.addEvent(),t}return __extends(t,e),t.prototype.addEvent=function(){SceneManager.mainScene.stage.addEventListener(egret.TouchEvent.TOUCH_TAP,this.jump,this),SceneManager.mainScene.event.addEventListener("COLLISION",this.die,this)},t.prototype.removeEvent=function(){SceneManager.mainScene.stage.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.jump,this),SceneManager.mainScene.event.removeEventListener("COLLISION",this.die,this)},t.prototype.createSprite=function(){this.sprite=SceneManager.loader.createMovieClip("runner_json","runner_png","run"),this.sprite.gotoAndPlay("run",-1),this.sprite.y=SceneManager.mainScene.floor.image.y-this.sprite.height,this.addChild(this.sprite)},t.prototype.jump=function(){if(t.STATE!=r.DIE&&t.STATE!=r.JUMP){t.STATE=r.JUMP;var e=this.sprite.y,n=egret.Tween.get(this.sprite);n.to({x:this.sprite.x,y:this.sprite.y-t.POWER},t.FLIGHT_TIME).wait(t.FLIGHT_TIME).to({y:e},t.FLIGHT_TIME).call(this.run,this)}},t.prototype.die=function(){if(t.STATE!=r.DIE){t.STATE=r.DIE;var e=egret.Tween.get(this.sprite);e.to({x:this.sprite.x+t.POWER,y:SceneManager.STAGE_ONE_WIDTH+t.POWER},t.FLIGHT_TIME)}},t.prototype.run=function(){t.STATE=r.RUN},t.prototype.stop=function(){this.sprite.stop(),this.removeEvent()},t.POWER=120,t.FLIGHT_TIME=360,t.CHARACTER_WIDTH=70,t.CHARACTER_HEIGHT=220,t}(egret.DisplayObjectContainer);window.Runner=n,__reflect(n.prototype,"Runner",[]);var r;!function(e){e[e.RUN=0]="RUN",e[e.JUMP=1]="JUMP",e[e.DIE=2]="DIE"}(r||(r={})),window.RUNNER_STATE=r},function(e,t){var n=function(){function e(t){this.awlPosX=1024,this.maxPosX=512,e.mainScene=t,this.createLoader()}return e.prototype.onStart=function(){var e=this;this.createInitScene().then(function(){e.createScene(),e.setStart()})},e.prototype.createLoader=function(){e.loader||(e.loader=new ResourceLoader)},e.prototype.createInitScene=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return[4,e.loader.loadMainResource(["preload"],"resource/default.res.json")];case 1:return[2,t.sent()]}})})},e.prototype.createScene=function(){e.mainScene.bg=new BackgroundObject,e.mainScene.bg.getResource("backgroundForest_png"),e.mainScene.bg.imageY=0,e.mainScene.addChild(e.mainScene.bg),e.mainScene.floor=new BackgroundObject,e.mainScene.floor.getResource("floor_png"),e.mainScene.floor.imageY=e.STAGE_HEIGHT-e.mainScene.floor.image.height,e.mainScene.addChild(e.mainScene.floor),e.mainScene.awls=new Array},e.prototype.createCharacter=function(){e.mainScene.character=new Runner,e.mainScene.addChild(e.mainScene.character)},e.prototype.createRandomAwls=function(t,n){var r=Math.floor(Math.random()*(n-t))+t,o=new Awl(r);return e.mainScene.awls.push(o),e.mainScene.addChild(o),r},e.prototype.update=function(){e.mainScene.removeChild(this.imageStart),e.mainScene.stage.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.update,this),this.createCharacter(),egret.startTick(this.updateTick,this)},e.prototype.updateTick=function(){return e.tick>900&&Runner.STATE!=RUNNER_STATE.DIE&&(egret.stopTick(this.updateTick,this),this.setClear()),e.tick+=1,e.tick%90==0&&(this.awlPosX=this.createRandomAwls(this.awlPosX,this.awlPosX+this.maxPosX)),e.mainScene.bg.update(),e.mainScene.floor.update(),e.mainScene.awls.length>0&&e.mainScene.awls.forEach(function(e){return e.update()}),!0},e.prototype.setStart=function(){this.imageStart=new egret.Bitmap,this.imageStart.texture=RES.getRes("asset_start_png"),this.imageStart.x=256,e.mainScene.addChild(this.imageStart),e.mainScene.stage.addEventListener(egret.TouchEvent.TOUCH_TAP,this.update,this)},e.prototype.setClear=function(){var t=new egret.Bitmap;t.texture=RES.getRes("asset_clear_png"),t.x=256,e.mainScene.addChild(t),e.mainScene.character.stop(),e.mainScene.awls.forEach(function(e){return e.destroy()})},e.STAGE_ONE_WIDTH=512,e.STAGE_HEIGHT=512,e.tick=0,e}();window.SceneManager=n,__reflect(n.prototype,"SceneManager",[])}]);