Commit f2ca6358 authored by haiyoucuv's avatar haiyoucuv

1

parent 5a93cefd
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/const/OptionPool.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/parts/Game/Option.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/parts/UI/UILayer.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/libs/fyge.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/libs/fyge.min.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/output.js" beforeDir="false" afterPath="$PROJECT_DIR$/output.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/common/common.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/common/common.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/common/common.png" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/common/common.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/gameScene/gameScene.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/gameScene/gameScene.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/gameScene/gameScene.png" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/gameScene/gameScene.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/released/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/released/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/gameScene/game_收获.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/gameScene/game_浇水.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/gameScene/game_种植.png" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resource/gameScene/田_初始.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/gameScene/田_初始.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/gameScene/田_选择.png" beforeDir="false" afterPath="$PROJECT_DIR$/resource/gameScene/田_选择.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resource/res.json" beforeDir="false" afterPath="$PROJECT_DIR$/resource/res.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/Game/GameLayer.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/GameLayer.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/Game/Land.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/Land.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/parts/Game/PlantList.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/parts/Game/PlantList.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/scenes/GameScene.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/scenes/GameScene.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="TypeScript File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectId" id="1cZxVM0mqsG9P42nucl4FAQPyH1" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/src/panels" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="editor.preferences.fonts.default" />
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/src/panels" />
</key>
</component>
<component name="RunManager" selected="npm.dev">
<configuration name="dev" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="dev" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="flushRes" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="flushRes" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="handleRes" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="handleRes" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.handleRes" />
<item itemvalue="npm.flushRes" />
<item itemvalue="npm.dev" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="31be0130-d27d-4740-b668-956a8050e1bf" name="Default Changelist" comment="" />
<created>1590749938444</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1590749938444</updated>
<workItem from="1590749939792" duration="84000" />
<workItem from="1590976087296" duration="15316000" />
<workItem from="1590996860067" duration="2879000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="2" />
</component>
<component name="WindowStateProjectService">
<state width="255" height="907" key="GridCell.Tab.0.bottom" timestamp="1590998229565">
<screen x="35" y="23" width="1645" height="1027" />
</state>
<state width="255" height="907" key="GridCell.Tab.0.bottom/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590998229565" />
<state width="255" height="907" key="GridCell.Tab.0.center" timestamp="1590998229563">
<screen x="35" y="23" width="1645" height="1027" />
</state>
<state width="255" height="907" key="GridCell.Tab.0.center/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590998229563" />
<state width="255" height="907" key="GridCell.Tab.0.left" timestamp="1590998229560">
<screen x="35" y="23" width="1645" height="1027" />
</state>
<state width="255" height="907" key="GridCell.Tab.0.left/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590998229560" />
<state width="255" height="907" key="GridCell.Tab.0.right" timestamp="1590998229564">
<screen x="35" y="23" width="1645" height="1027" />
</state>
<state width="255" height="907" key="GridCell.Tab.0.right/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590998229564" />
<state x="614" y="245" key="RollbackChangesDialog" timestamp="1590993046653">
<screen x="35" y="23" width="1645" height="1027" />
</state>
<state x="614" y="245" key="RollbackChangesDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590993046653" />
<state x="586" y="314" key="refactoring.ChangeSignatureDialog" timestamp="1590980819551">
<screen x="35" y="23" width="1645" height="1027" />
</state>
<state x="586" y="314" key="refactoring.ChangeSignatureDialog/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590980819551" />
<state x="522" y="250" width="670" height="676" key="search.everywhere.popup" timestamp="1590998043497">
<screen x="35" y="23" width="1645" height="1027" />
</state>
<state x="522" y="250" width="670" height="676" key="search.everywhere.popup/35.23.1645.1027/1680.-199.1920.1177@35.23.1645.1027" timestamp="1590998043497" />
</component>
</project>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return n={},t.m=e=[function(t,e,n){"use strict";var o,r,i,s,a,u,c;function l(t,e,n){var r=t.substring(t.lastIndexOf(".")+1,t.length);if("png"==r||"jpg"==r){if(!FYGE.TextureCache[t]){if(c[t])return f(t,e,n);if((y=h(t))&&"jpg"!=r){var s=p(y);if(s&&s.atlas){var a=y+".json";return c[a]?c[a].then((function(o){return e&&e.call(n,FYGE.TextureCache[t],t),FYGE.TextureCache[t]}),(function(){return e&&e.call(n,null,t),null})):l(a).then((function(){return e&&e.call(n,FYGE.TextureCache[t],t),FYGE.TextureCache[t]}),(function(){return e&&e.call(n,null,t),null}))}}var u=y?o.resPath+y+"/"+t:t,d=new Promise((function(o,r){FYGE.GlobalLoader.loadImage((function(i,s){delete c[t],i?(FYGE.Texture.addToCache(FYGE.Texture.from(s),t),e&&e.call(n,FYGE.TextureCache[t],t),o(FYGE.TextureCache[t])):(e&&e.call(n,null,t),r())}),u)}));return c[t]=d}e&&e.call(n,FYGE.TextureCache[t],t),new Promise((function(e){e(FYGE.TextureCache[t])}))}else{if("svga"==r)return i[t]?(e&&e.call(n,i[t],t),new Promise((function(e){e(i[t])}))):c[t]?f(t,e,n):(u=(y=h(t))?o.resPath+y+"/"+t:t,d=new Promise((function(o,r){FYGE.GlobalLoader.loadSvga((function(s,a){delete c[t],s?(s&&(i[t]=a),e&&e.call(n,a,t),o(a)):(e&&e.call(n,null,t),r())}),u)})),c[t]=d);if("json"==r){if(c[t])return f(t,e,n);var y;u=(y=h(t))?o.resPath+y+"/"+t:t,d=new Promise((function(o,r){var i=p(y).atlas;FYGE.GlobalLoader.loadImage((function(s,a){var u;s?(u=FYGE.createTextureSheet(new FYGE.BaseTexture(a),i),e&&e.call(n,u,t),o(u)):(e&&e.call(n,null,t),r())}),u.replace("json","png"))}));return c[t]=d}}}function h(t){for(var e=0;e<r.groups.length;e++){var n=r.groups[e],o=n.keys;if(o&&-1<o.split(",").indexOf(t))return n.name;if(n.atlas&&n.name+".json"==t)return n.name}return null}function p(t){for(var e,n=r.groups,o=0;o<n.length;o++)if(n[o].name===t){e=n[o];break}return e}function f(t,e,n){return c[t].then((function(o){e&&e.call(n,o,t)}),(function(){e&&e.call(n,null,t)})),c[t]}Object.defineProperty(e,"__esModule",{value:!0}),o=e.RES||(e.RES={}),i={},s={},a={},u={},c={},o.loadConfig=function(t){r=t,o.resPath=t.path},o.loadGroup=function(t){if(a[t])return new Promise((function(t){t()}));if(u[t])return u[t];var e=function(t){var e=p(t);if(!e)return null;if(e.atlas){var n=[t+".json"];return e.keys&&(n=n.concat(e.keys.split(",").filter((function(t){return".png"!=t.substr(-4)})))),n}return e.keys?e.keys.split(","):null}(t);if(!e||!e.length)return a[t]=!0,new Promise((function(t){t()}));var n=new Promise((function(n,o){!function(t,e){var n=0,o=e.length;o||t(!0);for(var r=!0,i=0;i<o;i++)l(e[i],(function(e,i){e||(r=!1),++n==o&&t(r)}),this)}((function(e){delete u[t],e?(a[t]=!0,n()):o()}),e)}));return u[t]=n},o.getResAsync=l,o.getResByUrl=function(){},o.getRes=function(t){var e=t.substring(t.lastIndexOf(".")+1,t.length);return"png"==e||"jpg"==e?FYGE.TextureCache[t]||null:"svga"==e?i[t]||null:"mp3"==e?s[t]||null:void 0}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(6),a=n(7),u=(r(c,i=FYGE.Container),c.prototype.init=function(t){t.addChild(this);for(var e=["_bottomLayer","_sceneLayer","_popupLayer","_toastLayer","_topLayer","_shareLayer"],n=0;n<e.length;n++)this[e[n]]=new FYGE.Container,this.addChild(this[e[n]]);a.default.instance.init(this.sceneLayer),s.default.instance.init(this.popupLayer)},Object.defineProperty(c.prototype,"bottomLayer",{get:function(){return this._bottomLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"sceneLayer",{get:function(){return this._sceneLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"popupLayer",{get:function(){return this._popupLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"toastLayer",{get:function(){return this._toastLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"topLayer",{get:function(){return this._topLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"shareLayer",{get:function(){return this._shareLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"stageHeight",{get:function(){return this.stage?this.stage.viewRect.height:0},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"stageWidth",{get:function(){return this.stage?this.stage.viewRect.width:0},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"stageOffsetX",{get:function(){return this.stage?this.stage.viewRect.x:0},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"stageOffsetY",{get:function(){return this.stage?this.stage.viewRect.y:0},enumerable:!0,configurable:!0}),c);function c(){return null!==i&&i.apply(this,arguments)||this}e.layers=new u,e.destroyLayers=function(){e.layers.removeChildren(),e.layers.parent&&e.layers.parent.removeChild(e.layers)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s,a=n(0),u=n(1),c=!1;e.showWaiting=function(t){var e,n,o,r;c||(c=!0,e=new h,s=u.layers.topLayer,i=e,n=(u.layers.stageWidth-160)/2,o=(u.layers.stageHeight-i.height)/2,i.x=u.layers.stageOffsetX-s.x+n,i.y=u.layers.stageOffsetY-s.y+o,(r=(new FYGE.Graphics).beginFill(0).drawRect(-n,-o,u.layers.stageWidth,u.layers.stageHeight).endFill()).alpha=0,i.addChildAt(r,0)),i.show(t),s.addChild(i)},e.hideWaiting=function(){s.removeChild(i)},e.destroyWaiting=function(){c&&i&&!i.destroyed&&(i.destroy(),s=i=null,c=!1)};var l,h=(r(p,l=FYGE.Container),p.prototype.show=function(t){void 0===t&&(t="加载中"),this.msg.text=t},p.prototype.destroy=function(){l.prototype.destroy.call(this),this.msg=null},p);function p(){var t=l.call(this)||this,e=a.RES.getRes("waitingBg.png"),n=new FYGE.Sprite(e);t.addChild(n);var o=a.RES.getRes("waitingRot.png"),r=new FYGE.Sprite(o);r.x=(e.width-o.width)/2,r.y=47,r.anchorX=o.width/2,r.anchorY=o.height/2,t.addChild(r);var i=0;return r.addEventListener(FYGE.Event.ENTER_FRAME,(function(){++i%30==0&&(r.rotation+=45)}),t),t.msg=new FYGE.TextField,t.msg.y=125,t.msg.textWidth=e.width,t.msg.textAlign=FYGE.TEXT_ALIGN.CENTER,t.msg.size=26,t.msg.fillColor="#ffffff",t.addChild(t.msg),t}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s,a,u,c=n(1),l=n(0),h=!1;e.showToast=function(t){var e,n;h||(h=!0,i=new f,s=c.layers.toastLayer,i.alpha=0,i.x=c.layers.stageOffsetX-s.x+(c.layers.stageWidth-i.width)/2,e=i.height,n=c.layers.stageOffsetY-s.y,a=n-e,u=n+(c.layers.stageHeight-e)/2),i.show(t),s.addChild(i),FYGE.Tween.removeTweens(i),FYGE.Tween.get(i).set({y:a,alpha:1}).to({y:u},500,FYGE.Ease.quartOut).wait(800).to({alpha:0},300).call((function(){s.removeChild(i)}))},e.destroyToast=function(){h&&i&&!i.destroyed&&(i.destroy(),s=i=null,h=!1)};var p,f=(r(d,p=FYGE.Container),d.prototype.show=function(t){this.msg.text=t,this.msg.x=(this.bg.width-this.msg.textWidth)/2},d.prototype.destroy=function(){p.prototype.destroy.call(this),this.msg=null,this.bg=null},d);function d(){var t=p.call(this)||this;t.PADDING=40,t.mouseChildren=!1,t.mouseEnable=!1;var e=l.RES.getRes("toastBg.png");return t.bg=new FYGE.Sprite(e),t.addChild(t.bg),t.msg=new FYGE.TextField,t.msg.size=28,t.msg.fillColor="0xffffff",t.msg.text="",t.msg.verticalAlign=FYGE.VERTICAL_ALIGN.MIDDLE,t.msg.textHeight=e.height,t.msg.textAlign=FYGE.TEXT_ALIGN.CENTER,t.addChild(t.msg),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),r=n(6),i=n(7),s=n(3),a=n(3);e.showToast=a.showToast,function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(2)),e.showPanel=function(t,e){r.default.instance.show(t,e)},e.closeAllPanels=function(){r.default.instance.closeAll()},e.closeCurrentPanel=function(){r.default.instance.closeCurrent()},e.changeScene=function(t,e){i.default.instance.change(t,e)},e.getCurrentScene=function(){return i.default.instance.currentScene},e.showAlert=function(t,e){my?my.alert({title:t||"",content:e||""}):console.log(t,e)},e.wait=function(t,e){var n={};return FYGE.Tween.get(n).wait(e).call(t),n},e.clearWait=function(t){FYGE.Tween.removeTweens(t)},e.destroyAllCtrls=function(){s.destroyToast(),o.destroyWaiting(),r.default.instance.destroy(),i.default.instance.destroy()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=(i.init=function(){},i.getSprite=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0);var r=new FYGE.Sprite(o.RES.getRes(t));return r.x=e,r.y=n,r},i.getText=function(t,e,n,o,r,i,s){void 0===n&&(n="#000000"),void 0===o&&(o=0),void 0===r&&(r=FYGE.TEXT_ALIGN.CENTER),void 0===i&&(i=0),void 0===s&&(s=0);var a=new FYGE.TextField;return a.fillColor=n,a.size=e,a.textWidth=o,a.textAlign=r,a.x=i,a.y=s,a.text=t,a},i.getRect=function(t,e,n,o,r,i,s){void 0===n&&(n=16711680),void 0===o&&(o=1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===s&&(s=0);var a=new FYGE.Graphics;return a.beginFill(n),a.alpha=o,r?a.drawRoundedRect(0,0,t,e,r):a.drawRect(0,0,t,e),a.endFill(),a.position.set(i,s),a},i.initLatData=function(){for(var t=this.width+11,e=this.height+11,n=this.offsetX+this.width/2,o=this.offsetY+this.height/2,r=0;r<this.rowNum;r++)for(var i=0;i<this.colNum;i++)this.rcToIndexMap[""+r+i]=r*this.colNum+i,this.indexToRcMap[r*this.colNum+i]=[r,i],this.rowColPositions[""+r+i]=[n+i*t,o+r*e],this.indexPositions[r*this.colNum+i]=[n+i*t,o+r*e]},i.rcToIndex=function(t,e){var n=""+t+e;return this.rcToIndexMap[n]},i.indexToRc=function(t){return this.indexToRcMap[t]},i.getPositionByRc=function(t,e){var n=""+t+e;return this.rowColPositions[n]},i.getPositionByIndex=function(t){return this.indexPositions[t]},i.cacheKey="hadCompleteHaokelai",i.rowNum=4,i.colNum=4,i.width=125,i.height=125,i.offsetX=106,i.offsetY=600,i.rcToIndexMap={},i.indexToRcMap=[],i.rowColPositions={},i.indexPositions=[],i);function i(){}e.Tool=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(2),i=n(3),s=(Object.defineProperty(a,"instance",{get:function(){return a._instance||(a._instance=new a)},enumerable:!0,configurable:!0}),a.prototype.init=function(t){this._parent=t;var e=new FYGE.Graphics;e.beginFill(0,1),e.drawRect(o.layers.stageOffsetX-t.x,o.layers.stageOffsetY-t.y,o.layers.stageWidth,o.layers.stageHeight),e.endFill(),e.visible=!1,this._parent.addChild(e),this._bg=e},a.prototype.closeAll=function(){this.stacks.forEach((function(t){return t.hidePanel()}))},a.prototype.show=function(t,e){var n=this;r.showWaiting();var o=new t(e);return this.add(o),this.stacks.push(o),o.onLoaded=function(){r.hideWaiting(),n.updateView(),o.start(e)},o.onLoadError=function(){r.hideWaiting(),i.showToast("资源加载失败"),o.removeEventListener("onDestroy",n.onPanelHide,n),n.remove(o)},o},a.prototype.updateView=function(){this.stacks.length?!(this._parent.visible=!0)===this._bg.visible&&(this._bg.visible=!0,this._bg.alpha=0,FYGE.Tween.removeTweens(this._bg),FYGE.Tween.get(this._bg).to({alpha:.7},200,FYGE.Ease.cubicOut)):(this._bg.visible=!1,this._current=null,this._parent.visible=!1);for(var t=0;t<this.stacks.length;t++)t<this.stacks.length-1?this.stacks[t].visible=!1:(this.stacks[t].visible=!0,this.stacks[t].showAni(),this._current=this.stacks[t])},a.prototype.add=function(t){this._parent.addChild(t),t.addEventListener("onDestroy",this.onPanelHide,this)},a.prototype.remove=function(t){this._parent.removeChild(t),this.stacks=this.stacks.filter((function(e){return e!=t}))},a.prototype.onPanelHide=function(t){var e=t.target;e.removeEventListener("onDestroy",this.onPanelHide,this),this.remove(e),this.updateView()},a.prototype.closeCurrent=function(){this._current&&this._current.hidePanel()},a.prototype.destroy=function(){a._instance=null,this.stacks=null,this._current=null,this._parent=null,this._bg.destroy(),this._bg=null},a);function a(){this.stacks=[]}e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),r=n(3),i=(Object.defineProperty(s,"instance",{get:function(){return s._instance||(s._instance=new s)},enumerable:!0,configurable:!0}),s.prototype.init=function(t){this._parent=t},s.prototype.change=function(t,e){var n,i,s=this;this._currentScene&&this._currentScene instanceof t||((n=new t(e)).visible=!1,o.showWaiting(),i=this._currentScene,n.onLoaded=function(){o.hideWaiting(),n.showAni((function(){i&&i.destroy()})),n.visible=!0,n.start()},n.onLoadError=function(){o.hideWaiting(),r.showToast("资源加载失败"),s._currentScene=i||null,s._parent.removeChild(n)},this._currentScene=n,this._parent.addChild(n))},Object.defineProperty(s.prototype,"currentScene",{get:function(){return this._currentScene},enumerable:!0,configurable:!0}),s.prototype.destroy=function(){s._instance=null,this._currentScene=null,this._parent=null},s);function s(){}e.default=i},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(9),a=(r(u,i=s.Module),u.prototype.showAni=function(t){t()},u.prototype.updateScene=function(){},u);function u(){return null!==i&&i.apply(this,arguments)||this}e.Scene=a},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(0),a=(r(u,i=FYGE.Container),u.prototype.init=function(){var t=this;this.preLoadRes().then((function(){t.initUi(),t.onLoaded&&t.onLoaded()}),(function(){t.onLoadError&&t.onLoadError()}))},u.prototype.preLoadRes=function(){var t=this;return new Promise((function(e,n){if(t.groupNames&&t.groupNames.length){for(var o=[],r=0;r<t.groupNames.length;r++)o.push(s.RES.loadGroup(t.groupNames[r]));Promise.all(o).then(e,n)}else e()}))},u.prototype.initUi=function(){},Object.defineProperty(u.prototype,"groupNames",{get:function(){return null},enumerable:!0,configurable:!0}),u.prototype.start=function(t){this.initEvents()},u.prototype.initEvents=function(){},u.prototype.removeEvents=function(){},u.prototype.enableMouseEvt=function(t){this.mouseEnable=t,this.mouseChildren=t},u.prototype.destroy=function(){this.data=null,this.removeEvents(),this.dispatchEvent("onDestroy"),i.prototype.destroy.call(this)},u);function u(t){var e=i.call(this)||this;return e.data=t,e.init(),e}e.Module=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=(r.takeOut=function(t){return this.pool[t]&&this.pool[t].length?this.pool[t].shift():null},r.recover=function(t,e){this.pool[t]||(this.pool[t]=[]),this.pool[t].push(e)},r.pool={},r);function r(){}e.GPool=o},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n=n||Promise)((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(s,a)}u((o=o.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s={next:a(0),throw:a(1),return:a(2)};return"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(r=0<(r=i.trys).length&&r[r.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),s=n(0),a=n(4),u=n(12),c=n(20),l=n(21);e.GDispatcher=new FYGE.EventDispatcher;var h=(p.prototype.onAddToStage=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return i.layers.init(this.stage),console.log("初始化层级完成"),s.RES.loadConfig(c.ResJson),console.log("初始化资源配置完成"),[4,s.RES.loadGroup("common")];case 1:return t.sent(),console.log("通用资源加载完成"),a.changeScene(u.StartScene),console.log("恶趣味去"),[2]}}))}))},p.prototype.run=function(){this._pause=!1},p.prototype.pause=function(){this._pause=!0},p.prototype.addGlobalEvent=function(t,n,o,r){void 0===r&&(r=!1),r?e.GDispatcher.once(t,n,o):e.GDispatcher.addEventListener(t,n,o)},p.prototype.dispatchGlobalEvent=function(t,n){e.GDispatcher.dispatchEvent(t,n)},p.prototype.removeGlobalEvent=function(t,n,o){e.GDispatcher.removeEventListener(t,n,o)},p.prototype.destroy=function(){FYGE.Tween.removeAllTweens(),FYGE.getCancelAnimationFrame()(this.requestID),i.destroyLayers(),a.destroyAllCtrls(),this.stage.destroy(),e.GDispatcher.removeAllEventListener(),l.destroyNetData()},p);function p(t){var e;my&&(FYGE.initedByCanvas(t),e=my.getSystemInfoSync());var n=new FYGE.Stage(t,750,1624,e&&e.windowWidth||document.body.clientWidth,e&&e.windowHeight||document.body.clientHeight,FYGE.RENDERER_TYPE.CANVAS);(this.stage=n).addEventListener(FYGE.Event.INIT_STAGE,this.onAddToStage,this);var o=this;!function t(){o._pause||(FYGE.Tween.flush(),n.flush()),o.requestID=FYGE.getRequestAnimationFrame()(t)}()}e.Main=h},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),s=n(0),a=n(4),u=n(1),c=n(13);e.svgaPool={};var l,h=(r(p,l=i.Scene),Object.defineProperty(p.prototype,"groupNames",{get:function(){return["startScene"]},enumerable:!0,configurable:!0}),p.prototype.initUi=function(){l.prototype.initUi.call(this),this.addChild(new FYGE.Sprite(s.RES.getRes("startBg.jpg")))},p.prototype.start=function(){l.prototype.start.call(this),a.showToast("点击下方按钮\n开始游戏"),a.wait((function(){a.showToast("下一句文案\n是否覆盖")}),2e3),this.testMove(),this.testMv();var t=new FYGE.Button(s.RES.getRes("startBtn.png"));t.position.set(151.5,1e3),this.addChild(t),t.addEventListener(FYGE.MouseEvent.CLICK,(function(){console.log("9999546"),a.changeScene(c.PlayScene)}),this)},p.prototype.testMove=function(){var t=new FYGE.Sprite(s.RES.getRes("silverDraft.png"));t.x=500,t.y=0,this.addChild(t),this.addEventListener(FYGE.Event.ENTER_FRAME,(function(){t.y+=5,t.y=Math.round(t.y),1300<t.y&&(t.y=0)}),this)},p.prototype.testScroll=function(){var t=new FYGE.Sprite(s.RES.getRes("startBg.jpg")),e=new FYGE.ScrollPage(750,u.layers.stageHeight,1624,!0,!0);e.view.addChild(t),this.addChild(e),e.x=100,e.y=100;var n=new FYGE.ScrollPage(750,200,1624,!1,!1);n.maxDistance=2090,n.y=900,e.view.addChild(n);for(var o=0;o<10;o++){var r=new FYGE.Sprite(s.RES.getRes("silverDraft.png"));r.width=200,r.height=200,r.x=10*o+200*o,n.view.addChild(r)}},p.prototype.testGraphics=function(){var t=new FYGE.Graphics;t.beginFill(16711680,.7),t.drawEllipse(200,200,200,300),t.endFill(),this.addChild(t)},p.prototype.testSprite=function(){for(var t=s.RES.getRes("silverDraft.png"),e=0;e<2500;e++){var n=new FYGE.Sprite(t);n.x=750*Math.random(),n.y=1206*Math.random(),this.addChild(n)}},p.prototype.testMv=function(){var t=this;SvgaParser.loadSvga("cloud://A8673B47AAA58993A24A6718E203B967//dice.svga",(function(e){var n=new FYGE.MovieClip(e);t.addChild(n)}),(function(){console.log(123)}))},p);function p(){return null!==l&&l.apply(this,arguments)||this}e.StartScene=h},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s,a=n(8),u=n(4),c=n(5),l=n(10),h=n(14),p=n(15),f=n(16),d=n(17);(s=i=i||{})[s.left=0]="left",s[s.right=1]="right",s[s.up=2]="up",s[s.down=3]="down";var y,g=(r(v,y=a.Scene),Object.defineProperty(v.prototype,"groupNames",{get:function(){return["playScene"]},enumerable:!0,configurable:!0}),v.prototype.initUi=function(){this.addChild(c.Tool.getSprite("playBg.jpg")),c.Tool.initLatData(),this.lats=new Array(16),u.showToast("啊哦,没法移动了\n重置中")},v.prototype.start=function(){y.prototype.start.call(this),this.resetGame()},v.prototype.resetGame=function(){for(var t,e=0;e<this.lats.length;e++)this.lats[e]&&(t=this.lats[e],this.removeChild(t),l.GPool.recover("gameEle",t),this.lats[e]=null);this.generateOne(),this.generateOne()},v.prototype.generateOne=function(t,e){var n=this,o=(t=void 0===t?this.getOneEmptyIndex():t,void 0===e?Math.random()<.5?2:4:e),r=l.GPool.takeOut("gameEle");r?r.reset(o):r=new p.GameEle(o),this.addChild(r),r.position.set(c.Tool.getPositionByIndex(t)[0],c.Tool.getPositionByIndex(t)[1]),(this.lats[t]=r).index=t,r.scale.set(.1,.1),FYGE.Tween.get(r).to({scaleX:1,scaleY:1},100,FYGE.Ease.backOut).call((function(){!function(t){if(!function(t){for(var e=0;e<t.length;e++)if(!t[e])return 1}(t)){for(var e=0;e<t.length;e++){var n=t[e],o=c.Tool.indexToRc(e);if(o[1]<c.Tool.colNum-1&&n.type==t[e+1].type)return;if(o[0]<c.Tool.rowNum-1&&n.type==t[e+c.Tool.colNum].type)return}return 1}}(n.lats)?n.moveMark=!0:(u.showToast("啊哦,没法移动了\n重置中"),setTimeout((function(){n.resetGame()}),1600))}))},v.prototype.getOneEmptyIndex=function(){for(var t=[],e=0;e<this.lats.length;e++)this.lats[e]||t.push(e);return t.length?(h.GTool.disturbNumberArr(t),t[0]):null},v.prototype.onMouseDown=function(t){var e,n,o,r;function i(t){o=t.stageX-e,r=t.stageY-n}function s(){this.removeEventListener(FYGE.MouseEvent.MOUSE_MOVE,i,this),this.removeEventListener(FYGE.MouseEvent.MOUSE_UP,s,this),this.removeEventListener(FYGE.MouseEvent.MOUSE_OUT,s,this),this.checkMove(o,r),this.hasDown=!1}this.moveMark&&(this.hasDown||(this.hasDown=!0,e=t.stageX,n=t.stageY,this.addEventListener(FYGE.MouseEvent.MOUSE_MOVE,i,this),this.addEventListener(FYGE.MouseEvent.MOUSE_UP,s,this),this.addEventListener(FYGE.MouseEvent.MOUSE_OUT,s,this)))},v.prototype.checkMove=function(t,e){var n,o=this;if(Math.abs(t)>Math.abs(e)?(0<t&&(n=this.checkRight()),t<0&&(n=this.checkLeft())):0<e?n=this.checkDown():e<0&&(n=this.checkUp()),n&&n.length){this.moveMark=!1;for(var r=0,i=n.length,s=0;s<n.length;s++){var a=n[s];this.lats[a.startEle1.index]=null,a.startEle1.index=a.endIndex,this.lats[a.endIndex]=a.startEle1,a.startEle2&&(this.lats[a.startEle2.index]=null,a.startEle1.tempType=2*a.startEle1.type),f.moveAni((function(){++r==i&&(o.check2048()?u.showPanel(d.UnlockPanel,{closeFun:function(){o.resetGame()},grade:2048}):o.generateOne())}),a.startEle1,a.endIndex,a.startEle2)}}},v.prototype.checkLeft=function(){for(var t=[],e=0;e<c.Tool.rowNum;e++){for(var n=[],o=0;o<c.Tool.colNum;o++)n.push(e*c.Tool.colNum+o);t=t.concat(w(n,this.lats))}return t},v.prototype.checkRight=function(){for(var t=[],e=0;e<c.Tool.rowNum;e++){for(var n=[],o=c.Tool.colNum-1;0<=o;o--)n.push(e*c.Tool.colNum+o);t=t.concat(w(n,this.lats))}return t},v.prototype.checkUp=function(){for(var t=[],e=0;e<c.Tool.colNum;e++){for(var n=[],o=0;o<c.Tool.rowNum;o++)n.push(e+c.Tool.rowNum*o);t=t.concat(w(n,this.lats))}return t},v.prototype.checkDown=function(){for(var t=[],e=0;e<c.Tool.colNum;e++){for(var n=[],o=c.Tool.rowNum-1;0<=o;o--)n.push(e+c.Tool.rowNum*o);t=t.concat(w(n,this.lats))}return t},v.prototype.check2048=function(){for(var t=0;t<this.lats.length;t++)if(this.lats[t]&&2048==(this.lats[t].tempType||this.lats[t].type))return!0;return!1},v.prototype.initEvents=function(){y.prototype.initEvents.call(this),this.addEventListener(FYGE.MouseEvent.MOUSE_DOWN,this.onMouseDown,this)},v.prototype.removeEvents=function(){y.prototype.removeEvents.call(this),this.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN,this.onMouseDown,this)},v.prototype.unlock=function(){},v);function v(){var t=null!==y&&y.apply(this,arguments)||this;return t.score=0,t}function w(t,e){for(var n,o,r=[],i=[],s=0;s<t.length;s++)e[o=t[s]]?n&&n.startEle1.type==e[o].type?(n.startEle2=e[o],-1==r.indexOf(n)&&r.push(n),n=null,i.push(o)):i.length?(n={startEle1:e[o],endIndex:i.shift()},r.push(n),i.push(o)):n={startEle1:e[o],endIndex:o}:i.push(o);return r}e.PlayScene=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=(r.changeURLArg=function(t,e,n){var o=e+"=([^&]*)",r=e+"="+n;if(t.match(o)){var i="/("+e+"=)([^&]*)/gi";return t.replace(new RegExp(i),r)}return t.match("[?]")?t+"&"+r:t+"?"+r},r.readCache=function(t,e){return void 0===e&&(e="localStorage"),!!window.localStorage&&window[e].getItem(t)},r.writeCache=function(t,e,n){void 0===e&&(e="true"),void 0===n&&(n="localStorage"),window.localStorage&&window[n].setItem(t,e)},r.returnTodayTimes=function(t){var e=this.readCache("year"+t),n=this.readCache("month"+t),o=this.readCache("day"+t),r=new Date,i=r.getFullYear().toString(),s=r.getMonth().toString(),a=r.getDate().toString();return this.int(i)<=this.int(e)&&this.int(s)<=this.int(n)&&this.int(a)<=this.int(o)?this.int(this.readCache(t)):(this.writeCache("year"+t,i),this.writeCache("month"+t,s),this.writeCache("day"+t,a),this.writeCache(t,"0"),0)},r.randomT=function(t,e){return t&&"number"==typeof t.length&&t.length?t[Math.floor(Math.random()*t.length)]:("number"!=typeof e&&(e=t||1,t=0),t+Math.random()*(e-t))},r.removeEle=function(t,e){var n=e.indexOf(t);0<=n&&e.splice(n,1)},r.insert=function(t,e){for(var n=e.length-1;0<=n;n--)if(t>e[n]){e.splice(n+1,0,t);break}},r.getRandomNumber=function(t,e,n){for(var o=[],r=0;r<n;r++){var i=Math.floor(Math.random()*(e-t+1)+t);o.indexOf(i)<0?o.push(i):r--}return o},r.disturbNumberArr=function(t){t.sort((function(){return.5-Math.random()}))},r.getRandomArrayElements=function(t,e){var n,o,r=t.slice(0),i=t.length,s=i-e;if(s<=0)return r;if(e<=0)return[];for(;i-- >s;)n=r[o=Math.floor((i+1)*Math.random())],r[o]=r[i],r[i]=n;return r.slice(s)},r.getRandomArrayElementsEx=function(t,e){if(t.length<=e)return t.slice();if(e<=0)return[];for(var n=t.slice(),o=[];e--;){var r=Math.floor(Math.random()*n.length),i=n.splice(r,1)[0];o.push(i)}return o},r.int=function(t){return t>>0},r.addSpaceInString=function(t){if(!t.length||1==t.length)return t;for(var e="",n=0;n<t.length-1;n++)e=e+t[n]+" ";return e+t[t.length-1]},r.emojiReg=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,r);function r(){}e.GTool=o},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(0),a=n(5),u=(r(c,i=FYGE.Sprite),Object.defineProperty(c.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t,this.texture=s.RES.getRes("ele"+t+".png")},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"tempType",{get:function(){return this._tempType},set:function(t){this._tempType=t},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"row",{get:function(){return a.Tool.indexToRc(this.index)[0]},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"col",{get:function(){return a.Tool.indexToRc(this.index)[1]},enumerable:!0,configurable:!0}),c.prototype.reset=function(t){this.type=t,this.scale.set(1,1)},c);function c(t){var e=i.call(this)||this;return e._tempType=null,e.type=t,e.anchorTexture.set(.5,.5),e}e.GameEle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(5),r=n(10);e.moveAni=function(t,e,n,i){var s=2*e.type,a=o.Tool.getPositionByIndex(n);FYGE.Tween.get(e).to({x:a[0],y:a[1]},200).call((function(){t(),i&&FYGE.Tween.get(e).to({scaleX:.1,scaleY:.1},100).call((function(){e.type=s,e.tempType=null})).to({scaleX:1,scaleY:1},100,FYGE.Ease.backOut)})),i&&FYGE.Tween.get(i).to({x:a[0],y:a[1]},200).call((function(){i.parent.removeChild(i),r.GPool.recover("gameEle",i)}))}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s,a=n(5),u=n(18),c=n(0),l=n(19),h=(r(p,i=u.Panel),Object.defineProperty(p.prototype,"groupNames",{get:function(){return["unlockPanel"]},enumerable:!0,configurable:!0}),p.prototype.initUi=function(){this.addChild(new l.Light).position.set(375,735),this.addChild(a.Tool.getSprite("unlockPanelBg.png")),this.closeBtn=new FYGE.Button(c.RES.getRes("comCloseBtn.png")),this.closeBtn.position.set(614,460),this.addChild(this.closeBtn),this.addChild(new FYGE.Button(c.RES.getRes("zailaiyiju.png"))).once(FYGE.MouseEvent.CLICK,this.onClick_closeBtn,this).position.set(258.5,938),this.addChild(new FYGE.Sprite(c.RES.getRes("unlock"+this.data.grade+".png"))).position.set(130.5,600)},p.prototype.start=function(t){i.prototype.start.call(this)},p.prototype.initEvents=function(){this.closeBtn.addEventListener(FYGE.MouseEvent.CLICK,this.onClick_closeBtn,this)},p.prototype.onClick_closeBtn=function(){this.data.closeFun(),this.hidePanel()},p.prototype.removeEvents=function(){this.closeBtn.removeEventListener(FYGE.MouseEvent.CLICK,this.onClick_closeBtn,this)},p);function p(){return null!==i&&i.apply(this,arguments)||this}e.UnlockPanel=h,r((function(t){var e=s.call(this)||this,n=new FYGE.Sprite(c.RES.getRes("unlockMsg.png"));e.addChild(n);for(var o={},r=0;r<10;r++)o[r]=c.RES.getRes("n"+r+".png");var i=new FYGE.BitmapText(o);i.textAlign=FYGE.TEXT_ALIGN.LEFT,i.text=t+"",e.addChild(i);var a=n.width+i.width;return n.position.set((750-a)/2,548),i.position.set(n.x+n.width,552),e}),s=FYGE.Container)},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(9),a=(r(u,i=s.Module),u.prototype.showAni=function(){var t,e=this;this.isShowing||(this.isShowing=!0,t=this.y||0,this.y=-200,FYGE.Tween.get(this).to({y:t},500,FYGE.Ease.quartOut).call((function(){e.isShowing=!1})))},u.prototype.initEvents=function(){var t=this;this.closeBtns.forEach((function(e){e&&e.addEventListener(FYGE.MouseEvent.CLICK,t.hidePanel,t)}))},u.prototype.removeEvents=function(){var t=this;this.closeBtns.forEach((function(e){e&&e.removeEventListener(FYGE.MouseEvent.CLICK,t.hidePanel,t)}))},Object.defineProperty(u.prototype,"closeBtns",{get:function(){return[this.closeBtn]},enumerable:!0,configurable:!0}),u.prototype.hidePanel=function(){this.destroy()},u);function u(){return null!==i&&i.apply(this,arguments)||this}e.Panel=a},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(0),a=(r(u,i=FYGE.Sprite),u);function u(){var t=i.call(this)||this;return t.texture=s.RES.getRes("light.png"),t.anchorTexture.set(.5,.5),t.addEventListener(FYGE.Event.ENTER_FRAME,(function(){t.rotation+=1}),t),t}e.Light=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResJson={groups:[{keys:"comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",name:"common",atlas:{"comCloseBtn.png":{x:646,y:60,w:48,h:48,ox:0,oy:0,sw:48,sh:48,ro:!1},"toastBg.png":{x:184,y:2,w:460,h:130,ox:0,oy:0,sw:460,sh:130,ro:!1},"waitingBg.png":{x:2,y:2,w:160,h:180,ox:0,oy:0,sw:160,sh:180,ro:!0},"waitingRot.png":{x:646,y:2,w:56,h:56,ox:0,oy:0,sw:56,sh:56,ro:!1}}},{keys:"ele1024.png,ele128.png,ele16.png,ele2.png,ele2048.png,ele256.png,ele32.png,ele4.png,ele512.png,ele64.png,ele8.png,guideArrow.png,guideFinger.png,playBg.jpg",name:"playScene",atlas:{"ele1024.png":{x:2,y:858,w:100,h:99,ox:0,oy:0,sw:100,sh:99,ro:!1},"ele128.png":{x:2,y:385,w:106,h:92,ox:0,oy:0,sw:106,sh:92,ro:!1},"ele16.png":{x:2,y:755,w:102,h:101,ox:0,oy:0,sw:102,sh:101,ro:!1},"ele2.png":{x:2,y:664,w:103,h:89,ox:0,oy:0,sw:103,sh:89,ro:!1},"ele2048.png":{x:2,y:93,w:110,h:92,ox:0,oy:0,sw:110,sh:92,ro:!1},"ele256.png":{x:2,y:571,w:104,h:91,ox:0,oy:0,sw:104,sh:91,ro:!1},"ele32.png":{x:2,y:187,w:108,h:92,ox:0,oy:0,sw:108,sh:92,ro:!1},"ele4.png":{x:2,y:959,w:129,h:92,ox:0,oy:0,sw:129,sh:92,ro:!0},"ele512.png":{x:2,y:479,w:106,h:90,ox:0,oy:0,sw:106,sh:90,ro:!1},"ele64.png":{x:2,y:281,w:107,h:102,ox:0,oy:0,sw:107,sh:102,ro:!1},"ele8.png":{x:2,y:2,w:111,h:89,ox:0,oy:0,sw:111,sh:89,ro:!1},"guideArrow.png":{x:82,y:1090,w:51,h:14,ox:0,oy:0,sw:51,sh:14,ro:!0},"guideFinger.png":{x:2,y:1090,w:53,h:78,ox:0,oy:0,sw:53,sh:78,ro:!0}}},{keys:"silverDraft.png,startBg.jpg,startBtn.png",name:"startScene",atlas:{"silverDraft.png":{x:2,y:2,w:112,h:132,ox:0,oy:0,sw:112,sh:132,ro:!0},"startBtn.png":{x:136,y:2,w:447,h:106,ox:0,oy:0,sw:447,sh:106,ro:!1}}},{keys:"light.png,unlock1024.png,unlock128.png,unlock16.png,unlock2.png,unlock2048.png,unlock256.png,unlock32.png,unlock512.png,unlock64.png,unlock8.png,unlockMsg.png,unlockPanelBg.png,zailaiyiju.png",name:"unlockPanel",atlas:{"light.png":{x:2,y:2,w:1158,h:1190,ox:0,oy:90,sw:1162,sh:1280,ro:!0},"unlock1024.png":{x:1194,y:754,w:227,h:191,ox:143,oy:93,sw:449,sh:363,ro:!1},"unlock128.png":{x:1868,y:2,w:197,h:165,ox:142,oy:101,sw:449,sh:363,ro:!0},"unlock16.png":{x:1835,y:955,w:183,h:179,ox:150,oy:87,sw:449,sh:363,ro:!1},"unlock2.png":{x:1868,y:201,w:185,h:163,ox:143,oy:96,sw:449,sh:363,ro:!0},"unlock2048.png":{x:1423,y:754,w:229,h:187,ox:127,oy:74,sw:449,sh:363,ro:!1},"unlock256.png":{x:1853,y:754,w:199,h:169,ox:137,oy:96,sw:449,sh:363,ro:!0},"unlock32.png":{x:1632,y:943,w:201,h:175,ox:139,oy:92,sw:449,sh:363,ro:!1},"unlock512.png":{x:1423,y:943,w:207,h:171,ox:127,oy:87,sw:449,sh:363,ro:!1},"unlock64.png":{x:1654,y:754,w:197,h:187,ox:134,oy:81,sw:449,sh:363,ro:!1},"unlock8.png":{x:1194,y:947,w:225,h:179,ox:101,oy:88,sw:449,sh:363,ro:!1},"unlockMsg.png":{x:1868,y:388,w:276,h:40,ox:0,oy:0,sw:276,sh:40,ro:!0},"unlockPanelBg.png":{x:1194,y:2,w:672,h:750,ox:30,oy:386,sw:750,sh:1624,ro:!1},"zailaiyiju.png":{x:1910,y:388,w:233,h:77,ox:0,oy:0,sw:233,sh:77,ro:!0}}}],path:"https://yun.duiba.com.cn/db_games/activity/anything/1590719783/resource/"}},function(t,e,n){"use strict";var o=this&&this.__awaiter||function(t,e,n,o){return new(n=n||Promise)((function(r,i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(s,a)}u((o=o.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s={next:a(0),throw:a(1),return:a(2)};return"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(r=0<(r=i.trys).length&&r[r.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(4);(i=e.TbNetName||(e.TbNetName={})).aaa="aaa",i.getCredits="getCredits",i.startGame="startGame",i.submit="submit",i.getTools="getTools",i.getTaskList="getTaskList",i.getToolsByType="getToolsByType",i.useTools="useTools";var a,u={};e.sendTbNet=function(t,e,n,i){void 0===i&&(i=!1);var l=s.wait((function(){i||s.showToast("网络超时"),n(!1)}),5e3);my?(a=a||getApp().cloud.function).invoke("becheery",e,t).then((function(e){s.clearWait(l),u[t]=e,i||e.success||s.showToast(c[e.code]||e.message||"网络异常"),n(e.success,e)})):function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[4,e.sent().json()];case 2:return[2,e.sent()]}}))}))}("../../mock/miniTb/"+t+".json").then((function(t){s.clearWait(l),u[name]=t,i||t.success||s.showToast(t.message||"网络异常"),n(t.success,t)}),(function(){}))},e.getTbData=function(t){return u[t]||null},e.destroyNetData=function(){u={}};var c={210001:"服务器异常",210002:"用户不存在",210003:"邀请已达上限",210004:"无法邀请自己",210006:"该活动ID无效",210009:"该活动暂未开始",210010:"该分享ID不存在",210012:"该用户暂未获奖",210013:"领取失败",210015:"该活动已删除",210016:"该活动已经结束",210017:"该奖品已达领取上线",210018:"请先分享好友",210019:"暂有奖品未领取",210020:"暂有奖品未完成",210021:"请先玩一局游戏",210022:"请先选择奖品",210023:"领取失败,库存不足",210024:"请先成为会员",210025:"奖品已经过期",210026:"不能重复助力",210028:"请至我的奖品页重新领取"}}],t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__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 o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(t){return e[t]}.bind(null,r));return o},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(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=11);function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e,n}));
\ No newline at end of file
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return n={},t.m=e=[function(t,e,n){"use strict";var o,r,i,s,a,u,c;function l(t,e,n){var r=t.substring(t.lastIndexOf(".")+1,t.length);if("png"==r||"jpg"==r){if(!FYGE.TextureCache[t]){if(c[t])return f(t,e,n);if((y=h(t))&&"jpg"!=r){var s=p(y);if(s&&s.atlas){var a=y+".json";return c[a]?c[a].then((function(o){return e&&e.call(n,FYGE.TextureCache[t],t),FYGE.TextureCache[t]}),(function(){return e&&e.call(n,null,t),null})):l(a).then((function(){return e&&e.call(n,FYGE.TextureCache[t],t),FYGE.TextureCache[t]}),(function(){return e&&e.call(n,null,t),null}))}}var u=y?o.resPath+y+"/"+t:t,d=new Promise((function(o,r){FYGE.GlobalLoader.loadImage((function(i,s){delete c[t],i?(FYGE.Texture.addToCache(FYGE.Texture.from(s),t),e&&e.call(n,FYGE.TextureCache[t],t),o(FYGE.TextureCache[t])):(e&&e.call(n,null,t),r())}),u)}));return c[t]=d}e&&e.call(n,FYGE.TextureCache[t],t),new Promise((function(e){e(FYGE.TextureCache[t])}))}else{if("svga"==r)return i[t]?(e&&e.call(n,i[t],t),new Promise((function(e){e(i[t])}))):c[t]?f(t,e,n):(u=(y=h(t))?o.resPath+y+"/"+t:t,d=new Promise((function(o,r){FYGE.GlobalLoader.loadSvga((function(s,a){delete c[t],s?(s&&(i[t]=a),e&&e.call(n,a,t),o(a)):(e&&e.call(n,null,t),r())}),u)})),c[t]=d);if("json"==r){if(c[t])return f(t,e,n);var y;u=(y=h(t))?o.resPath+y+"/"+t:t,d=new Promise((function(o,r){var i=p(y).atlas;FYGE.GlobalLoader.loadImage((function(s,a){var u;s?(u=FYGE.createTextureSheet(new FYGE.BaseTexture(a),i),e&&e.call(n,u,t),o(u)):(e&&e.call(n,null,t),r())}),u.replace("json","png"))}));return c[t]=d}}}function h(t){for(var e=0;e<r.groups.length;e++){var n=r.groups[e],o=n.keys;if(o&&-1<o.split(",").indexOf(t))return n.name;if(n.atlas&&n.name+".json"==t)return n.name}return null}function p(t){for(var e,n=r.groups,o=0;o<n.length;o++)if(n[o].name===t){e=n[o];break}return e}function f(t,e,n){return c[t].then((function(o){e&&e.call(n,o,t)}),(function(){e&&e.call(n,null,t)})),c[t]}Object.defineProperty(e,"__esModule",{value:!0}),o=e.RES||(e.RES={}),i={},s={},a={},u={},c={},o.loadConfig=function(t){r=t,o.resPath=t.path},o.loadGroup=function(t){if(a[t])return new Promise((function(t){t()}));if(u[t])return u[t];var e=function(t){var e=p(t);if(!e)return null;if(e.atlas){var n=[t+".json"];return e.keys&&(n=n.concat(e.keys.split(",").filter((function(t){return".png"!=t.substr(-4)})))),n}return e.keys?e.keys.split(","):null}(t);if(!e||!e.length)return a[t]=!0,new Promise((function(t){t()}));var n=new Promise((function(n,o){!function(t,e){var n=0,o=e.length;o||t(!0);for(var r=!0,i=0;i<o;i++)l(e[i],(function(e,i){e||(r=!1),++n==o&&t(r)}),this)}((function(e){delete u[t],e?(a[t]=!0,n()):o()}),e)}));return u[t]=n},o.getResAsync=l,o.getResByUrl=function(){},o.getRes=function(t){var e=t.substring(t.lastIndexOf(".")+1,t.length);return"png"==e||"jpg"==e?FYGE.TextureCache[t]||null:"svga"==e?i[t]||null:"mp3"==e?s[t]||null:void 0}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(6),a=n(7),u=(r(c,i=FYGE.Container),c.prototype.init=function(t){t.addChild(this);for(var e=["_bottomLayer","_sceneLayer","_popupLayer","_toastLayer","_topLayer","_shareLayer"],n=0;n<e.length;n++)this[e[n]]=new FYGE.Container,this.addChild(this[e[n]]);a.default.instance.init(this.sceneLayer),s.default.instance.init(this.popupLayer)},Object.defineProperty(c.prototype,"bottomLayer",{get:function(){return this._bottomLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"sceneLayer",{get:function(){return this._sceneLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"popupLayer",{get:function(){return this._popupLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"toastLayer",{get:function(){return this._toastLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"topLayer",{get:function(){return this._topLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"shareLayer",{get:function(){return this._shareLayer},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"stageHeight",{get:function(){return this.stage?this.stage.viewRect.height:0},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"stageWidth",{get:function(){return this.stage?this.stage.viewRect.width:0},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"stageOffsetX",{get:function(){return this.stage?this.stage.viewRect.x:0},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"stageOffsetY",{get:function(){return this.stage?this.stage.viewRect.y:0},enumerable:!0,configurable:!0}),c);function c(){return null!==i&&i.apply(this,arguments)||this}e.layers=new u,e.destroyLayers=function(){e.layers.removeChildren(),e.layers.parent&&e.layers.parent.removeChild(e.layers)}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s,a=n(0),u=n(1),c=!1;e.showWaiting=function(t){var e,n,o,r;c||(c=!0,e=new h,s=u.layers.topLayer,i=e,n=(u.layers.stageWidth-160)/2,o=(u.layers.stageHeight-i.height)/2,i.x=u.layers.stageOffsetX-s.x+n,i.y=u.layers.stageOffsetY-s.y+o,(r=(new FYGE.Graphics).beginFill(0).drawRect(-n,-o,u.layers.stageWidth,u.layers.stageHeight).endFill()).alpha=0,i.addChildAt(r,0)),i.show(t),s.addChild(i)},e.hideWaiting=function(){s.removeChild(i)},e.destroyWaiting=function(){c&&i&&!i.destroyed&&(i.destroy(),s=i=null,c=!1)};var l,h=(r(p,l=FYGE.Container),p.prototype.show=function(t){void 0===t&&(t="加载中"),this.msg.text=t},p.prototype.destroy=function(){l.prototype.destroy.call(this),this.msg=null},p);function p(){var t=l.call(this)||this,e=a.RES.getRes("waitingBg.png"),n=new FYGE.Sprite(e);t.addChild(n);var o=a.RES.getRes("waitingRot.png"),r=new FYGE.Sprite(o);r.x=(e.width-o.width)/2,r.y=47,r.anchorX=o.width/2,r.anchorY=o.height/2,t.addChild(r);var i=0;return r.addEventListener(FYGE.Event.ENTER_FRAME,(function(){++i%30==0&&(r.rotation+=45)}),t),t.msg=new FYGE.TextField,t.msg.y=125,t.msg.textWidth=e.width,t.msg.textAlign=FYGE.TEXT_ALIGN.CENTER,t.msg.size=26,t.msg.fillColor="#ffffff",t.addChild(t.msg),t}},function(t, e, n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t, e){t.__proto__=e}||function(t, e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t, e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s,a,u,c=n(1),l=n(0),h=!1;e.showToast=function(t){var e,n;h||(h=!0,i=new f,s=c.layers.toastLayer,i.alpha=0,i.x=c.layers.stageOffsetX-s.x+(c.layers.stageWidth-i.width)/2,e=i.height,n=c.layers.stageOffsetY-s.y,a=n-e,u=n+(c.layers.stageHeight-e)/2),i.show(t),s.addChild(i),FYGE.Tween.removeTweens(i),FYGE.Tween.get(i).set({y:a,alpha:1}).to({y:u},500,FYGE.Ease.quartOut).wait(800).to({alpha:0},300).call((function(){s.removeChild(i)}))},e.destroyToast=function(){h&&i&&!i.destroyed&&(i.destroy(),s=i=null,h=!1)};var p,f=(r(d,p=FYGE.Container),d.prototype.show=function(t){this.msg.text=t,this.msg.x=(this.bg.width-this.msg.textWidth)/2},d.prototype.destroy=function(){p.prototype.destroy.call(this),this.msg=null,this.bg=null},d);function d(){var t=p.call(this)||this;t.PADDING=40,t.mouseChildren=!1,t.mouseEnable=!1;var e=l.RES.getRes("toastBg.png");return t.bg=new FYGE.Sprite(e),t.addChild(t.bg),t.msg=new FYGE.TextField,t.msg.size=28,t.msg.fillColor="0xffffff",t.msg.text="",t.msg.verticalAlign=FYGE.VERTICAL_ALIGN.MIDDLE,t.msg.textHeight=e.height,t.msg.textAlign=FYGE.TEXT_ALIGN.CENTER,t.addChild(t.msg),t}},function(t, e, n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),r=n(6),i=n(7),s=n(3),a=n(3);e.showToast=a.showToast,function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(2)),e.showPanel=function(t, e){r.default.instance.show(t,e)},e.closeAllPanels=function(){r.default.instance.closeAll()},e.closeCurrentPanel=function(){r.default.instance.closeCurrent()},e.changeScene=function(t, e){i.default.instance.change(t,e)},e.getCurrentScene=function(){return i.default.instance.currentScene},e.showAlert=function(t, e){my?my.alert({title:t||"",content:e||""}):console.log(t,e)},e.wait=function(t, e){var n={};return FYGE.Tween.get(n).wait(e).call(t),n},e.clearWait=function(t){FYGE.Tween.removeTweens(t)},e.destroyAllCtrls=function(){s.destroyToast(),o.destroyWaiting(),r.default.instance.destroy(),i.default.instance.destroy()}},function(t, e, n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),r=(i.init=function(){},i.getSprite=function(t, e, n){void 0===e&&(e=0),void 0===n&&(n=0);var r=new FYGE.Sprite(o.RES.getRes(t));return r.x=e,r.y=n,r},i.getText=function(t, e, n, o, r, i, s){void 0===n&&(n="#000000"),void 0===o&&(o=0),void 0===r&&(r=FYGE.TEXT_ALIGN.CENTER),void 0===i&&(i=0),void 0===s&&(s=0);var a=new FYGE.TextField;return a.fillColor=n,a.size=e,a.textWidth=o,a.textAlign=r,a.x=i,a.y=s,a.text=t,a},i.getRect=function(t, e, n, o, r, i, s){void 0===n&&(n=16711680),void 0===o&&(o=1),void 0===r&&(r=0),void 0===i&&(i=0),void 0===s&&(s=0);var a=new FYGE.Graphics;return a.beginFill(n),a.alpha=o,r?a.drawRoundedRect(0,0,t,e,r):a.drawRect(0,0,t,e),a.endFill(),a.position.set(i,s),a},i.initLatData=function(){for(var t=this.width+11,e=this.height+11,n=this.offsetX+this.width/2,o=this.offsetY+this.height/2,r=0; r<this.rowNum; r++)for(var i=0; i<this.colNum; i++)this.rcToIndexMap[""+r+i]=r*this.colNum+i,this.indexToRcMap[r*this.colNum+i]=[r,i],this.rowColPositions[""+r+i]=[n+i*t,o+r*e],this.indexPositions[r*this.colNum+i]=[n+i*t,o+r*e]},i.rcToIndex=function(t, e){var n=""+t+e;return this.rcToIndexMap[n]},i.indexToRc=function(t){return this.indexToRcMap[t]},i.getPositionByRc=function(t, e){var n=""+t+e;return this.rowColPositions[n]},i.getPositionByIndex=function(t){return this.indexPositions[t]},i.cacheKey="hadCompleteHaokelai",i.rowNum=4,i.colNum=4,i.width=125,i.height=125,i.offsetX=106,i.offsetY=600,i.rcToIndexMap={},i.indexToRcMap=[],i.rowColPositions={},i.indexPositions=[],i);function i(){}e.Tool=r},function(t, e, n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(2),i=n(3),s=(Object.defineProperty(a,"instance",{get:function(){return a._instance||(a._instance=new a)},enumerable:!0,configurable:!0}),a.prototype.init=function(t){this._parent=t;var e=new FYGE.Graphics;e.beginFill(0,1),e.drawRect(o.layers.stageOffsetX-t.x,o.layers.stageOffsetY-t.y,o.layers.stageWidth,o.layers.stageHeight),e.endFill(),e.visible=!1,this._parent.addChild(e),this._bg=e},a.prototype.closeAll=function(){this.stacks.forEach((function(t){return t.hidePanel()}))},a.prototype.show=function(t, e){var n=this;r.showWaiting();var o=new t(e);return this.add(o),this.stacks.push(o),o.onLoaded=function(){r.hideWaiting(),n.updateView(),o.start(e)},o.onLoadError=function(){r.hideWaiting(),i.showToast("资源加载失败"),o.removeEventListener("onDestroy",n.onPanelHide,n),n.remove(o)},o},a.prototype.updateView=function(){this.stacks.length?!(this._parent.visible=!0)===this._bg.visible&&(this._bg.visible=!0,this._bg.alpha=0,FYGE.Tween.removeTweens(this._bg),FYGE.Tween.get(this._bg).to({alpha:.7},200,FYGE.Ease.cubicOut)):(this._bg.visible=!1,this._current=null,this._parent.visible=!1);for(var t=0; t<this.stacks.length; t++)t<this.stacks.length-1?this.stacks[t].visible=!1:(this.stacks[t].visible=!0,this.stacks[t].showAni(),this._current=this.stacks[t])},a.prototype.add=function(t){this._parent.addChild(t),t.addEventListener("onDestroy",this.onPanelHide,this)},a.prototype.remove=function(t){this._parent.removeChild(t),this.stacks=this.stacks.filter((function(e){return e!=t}))},a.prototype.onPanelHide=function(t){var e=t.target;e.removeEventListener("onDestroy",this.onPanelHide,this),this.remove(e),this.updateView()},a.prototype.closeCurrent=function(){this._current&&this._current.hidePanel()},a.prototype.destroy=function(){a._instance=null,this.stacks=null,this._current=null,this._parent=null,this._bg.destroy(),this._bg=null},a);function a(){this.stacks=[]}e.default=s},function(t, e, n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),r=n(3),i=(Object.defineProperty(s,"instance",{get:function(){return s._instance||(s._instance=new s)},enumerable:!0,configurable:!0}),s.prototype.init=function(t){this._parent=t},s.prototype.change=function(t, e){var n,i,s=this;this._currentScene&&this._currentScene instanceof t||((n=new t(e)).visible=!1,o.showWaiting(),i=this._currentScene,n.onLoaded=function(){o.hideWaiting(),n.showAni((function(){i&&i.destroy()})),n.visible=!0,n.start()},n.onLoadError=function(){o.hideWaiting(),r.showToast("资源加载失败"),s._currentScene=i||null,s._parent.removeChild(n)},this._currentScene=n,this._parent.addChild(n))},Object.defineProperty(s.prototype,"currentScene",{get:function(){return this._currentScene},enumerable:!0,configurable:!0}),s.prototype.destroy=function(){s._instance=null,this._currentScene=null,this._parent=null},s);function s(){}e.default=i},function(t, e, n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t, e){t.__proto__=e}||function(t, e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t, e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(9),a=(r(u,i=s.Module),u.prototype.showAni=function(t){t()},u.prototype.updateScene=function(){},u);function u(){return null!==i&&i.apply(this,arguments)||this}e.Scene=a},function(t, e, n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t, e){t.__proto__=e}||function(t, e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t, e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(0),a=(r(u,i=FYGE.Container),u.prototype.init=function(){var t=this;this.preLoadRes().then((function(){t.initUi(),t.onLoaded&&t.onLoaded()}),(function(){t.onLoadError&&t.onLoadError()}))},u.prototype.preLoadRes=function(){var t=this;return new Promise((function(e, n){if(t.groupNames&&t.groupNames.length){for(var o=[],r=0; r<t.groupNames.length; r++)o.push(s.RES.loadGroup(t.groupNames[r]));Promise.all(o).then(e,n)}else e()}))},u.prototype.initUi=function(){},Object.defineProperty(u.prototype,"groupNames",{get:function(){return null},enumerable:!0,configurable:!0}),u.prototype.start=function(t){this.initEvents()},u.prototype.initEvents=function(){},u.prototype.removeEvents=function(){},u.prototype.enableMouseEvt=function(t){this.mouseEnable=t,this.mouseChildren=t},u.prototype.destroy=function(){this.data=null,this.removeEvents(),this.dispatchEvent("onDestroy"),i.prototype.destroy.call(this)},u);function u(t){var e=i.call(this)||this;return e.data=t,e.init(),e}e.Module=a},function(t, e, n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=(r.takeOut=function(t){return this.pool[t]&&this.pool[t].length?this.pool[t].shift():null},r.recover=function(t, e){this.pool[t]||(this.pool[t]=[]),this.pool[t].push(e)},r.pool={},r);function r(){}e.GPool=o},function(t, e, n){"use strict";var o=this&&this.__awaiter||function(t, e, n, o){return new(n=n||Promise)((function(r, i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(s,a)}u((o=o.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t, e){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s={next:a(0),throw:a(1),return:a(2)};return"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(; i;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(r=0<(r=i.trys).length&&r[r.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),s=n(0),a=n(4),u=n(12),c=n(20),l=n(21);e.GDispatcher=new FYGE.EventDispatcher;var h=(p.prototype.onAddToStage=function(){return o(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return i.layers.init(this.stage),console.log("初始化层级完成"),s.RES.loadConfig(c.ResJson),console.log("初始化资源配置完成"),[4,s.RES.loadGroup("common")];case 1:return t.sent(),console.log("通用资源加载完成"),a.changeScene(u.StartScene),console.log("恶趣味去"),[2]}}))}))},p.prototype.run=function(){this._pause=!1},p.prototype.pause=function(){this._pause=!0},p.prototype.addGlobalEvent=function(t, n, o, r){void 0===r&&(r=!1),r?e.GDispatcher.once(t,n,o):e.GDispatcher.addEventListener(t,n,o)},p.prototype.dispatchGlobalEvent=function(t, n){e.GDispatcher.dispatchEvent(t,n)},p.prototype.removeGlobalEvent=function(t, n, o){e.GDispatcher.removeEventListener(t,n,o)},p.prototype.destroy=function(){FYGE.Tween.removeAllTweens(),FYGE.getCancelAnimationFrame()(this.requestID),i.destroyLayers(),a.destroyAllCtrls(),this.stage.destroy(),e.GDispatcher.removeAllEventListener(),l.destroyNetData()},p);function p(t){var e;my&&(FYGE.initedByCanvas(t),e=my.getSystemInfoSync());var n=new FYGE.Stage(t,750,1624,e&&e.windowWidth||document.body.clientWidth,e&&e.windowHeight||document.body.clientHeight,FYGE.RENDERER_TYPE.CANVAS);(this.stage=n).addEventListener(FYGE.Event.INIT_STAGE,this.onAddToStage,this);var o=this;!function t(){o._pause||(FYGE.Tween.flush(),n.flush()),o.requestID=FYGE.getRequestAnimationFrame()(t)}()}e.Main=h},function(t, e, n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t, e){t.__proto__=e}||function(t, e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t, e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(8),s=n(0),a=n(4),u=n(1),c=n(13);e.svgaPool={};var l,h=(r(p,l=i.Scene),Object.defineProperty(p.prototype,"groupNames",{get:function(){return["startScene"]},enumerable:!0,configurable:!0}),p.prototype.initUi=function(){l.prototype.initUi.call(this),this.addChild(new FYGE.Sprite(s.RES.getRes("startBg.jpg")))},p.prototype.start=function(){l.prototype.start.call(this),a.showToast("点击下方按钮\n开始游戏"),a.wait((function(){a.showToast("下一句文案\n是否覆盖")}),2e3),this.testMove(),this.testMv();var t=new FYGE.Button(s.RES.getRes("startBtn.png"));t.position.set(151.5,1e3),this.addChild(t),t.addEventListener(FYGE.MouseEvent.CLICK,(function(){console.log("9999546"),a.changeScene(c.PlayScene)}),this)},p.prototype.testMove=function(){var t=new FYGE.Sprite(s.RES.getRes("silverDraft.png"));t.x=500,t.y=0,this.addChild(t),this.addEventListener(FYGE.Event.ENTER_FRAME,(function(){t.y+=5,t.y=Math.round(t.y),1300<t.y&&(t.y=0)}),this)},p.prototype.testScroll=function(){var t=new FYGE.Sprite(s.RES.getRes("startBg.jpg")),e=new FYGE.ScrollPage(750,u.layers.stageHeight,1624,!0,!0);e.view.addChild(t),this.addChild(e),e.x=100,e.y=100;var n=new FYGE.ScrollPage(750,200,1624,!1,!1);n.maxDistance=2090,n.y=900,e.view.addChild(n);for(var o=0; o<10; o++){var r=new FYGE.Sprite(s.RES.getRes("silverDraft.png"));r.width=200,r.height=200,r.x=10*o+200*o,n.view.addChild(r)}},p.prototype.testGraphics=function(){var t=new FYGE.Graphics;t.beginFill(16711680,.7),t.drawEllipse(200,200,200,300),t.endFill(),this.addChild(t)},p.prototype.testSprite=function(){for(var t=s.RES.getRes("silverDraft.png"),e=0; e<2500; e++){var n=new FYGE.Sprite(t);n.x=750*Math.random(),n.y=1206*Math.random(),this.addChild(n)}},p.prototype.testMv=function(){var t=this;SvgaParser.loadSvga("cloud://A8673B47AAA58993A24A6718E203B967//dice.svga",(function(e){var n=new FYGE.MovieClip(e);t.addChild(n)}),(function(){console.log(123)}))},p);function p(){return null!==l&&l.apply(this,arguments)||this}e.StartScene=h},function(t, e, n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t, e){t.__proto__=e}||function(t, e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t, e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s,a=n(8),u=n(4),c=n(5),l=n(10),h=n(14),p=n(15),f=n(16),d=n(17);(s=i=i||{})[s.left=0]="left",s[s.right=1]="right",s[s.up=2]="up",s[s.down=3]="down";var y,g=(r(v,y=a.Scene),Object.defineProperty(v.prototype,"groupNames",{get:function(){return["playScene"]},enumerable:!0,configurable:!0}),v.prototype.initUi=function(){this.addChild(c.Tool.getSprite("playBg.jpg")),c.Tool.initLatData(),this.lats=new Array(16),u.showToast("啊哦,没法移动了\n重置中")},v.prototype.start=function(){y.prototype.start.call(this),this.resetGame()},v.prototype.resetGame=function(){for(var t,e=0; e<this.lats.length; e++)this.lats[e]&&(t=this.lats[e],this.removeChild(t),l.GPool.recover("gameEle",t),this.lats[e]=null);this.generateOne(),this.generateOne()},v.prototype.generateOne=function(t, e){var n=this,o=(t=void 0===t?this.getOneEmptyIndex():t,void 0===e?Math.random()<.5?2:4:e),r=l.GPool.takeOut("gameEle");r?r.reset(o):r=new p.GameEle(o),this.addChild(r),r.position.set(c.Tool.getPositionByIndex(t)[0],c.Tool.getPositionByIndex(t)[1]),(this.lats[t]=r).index=t,r.scale.set(.1,.1),FYGE.Tween.get(r).to({scaleX:1,scaleY:1},100,FYGE.Ease.backOut).call((function(){!function(t){if(!function(t){for(var e=0; e<t.length; e++)if(!t[e])return 1}(t)){for(var e=0; e<t.length; e++){var n=t[e],o=c.Tool.indexToRc(e);if(o[1]<c.Tool.colNum-1&&n.type==t[e+1].type)return;if(o[0]<c.Tool.rowNum-1&&n.type==t[e+c.Tool.colNum].type)return}return 1}}(n.lats)?n.moveMark=!0:(u.showToast("啊哦,没法移动了\n重置中"),setTimeout((function(){n.resetGame()}),1600))}))},v.prototype.getOneEmptyIndex=function(){for(var t=[],e=0; e<this.lats.length; e++)this.lats[e]||t.push(e);return t.length?(h.GTool.disturbNumberArr(t),t[0]):null},v.prototype.onMouseDown=function(t){var e,n,o,r;function i(t){o=t.stageX-e,r=t.stageY-n}function s(){this.removeEventListener(FYGE.MouseEvent.MOUSE_MOVE,i,this),this.removeEventListener(FYGE.MouseEvent.MOUSE_UP,s,this),this.removeEventListener(FYGE.MouseEvent.MOUSE_OUT,s,this),this.checkMove(o,r),this.hasDown=!1}this.moveMark&&(this.hasDown||(this.hasDown=!0,e=t.stageX,n=t.stageY,this.addEventListener(FYGE.MouseEvent.MOUSE_MOVE,i,this),this.addEventListener(FYGE.MouseEvent.MOUSE_UP,s,this),this.addEventListener(FYGE.MouseEvent.MOUSE_OUT,s,this)))},v.prototype.checkMove=function(t, e){var n,o=this;if(Math.abs(t)>Math.abs(e)?(0<t&&(n=this.checkRight()),t<0&&(n=this.checkLeft())):0<e?n=this.checkDown():e<0&&(n=this.checkUp()),n&&n.length){this.moveMark=!1;for(var r=0,i=n.length,s=0; s<n.length; s++){var a=n[s];this.lats[a.startEle1.index]=null,a.startEle1.index=a.endIndex,this.lats[a.endIndex]=a.startEle1,a.startEle2&&(this.lats[a.startEle2.index]=null,a.startEle1.tempType=2*a.startEle1.type),f.moveAni((function(){++r==i&&(o.check2048()?u.showPanel(d.UnlockPanel,{closeFun:function(){o.resetGame()},grade:2048}):o.generateOne())}),a.startEle1,a.endIndex,a.startEle2)}}},v.prototype.checkLeft=function(){for(var t=[],e=0; e<c.Tool.rowNum; e++){for(var n=[],o=0; o<c.Tool.colNum; o++)n.push(e*c.Tool.colNum+o);t=t.concat(w(n,this.lats))}return t},v.prototype.checkRight=function(){for(var t=[],e=0; e<c.Tool.rowNum; e++){for(var n=[],o=c.Tool.colNum-1; 0<=o; o--)n.push(e*c.Tool.colNum+o);t=t.concat(w(n,this.lats))}return t},v.prototype.checkUp=function(){for(var t=[],e=0; e<c.Tool.colNum; e++){for(var n=[],o=0; o<c.Tool.rowNum; o++)n.push(e+c.Tool.rowNum*o);t=t.concat(w(n,this.lats))}return t},v.prototype.checkDown=function(){for(var t=[],e=0; e<c.Tool.colNum; e++){for(var n=[],o=c.Tool.rowNum-1; 0<=o; o--)n.push(e+c.Tool.rowNum*o);t=t.concat(w(n,this.lats))}return t},v.prototype.check2048=function(){for(var t=0; t<this.lats.length; t++)if(this.lats[t]&&2048==(this.lats[t].tempType||this.lats[t].type))return!0;return!1},v.prototype.initEvents=function(){y.prototype.initEvents.call(this),this.addEventListener(FYGE.MouseEvent.MOUSE_DOWN,this.onMouseDown,this)},v.prototype.removeEvents=function(){y.prototype.removeEvents.call(this),this.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN,this.onMouseDown,this)},v.prototype.unlock=function(){},v);function v(){var t=null!==y&&y.apply(this,arguments)||this;return t.score=0,t}function w(t, e){for(var n,o,r=[],i=[],s=0; s<t.length; s++)e[o=t[s]]?n&&n.startEle1.type==e[o].type?(n.startEle2=e[o],-1==r.indexOf(n)&&r.push(n),n=null,i.push(o)):i.length?(n={startEle1:e[o],endIndex:i.shift()},r.push(n),i.push(o)):n={startEle1:e[o],endIndex:o}:i.push(o);return r}e.PlayScene=g},function(t, e, n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=(r.changeURLArg=function(t, e, n){var o=e+"=([^&]*)",r=e+"="+n;if(t.match(o)){var i="/("+e+"=)([^&]*)/gi";return t.replace(new RegExp(i),r)}return t.match("[?]")?t+"&"+r:t+"?"+r},r.readCache=function(t, e){return void 0===e&&(e="localStorage"),!!window.localStorage&&window[e].getItem(t)},r.writeCache=function(t, e, n){void 0===e&&(e="true"),void 0===n&&(n="localStorage"),window.localStorage&&window[n].setItem(t,e)},r.returnTodayTimes=function(t){var e=this.readCache("year"+t),n=this.readCache("month"+t),o=this.readCache("day"+t),r=new Date,i=r.getFullYear().toString(),s=r.getMonth().toString(),a=r.getDate().toString();return this.int(i)<=this.int(e)&&this.int(s)<=this.int(n)&&this.int(a)<=this.int(o)?this.int(this.readCache(t)):(this.writeCache("year"+t,i),this.writeCache("month"+t,s),this.writeCache("day"+t,a),this.writeCache(t,"0"),0)},r.randomT=function(t, e){return t&&"number"==typeof t.length&&t.length?t[Math.floor(Math.random()*t.length)]:("number"!=typeof e&&(e=t||1,t=0),t+Math.random()*(e-t))},r.removeEle=function(t, e){var n=e.indexOf(t);0<=n&&e.splice(n,1)},r.insert=function(t, e){for(var n=e.length-1; 0<=n; n--)if(t>e[n]){e.splice(n+1,0,t);break}},r.getRandomNumber=function(t, e, n){for(var o=[],r=0; r<n; r++){var i=Math.floor(Math.random()*(e-t+1)+t);o.indexOf(i)<0?o.push(i):r--}return o},r.disturbNumberArr=function(t){t.sort((function(){return.5-Math.random()}))},r.getRandomArrayElements=function(t, e){var n,o,r=t.slice(0),i=t.length,s=i-e;if(s<=0)return r;if(e<=0)return[];for(; i-- >s;)n=r[o=Math.floor((i+1)*Math.random())],r[o]=r[i],r[i]=n;return r.slice(s)},r.getRandomArrayElementsEx=function(t, e){if(t.length<=e)return t.slice();if(e<=0)return[];for(var n=t.slice(),o=[]; e--;){var r=Math.floor(Math.random()*n.length),i=n.splice(r,1)[0];o.push(i)}return o},r.int=function(t){return t>>0},r.addSpaceInString=function(t){if(!t.length||1==t.length)return t;for(var e="",n=0; n<t.length-1; n++)e=e+t[n]+" ";return e+t[t.length-1]},r.emojiReg=/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,r);function r(){}e.GTool=o},function(t, e, n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t, e){t.__proto__=e}||function(t, e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t, e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(0),a=n(5),u=(r(c,i=FYGE.Sprite),Object.defineProperty(c.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t,this.texture=s.RES.getRes("ele"+t+".png")},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"tempType",{get:function(){return this._tempType},set:function(t){this._tempType=t},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"row",{get:function(){return a.Tool.indexToRc(this.index)[0]},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"col",{get:function(){return a.Tool.indexToRc(this.index)[1]},enumerable:!0,configurable:!0}),c.prototype.reset=function(t){this.type=t,this.scale.set(1,1)},c);function c(t){var e=i.call(this)||this;return e._tempType=null,e.type=t,e.anchorTexture.set(.5,.5),e}e.GameEle=u},function(t, e, n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(5),r=n(10);e.moveAni=function(t, e, n, i){var s=2*e.type,a=o.Tool.getPositionByIndex(n);FYGE.Tween.get(e).to({x:a[0],y:a[1]},200).call((function(){t(),i&&FYGE.Tween.get(e).to({scaleX:.1,scaleY:.1},100).call((function(){e.type=s,e.tempType=null})).to({scaleX:1,scaleY:1},100,FYGE.Ease.backOut)})),i&&FYGE.Tween.get(i).to({x:a[0],y:a[1]},200).call((function(){i.parent.removeChild(i),r.GPool.recover("gameEle",i)}))}},function(t, e, n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t, e){t.__proto__=e}||function(t, e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t, e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s,a=n(5),u=n(18),c=n(0),l=n(19),h=(r(p,i=u.Panel),Object.defineProperty(p.prototype,"groupNames",{get:function(){return["unlockPanel"]},enumerable:!0,configurable:!0}),p.prototype.initUi=function(){this.addChild(new l.Light).position.set(375,735),this.addChild(a.Tool.getSprite("unlockPanelBg.png")),this.closeBtn=new FYGE.Button(c.RES.getRes("comCloseBtn.png")),this.closeBtn.position.set(614,460),this.addChild(this.closeBtn),this.addChild(new FYGE.Button(c.RES.getRes("zailaiyiju.png"))).once(FYGE.MouseEvent.CLICK,this.onClick_closeBtn,this).position.set(258.5,938),this.addChild(new FYGE.Sprite(c.RES.getRes("unlock"+this.data.grade+".png"))).position.set(130.5,600)},p.prototype.start=function(t){i.prototype.start.call(this)},p.prototype.initEvents=function(){this.closeBtn.addEventListener(FYGE.MouseEvent.CLICK,this.onClick_closeBtn,this)},p.prototype.onClick_closeBtn=function(){this.data.closeFun(),this.hidePanel()},p.prototype.removeEvents=function(){this.closeBtn.removeEventListener(FYGE.MouseEvent.CLICK,this.onClick_closeBtn,this)},p);function p(){return null!==i&&i.apply(this,arguments)||this}e.UnlockPanel=h,r((function(t){var e=s.call(this)||this,n=new FYGE.Sprite(c.RES.getRes("unlockMsg.png"));e.addChild(n);for(var o={},r=0; r<10; r++)o[r]=c.RES.getRes("n"+r+".png");var i=new FYGE.BitmapText(o);i.textAlign=FYGE.TEXT_ALIGN.LEFT,i.text=t+"",e.addChild(i);var a=n.width+i.width;return n.position.set((750-a)/2,548),i.position.set(n.x+n.width,552),e}),s=FYGE.Container)},function(t, e, n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t, e){t.__proto__=e}||function(t, e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t, e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(9),a=(r(u,i=s.Module),u.prototype.showAni=function(){var t,e=this;this.isShowing||(this.isShowing=!0,t=this.y||0,this.y=-200,FYGE.Tween.get(this).to({y:t},500,FYGE.Ease.quartOut).call((function(){e.isShowing=!1})))},u.prototype.initEvents=function(){var t=this;this.closeBtns.forEach((function(e){e&&e.addEventListener(FYGE.MouseEvent.CLICK,t.hidePanel,t)}))},u.prototype.removeEvents=function(){var t=this;this.closeBtns.forEach((function(e){e&&e.removeEventListener(FYGE.MouseEvent.CLICK,t.hidePanel,t)}))},Object.defineProperty(u.prototype,"closeBtns",{get:function(){return[this.closeBtn]},enumerable:!0,configurable:!0}),u.prototype.hidePanel=function(){this.destroy()},u);function u(){return null!==i&&i.apply(this,arguments)||this}e.Panel=a},function(t, e, n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t, e){t.__proto__=e}||function(t, e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t, e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(0),a=(r(u,i=FYGE.Sprite),u);function u(){var t=i.call(this)||this;return t.texture=s.RES.getRes("light.png"),t.anchorTexture.set(.5,.5),t.addEventListener(FYGE.Event.ENTER_FRAME,(function(){t.rotation+=1}),t),t}e.Light=a},function(t, e, n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResJson={groups:[{keys:"comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",name:"common",atlas:{"comCloseBtn.png":{x:646,y:60,w:48,h:48,ox:0,oy:0,sw:48,sh:48,ro:!1},"toastBg.png":{x:184,y:2,w:460,h:130,ox:0,oy:0,sw:460,sh:130,ro:!1},"waitingBg.png":{x:2,y:2,w:160,h:180,ox:0,oy:0,sw:160,sh:180,ro:!0},"waitingRot.png":{x:646,y:2,w:56,h:56,ox:0,oy:0,sw:56,sh:56,ro:!1}}},{keys:"ele1024.png,ele128.png,ele16.png,ele2.png,ele2048.png,ele256.png,ele32.png,ele4.png,ele512.png,ele64.png,ele8.png,guideArrow.png,guideFinger.png,playBg.jpg",name:"playScene",atlas:{"ele1024.png":{x:2,y:858,w:100,h:99,ox:0,oy:0,sw:100,sh:99,ro:!1},"ele128.png":{x:2,y:385,w:106,h:92,ox:0,oy:0,sw:106,sh:92,ro:!1},"ele16.png":{x:2,y:755,w:102,h:101,ox:0,oy:0,sw:102,sh:101,ro:!1},"ele2.png":{x:2,y:664,w:103,h:89,ox:0,oy:0,sw:103,sh:89,ro:!1},"ele2048.png":{x:2,y:93,w:110,h:92,ox:0,oy:0,sw:110,sh:92,ro:!1},"ele256.png":{x:2,y:571,w:104,h:91,ox:0,oy:0,sw:104,sh:91,ro:!1},"ele32.png":{x:2,y:187,w:108,h:92,ox:0,oy:0,sw:108,sh:92,ro:!1},"ele4.png":{x:2,y:959,w:129,h:92,ox:0,oy:0,sw:129,sh:92,ro:!0},"ele512.png":{x:2,y:479,w:106,h:90,ox:0,oy:0,sw:106,sh:90,ro:!1},"ele64.png":{x:2,y:281,w:107,h:102,ox:0,oy:0,sw:107,sh:102,ro:!1},"ele8.png":{x:2,y:2,w:111,h:89,ox:0,oy:0,sw:111,sh:89,ro:!1},"guideArrow.png":{x:82,y:1090,w:51,h:14,ox:0,oy:0,sw:51,sh:14,ro:!0},"guideFinger.png":{x:2,y:1090,w:53,h:78,ox:0,oy:0,sw:53,sh:78,ro:!0}}},{keys:"silverDraft.png,startBg.jpg,startBtn.png",name:"startScene",atlas:{"silverDraft.png":{x:2,y:2,w:112,h:132,ox:0,oy:0,sw:112,sh:132,ro:!0},"startBtn.png":{x:136,y:2,w:447,h:106,ox:0,oy:0,sw:447,sh:106,ro:!1}}},{keys:"light.png,unlock1024.png,unlock128.png,unlock16.png,unlock2.png,unlock2048.png,unlock256.png,unlock32.png,unlock512.png,unlock64.png,unlock8.png,unlockMsg.png,unlockPanelBg.png,zailaiyiju.png",name:"unlockPanel",atlas:{"light.png":{x:2,y:2,w:1158,h:1190,ox:0,oy:90,sw:1162,sh:1280,ro:!0},"unlock1024.png":{x:1194,y:754,w:227,h:191,ox:143,oy:93,sw:449,sh:363,ro:!1},"unlock128.png":{x:1868,y:2,w:197,h:165,ox:142,oy:101,sw:449,sh:363,ro:!0},"unlock16.png":{x:1835,y:955,w:183,h:179,ox:150,oy:87,sw:449,sh:363,ro:!1},"unlock2.png":{x:1868,y:201,w:185,h:163,ox:143,oy:96,sw:449,sh:363,ro:!0},"unlock2048.png":{x:1423,y:754,w:229,h:187,ox:127,oy:74,sw:449,sh:363,ro:!1},"unlock256.png":{x:1853,y:754,w:199,h:169,ox:137,oy:96,sw:449,sh:363,ro:!0},"unlock32.png":{x:1632,y:943,w:201,h:175,ox:139,oy:92,sw:449,sh:363,ro:!1},"unlock512.png":{x:1423,y:943,w:207,h:171,ox:127,oy:87,sw:449,sh:363,ro:!1},"unlock64.png":{x:1654,y:754,w:197,h:187,ox:134,oy:81,sw:449,sh:363,ro:!1},"unlock8.png":{x:1194,y:947,w:225,h:179,ox:101,oy:88,sw:449,sh:363,ro:!1},"unlockMsg.png":{x:1868,y:388,w:276,h:40,ox:0,oy:0,sw:276,sh:40,ro:!0},"unlockPanelBg.png":{x:1194,y:2,w:672,h:750,ox:30,oy:386,sw:750,sh:1624,ro:!1},"zailaiyiju.png":{x:1910,y:388,w:233,h:77,ox:0,oy:0,sw:233,sh:77,ro:!0}}}],path:"https://yun.duiba.com.cn/db_games/activity/anything/1590719783/resource/"}},function(t, e, n){"use strict";var o=this&&this.__awaiter||function(t, e, n, o){return new(n=n||Promise)((function(r, i){function s(t){try{u(o.next(t))}catch(t){i(t)}}function a(t){try{u(o.throw(t))}catch(t){i(t)}}function u(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(s,a)}u((o=o.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t, e){var n,o,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s={next:a(0),throw:a(1),return:a(2)};return"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(; i;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,o=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(r=0<(r=i.trys).length&&r[r.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}};Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(4);(i=e.TbNetName||(e.TbNetName={})).aaa="aaa",i.getCredits="getCredits",i.startGame="startGame",i.submit="submit",i.getTools="getTools",i.getTaskList="getTaskList",i.getToolsByType="getToolsByType",i.useTools="useTools";var a,u={};e.sendTbNet=function(t, e, n, i){void 0===i&&(i=!1);var l=s.wait((function(){i||s.showToast("网络超时"),n(!1)}),5e3);my?(a=a||getApp().cloud.function).invoke("becheery",e,t).then((function(e){s.clearWait(l),u[t]=e,i||e.success||s.showToast(c[e.code]||e.message||"网络异常"),n(e.success,e)})):function(t){return o(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[4,e.sent().json()];case 2:return[2,e.sent()]}}))}))}("../../mock/miniTb/"+t+".json").then((function(t){s.clearWait(l),u[name]=t,i||t.success||s.showToast(t.message||"网络异常"),n(t.success,t)}),(function(){}))},e.getTbData=function(t){return u[t]||null},e.destroyNetData=function(){u={}};var c={210001:"服务器异常",210002:"用户不存在",210003:"邀请已达上限",210004:"无法邀请自己",210006:"该活动ID无效",210009:"该活动暂未开始",210010:"该分享ID不存在",210012:"该用户暂未获奖",210013:"领取失败",210015:"该活动已删除",210016:"该活动已经结束",210017:"该奖品已达领取上线",210018:"请先分享好友",210019:"暂有奖品未领取",210020:"暂有奖品未完成",210021:"请先玩一局游戏",210022:"请先选择奖品",210023:"领取失败,库存不足",210024:"请先成为会员",210025:"奖品已经过期",210026:"不能重复助力",210028:"请至我的奖品页重新领取"}}],t.c=n,t.d=function(e, n, o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__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 o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(t){return e[t]}.bind(null,r));return o},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(t, e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=11);function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e,n}));
{
"closeBtn.png": {
"x": 164,
"y": 134,
"w": 60,
"h": 60,
"ox": 0,
"oy": 0,
"sw": 60,
"sh": 60,
"ro": false
},
"comCloseBtn.png": {
"x": 646,
"y": 60,
"x": 284,
"y": 134,
"w": 48,
"h": 48,
"ox": 0,
......@@ -11,7 +22,7 @@
"ro": false
},
"toastBg.png": {
"x": 184,
"x": 164,
"y": 2,
"w": 460,
"h": 130,
......@@ -30,11 +41,11 @@
"oy": 0,
"sw": 160,
"sh": 180,
"ro": true
"ro": false
},
"waitingRot.png": {
"x": 646,
"y": 2,
"x": 226,
"y": 134,
"w": 56,
"h": 56,
"ox": 0,
......
released/resource/common/common.png

1.08 KB | W: | H:

released/resource/common/common.png

1.76 KB | W: | H:

released/resource/common/common.png
released/resource/common/common.png
released/resource/common/common.png
released/resource/common/common.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -54,7 +54,7 @@
"sh": 133,
"ro": false
},
"game_鏀惰幏.png": {
"game_get.png": {
"x": 3246,
"y": 97,
"w": 82,
......@@ -65,7 +65,7 @@
"sh": 93,
"ro": true
},
"game_娴囨按.png": {
"game_plant.png": {
"x": 3154,
"y": 2,
"w": 90,
......@@ -76,7 +76,7 @@
"sh": 101,
"ro": false
},
"game_绉嶆.png": {
"game_water.png": {
"x": 3062,
"y": 2,
"w": 90,
......
{
"groups": [
{
"keys": "comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",
"keys": "closeBtn.png,comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",
"name": "common",
"atlas": "common.json"
},
{
"keys": "btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_收获.png,game_浇水.png,game_种植.png,广告.png,用户_bg.png,用户_头像.png,用户_水.png,田_初始.png,田_种植.png,田_选择.png,种植框_bg.png,种植框_left.png,种植框_right.png,种植框_山核桃.png,种植框_开心果.png,种植框_板栗.png,种植框_瓜子.png,种植框_腰果.png,种植框_花生.png,种植框_袋子.png,进度_bg.png,进度_fill.png",
"keys": "btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_get.png,game_plant.png,game_water.png,广告.png,用户_bg.png,用户_头像.png,用户_水.png,田_初始.png,田_种植.png,田_选择.png,种植框_bg.png,种植框_left.png,种植框_right.png,种植框_山核桃.png,种植框_开心果.png,种植框_板栗.png,种植框_瓜子.png,种植框_腰果.png,种植框_花生.png,种植框_袋子.png,进度_bg.png,进度_fill.png",
"name": "gameScene",
"atlas": "gameScene.json"
},
{
"keys": "rule_bg.png",
"name": "rulePanel",
"atlas": "rulePanel.json"
}
],
"path": "./resource/"
......
{
"rule_bg.png": {
"x": 2,
"y": 2,
"w": 560,
"h": 584,
"ox": 95,
"oy": 519,
"sw": 750,
"sh": 1624,
"ro": true
}
}
\ No newline at end of file
resource/gameScene/田_初始.png

17.2 KB | W: | H:

resource/gameScene/田_初始.png

21.8 KB | W: | H:

resource/gameScene/田_初始.png
resource/gameScene/田_初始.png
resource/gameScene/田_初始.png
resource/gameScene/田_初始.png
  • 2-up
  • Swipe
  • Onion skin
resource/gameScene/田_选择.png

17.1 KB | W: | H:

resource/gameScene/田_选择.png

19.9 KB | W: | H:

resource/gameScene/田_选择.png
resource/gameScene/田_选择.png
resource/gameScene/田_选择.png
resource/gameScene/田_选择.png
  • 2-up
  • Swipe
  • Onion skin
{
"groups": [
{
"keys": "comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",
"keys": "closeBtn.png,comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",
"name": "common"
},
{
"keys": "btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_收获.png,game_浇水.png,game_种植.png,广告.png,用户_bg.png,用户_头像.png,用户_水.png,田_初始.png,田_种植.png,田_选择.png,种植框_bg.png,种植框_left.png,种植框_right.png,种植框_山核桃.png,种植框_开心果.png,种植框_板栗.png,种植框_瓜子.png,种植框_腰果.png,种植框_花生.png,种植框_袋子.png,进度_bg.png,进度_fill.png",
"keys": "btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_get.png,game_plant.png,game_water.png,广告.png,用户_bg.png,用户_头像.png,用户_水.png,田_初始.png,田_种植.png,田_选择.png,种植框_bg.png,种植框_left.png,种植框_right.png,种植框_山核桃.png,种植框_开心果.png,种植框_板栗.png,种植框_瓜子.png,种植框_腰果.png,种植框_花生.png,种植框_袋子.png,进度_bg.png,进度_fill.png",
"name": "gameScene"
},
{
"keys": "rule_bg.png",
"name": "rulePanel"
}
],
"path": "./resource/"
......
export const ResJson = {
"groups": [
{
"keys": "comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",
"keys": "closeBtn.png,comCloseBtn.png,toastBg.png,waitingBg.png,waitingRot.png",
"name": "common"
},
{
"keys": "btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_收获.png,game_浇水.png,game_种植.png,广告.png,用户_bg.png,用户_头像.png,用户_水.png,田_初始.png,田_种植.png,田_选择.png,种植框_bg.png,种植框_left.png,种植框_right.png,种植框_山核桃.png,种植框_开心果.png,种植框_板栗.png,种植框_瓜子.png,种植框_腰果.png,种植框_花生.png,种植框_袋子.png,进度_bg.png,进度_fill.png",
"keys": "btn_仓库.png,btn_兑换记录.png,btn_商店.png,btn_规则.png,btn_领水滴.png,game_bg.jpg,game_get.png,game_plant.png,game_water.png,广告.png,用户_bg.png,用户_头像.png,用户_水.png,田_初始.png,田_种植.png,田_选择.png,种植框_bg.png,种植框_left.png,种植框_right.png,种植框_山核桃.png,种植框_开心果.png,种植框_板栗.png,种植框_瓜子.png,种植框_腰果.png,种植框_花生.png,种植框_袋子.png,进度_bg.png,进度_fill.png",
"name": "gameScene"
},
{
"keys": "rule_bg.png",
"name": "rulePanel"
}
],
"path": "./resource/"
......
import Option from "../parts/Game/Option";
/**
* option的类型枚举
*/
export enum OPTION_TYPE {
PLANT = 'plant',
WATER = 'water',
GET = 'get'
}
/**
* option的池
*/
export default class OptionPool {
// 单例
private static _ins: OptionPool;
public static get ins(): OptionPool {
return OptionPool._ins || (OptionPool._ins = new OptionPool());
}
// 缓存池
private pool = {
plant: [],
water: [],
get: [],
}
private constructor() {
// 先加一些缓存起来
[1, 2, 3, 4].forEach(() => {
this.pool.plant.push(new Option(OPTION_TYPE.PLANT));
this.pool.water.push(new Option(OPTION_TYPE.WATER));
this.pool.get.push(new Option(OPTION_TYPE.GET));
});
}
public takeOut(type: OPTION_TYPE) {
return this.pool[type].splice(0, 1)[0] || new Option(type);
}
public takeIn(option: Option) {
option.reset();
this.pool[option.type].push(option);
}
}
import { Panel } from "../../module/views/Panel";
import { Tool } from "../Tools";
import Sprite = FYGE.Sprite;
import ScrollPage = FYGE.ScrollPage;
import TextField = FYGE.TextField;
import TEXT_lINETYPE = FYGE.TEXT_lINETYPE;
export class RulePanel extends Panel {
get groupNames() {
return ["rulePanel"];
}
closeBtn: Sprite;
scroll: ScrollPage;
ruleLabel: TextField;
initUi() {
this.addChild(Tool.getSprite("rule_bg.png"));
this.closeBtn = this.addChild(Tool.getSprite('closeBtn.png'));
this.closeBtn.position.set(600, 350);
this.ruleLabel = new TextField();
this.ruleLabel.textWidth = 430;
this.ruleLabel.lineType = TEXT_lINETYPE.MULTI;
this.ruleLabel.size = 28;
this.ruleLabel.fillColor = '#c28b4c';
this.ruleLabel.text = "<p>哈哈哈哈哈哈</p>哈<p>djkahsdahsjjfda</p><p>规则</p><p>规则</p><p>规则</p>" +
"<p>规则</p><p>规则</p><p>规则</p><p>规则</p><p>规则</p>" +
"<p>规则</p><p>规则</p><p>规则</p><p>规则</p><p>规则</p>";
this.scroll = this.addChild(new ScrollPage(430, 360, this.ruleLabel.textHeight));
this.scroll.position.set(170, 675);
this.scroll.view.addChild(this.ruleLabel);
}
start(data) {
super.start();
}
initEvents() {
this.closeBtn.addEventListener(FYGE.MouseEvent.CLICK, this.hidePanel, this)
}
removeEvents() {
this.closeBtn.removeEventListener(FYGE.MouseEvent.CLICK, this.hidePanel, this)
}
}
import Container = FYGE.Container;
import { Land } from "./Land";
import PlantList from "./PlantList";
import FrameAni = FYGE.FrameAni;
export default class GameLayer extends Container{
constructor() {
/**
* GameLayer
* @instance 单例
*/
export default class GameLayer extends Container {
// 单例
private static _ins: GameLayer;
public static get ins() {
return GameLayer._ins || (GameLayer._ins = new GameLayer());
}
public destroy() {
super.destroy();
this.removeEvent();
GameLayer._ins = null; // 一定要清除单例
}
private landList = []; // 土地列表
public plantList: PlantList; // 种植列表
private constructor() {
super();
new FrameAni([]);
this.initLand();
// 种植列表
this.plantList = this.addChild(new PlantList());
}
// 取消所有土地的选中状态
public deactivateAllLand() {
this.landList.forEach((v) => {
v.deactivate();
});
}
public initEvent() {
}
public removeEvent() {
}
private initLand() {
const pos = [
[99, 730],
[334, 875],
[13, 939],
[248, 1083]
];
[1, 2, 3, 4].forEach((v) => {
let newLand = this.addChild(new Land());
newLand.position.set(pos[v - 1][0], pos[v - 1][1]);
newLand.id = v;
this.landList.push(newLand);
});
}
}
import Container = FYGE.Container;
import { RES } from "../../../module/RES";
import Sprite = FYGE.Sprite;
import DisplayObject = FYGE.DisplayObject;
import MouseEvent = FYGE.MouseEvent;
import GameLayer from "./GameLayer";
class Land extends Container {
export enum LAND_STATE {
DEFAULT = 'default',
CHOOSE = 'choose',
PLANT = 'plant',
}
export class Land extends Container {
// 田_初始.png 田_种植.png 田_选择.png
// 三个田的选择状态对应的texture
private land_default_texture = RES.getRes('田_初始.png');
private land_choose_texture = RES.getRes('田_选择.png');
private land_plant_texture = RES.getRes('田_种植.png');
private landSprite = new Sprite();
private state;
// id
private _id;
public set id(id: number) {
this._id = id;
}
public get id(): number {
return this._id;
}
constructor() {
super();
this.addChild(this.landSprite);
// 改写点击方法
this.landSprite.hitTestPoint = function(point, isMouseEvent = false) {
// |Ax*Th/2|+|Ay*Tw/2|=Th*Tw/4 时点是在菱形上的。>时在菱形区域外,<时在菱形内的。
if (!this.visible) return null;
if (isMouseEvent && !this.mouseEnable) return null;
let p = point;
if (isMouseEvent) {
p = this.globalToLocal(point, DisplayObject._bp);
}
p.x -= this.width / 2;
p.y -= this.height / 2;
let judge = Math.abs(p.x * this.height / 2) + Math.abs(p.y * this.width / 2) <= this.width * this.height / 4;
return judge ? this : null;
}.bind(this.landSprite);
this.addEventListener(MouseEvent.CLICK, () => {
console.log(`点到了土地: ${this.id}`);
GameLayer.ins.plantList.show(this.id); // 显示种植列表
GameLayer.ins.deactivateAllLand();
this.activate(); // 变成选中状态
});
this.changeState(LAND_STATE.DEFAULT);
}
public changeState(state) {
if (state == this.state) return;
this.state = state;
this.landSprite.texture = this[`land_${this.state}_texture`];
}
/**
* 在不是种植状态的基础上改变为选中状态
*/
public activate() {
// 如果是已经是选中状态或种植状态则啥都干
if (LAND_STATE.CHOOSE === this.state || LAND_STATE.PLANT === this.state) return;
this.changeState(LAND_STATE.CHOOSE);
}
/**
* 在不是种植状态的基础上改变为默认状态
*/
public deactivate() {
// 如果是已经是默认状态或种植状态则啥都干
if (LAND_STATE.DEFAULT === this.state || LAND_STATE.PLANT === this.state) return;
this.changeState(LAND_STATE.DEFAULT);
}
}
import Sprite = FYGE.Sprite;
import { RES } from "../../../module/RES";
import { OPTION_TYPE } from "../../const/OptionPool";
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
export default class Option extends Sprite {
private _type: OPTION_TYPE;
public get type(): OPTION_TYPE {
return this._type;
}
constructor(type: OPTION_TYPE) {
super(RES.getRes(`game_${type}.png`));
this._type = type;
this.anchor.set(this.width / 2, this.height);
this.scale.set(0, 0);
}
/**
* 播放这个Option的动画
*/
public play() {
this.stop(); // 先stop
Tween.get(this)
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1, scaleY: 1}, 200, Ease.quadInOut)
.call(() => {
const _y = this.y;
Tween.get(this, {loop: true})
.to({y: _y - 10}, 200, Ease.quadInOut)
.to({y: _y}, 200, Ease.quadInOut);
});
}
/**
* 停止这个Option的动画
*/
public stop() {
Tween.removeTweens(this);
}
/**
* 重置这个Option的动画
*/
public reset() {
this.stop(); // 先停止
this.scale.set(0, 0);
this.removeAllEventListener();
}
}
......@@ -8,8 +8,83 @@ import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import VERTICAL_ALIGN = FYGE.VERTICAL_ALIGN;
import Sprite = FYGE.Sprite;
import { RES } from "../../../module/RES";
import Tween = FYGE.Tween;
import Ease = FYGE.Ease;
import GameLayer from "./GameLayer";
export default class PlantList extends Container {
private scrollList: ScrollList;
// 对应哪个土地,即点击哪个土地来显示这个列表
private _bindId = -1;
public get bindId() {
return this._bindId;
}
constructor() {
super();
// bg
this.addChild(Tool.getSprite('种植框_bg.png'));
// tip: left and right
this.addChild(Tool.getSprite('种植框_left.png'))
.position.set(15, (this.height - 34) / 2);
this.addChild(Tool.getSprite('种植框_right.png'))
.position.set(this.width - 33, (this.height - 34) / 2);
// 列表
this.scrollList = this.addChild(new ScrollList(ListPlant, 123, 160, 500, 160, false));
const data = [];
for (let k in PLANT) {
if (k == PLANT.NONE) continue;
data.push(PLANT[k]);
}
this.scrollList.updateData(data);
this.scrollList.x = (this.width - 500) / 2;
this.x = (750 - this.width) / 2;
this.y = 500;
this.visible = false;
}
/**
* 显示种植列表
* @param landId 对应的是哪块土地
*/
public show(landId) {
this._bindId = landId;
if (this.visible) return;
this.visible = true;
Tween.removeTweens(this);
Tween.get(this)
.set({alpha: 0})
.to({alpha: 1}, 300, Ease.quadInOut);
};
public hidden() {
this._bindId = -1;
if (!this.visible) return;
Tween.removeTweens(this);
Tween.get(this)
.to({alpha: 0}, 300, Ease.quadInOut)
.set({visible: false});
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* 种植列表里的植物
*/
class ListPlant extends Container implements IScrollListItem {
id: number;
data: number;
......@@ -71,45 +146,9 @@ class ListPlant extends Container implements IScrollListItem {
this.img = this.addChild(new Sprite());
this.addEventListener(FYGE.MouseEvent.CLICK, () => {
console.log(`点到了: ${this.key} ${s_PlantData[this.key].name}`);
const bindId = GameLayer.ins.plantList.bindId;
console.log(`点到了: ${this.key} ${s_PlantData[this.key].name}, 土地Id: ${bindId}`);
});
}
}
export default class PlantList extends Container {
private scrollList: ScrollList;
constructor() {
super();
this.width = 609;
this.height = 106;
// bg
this.addChild(Tool.getSprite('种植框_bg.png'));
// tip: left and right
this.addChild(Tool.getSprite('种植框_left.png'))
.position.set(15, (this.height - 34) / 2);
this.addChild(Tool.getSprite('种植框_right.png'))
.position.set(this.width - 33, (this.height - 34) / 2);
// 列表
this.scrollList = this.addChild(new ScrollList(ListPlant, 128, 160, 500, 160, false));
let data = [];
for (let k in PLANT) {
if (k == PLANT.NONE) continue;
data.push(PLANT[k]);
}
this.scrollList.updateData(data);
this.scrollList.x = (this.width - 500) / 2;
this.x = 100;
this.y = 400;
}
}
import Container = FYGE.Container;
import { UserInfoGroup } from "./UserInfoGroup";
import Sprite = FYGE.Sprite;
import { Tool } from "../../Tools";
import { getAdjustBottomHeight, getAdjustTopHeight } from "../../const/myLab";
import MouseEvent = FYGE.MouseEvent;
import PanelCtrl from "../../../module/ctrls/panelCtrl";
import { RulePanel } from "../../panels/RulePanel";
export class UILayer extends Container {
// 顶部
private userInfoGroup: UserInfoGroup; // 用户信息
private ruleBtn: Sprite; // 规则按钮
// 底部
private taskBtn: Sprite; // 任务按钮
private wareHouseBtn: Sprite; // 仓库按钮
private storeBtn: Sprite; // 商店按钮
// 广告按钮
private adBtn: Sprite; // 广告按钮
constructor() {
super();
this.initUILayer();
}
public initEvents() {
[this.ruleBtn, this.taskBtn, this.wareHouseBtn, this.storeBtn, this.adBtn].forEach((v) => {
v.addEventListener(MouseEvent.CLICK, this.touchBtn, this);
});
}
public removeEvents() {
[this.ruleBtn, this.taskBtn, this.wareHouseBtn, this.storeBtn, this.adBtn].forEach((v) => {
v.removeEventListener(MouseEvent.CLICK, this.touchBtn, this);
});
}
/**
* 按钮的点击事件
* @param e
*/
private touchBtn(e) {
console.log(e.target.name);
switch (e.target) {
case this.taskBtn:
console.log('点击了任务');
break;
case this.wareHouseBtn:
console.log('点击了仓库');
break;
case this.storeBtn:
console.log('点击了商店');
break;
case this.ruleBtn:
// console.log('点击了规则');
PanelCtrl.instance.show(RulePanel);
break;
case this.adBtn:
console.log('点击了广告');
break;
}
}
private initUILayer() {
// 底部
let bottomGroup = this.addChild(new Container());
this.taskBtn = bottomGroup.addChild(Tool.getSprite('btn_领水滴.png'))
this.taskBtn.x = 750 / 6 - this.taskBtn.width / 2;
this.taskBtn.name = '任务';
this.wareHouseBtn = bottomGroup.addChild(Tool.getSprite('btn_仓库.png'))
this.wareHouseBtn.x = 750 / 2 - this.wareHouseBtn.width / 2;
this.wareHouseBtn.name = '仓库';
this.storeBtn = bottomGroup.addChild(Tool.getSprite('btn_商店.png'))
this.storeBtn.x = 750 / 6 * 5 - this.storeBtn.width / 2;
this.storeBtn.name = '商店';
bottomGroup.y = getAdjustBottomHeight(bottomGroup, (1624 - 1382 - 133) / 1624);
// 顶部
let topGroup = this.addChild(new Container());
this.userInfoGroup = topGroup.addChild(new UserInfoGroup({
avatar: 'https://source.unsplash.com/collection/collectionid/100x100',
nickName: '哈哈哈哈',
waterNum: '666'
}));
this.ruleBtn = topGroup.addChild(Tool.getSprite('btn_规则.png'));
this.ruleBtn.position.set(622, 0);
this.ruleBtn.name = '规则';
topGroup.y = getAdjustTopHeight(topGroup, 117 / 1624);
// 广告按钮
this.adBtn = this.addChild(Tool.getSprite('广告.png'));
this.adBtn.position.set(30, (1624 - this.adBtn.height) / 2);
this.adBtn.name = '广告';
}
}
import { Scene } from "../../module/views/Scene";
import { Tool } from "../Tools";
import PlantList from "../parts/Game/PlantList";
import Container = FYGE.Container;
import { getAdjustBottomHeight, getAdjustTopHeight } from "../const/myLab";
import { UserInfoGroup } from "../parts/UI/UserInfoGroup";
import Sprite = FYGE.Sprite;
import GameLayer from "../parts/Game/GameLayer";
import { UILayer } from "../parts/UI/UILayer";
import MouseEvent = FYGE.MouseEvent;
import OptionPool, { OPTION_TYPE } from "../const/OptionPool";
export class GameScene extends Scene {
get groupNames() {
return ['gameScene']
return ['gameScene'];
}
private plantList: PlantList; // 种植列表
// 游戏层
private gameLayer: GameLayer; // 游戏层
// 顶部
private userInfoGroup: UserInfoGroup; // 用户信息
private ruleBtn: Sprite; // 规则按钮
// 底部
private taskBtn: Sprite; // 任务按钮
private wareHouseBtn: Sprite; // 仓库按钮
private storeBtn: Sprite; // 商店按钮
// 广告
private adBtn: Sprite;// 广告
// UI层
private uiLayer: UILayer;
initUi() {
this.addChild(Tool.getSprite('game_bg.jpg'));
// 底部
let bottomGroup = this.addChild(new Container());
this.taskBtn = bottomGroup.addChild(Tool.getSprite('btn_领水滴.png'))
this.taskBtn.x = 750 / 6 - this.taskBtn.width / 2;
this.taskBtn.name = '任务';
this.wareHouseBtn = bottomGroup.addChild(Tool.getSprite('btn_仓库.png'))
this.wareHouseBtn.x = 750 / 2 - this.wareHouseBtn.width / 2;
this.wareHouseBtn.name = '仓库';
this.storeBtn = bottomGroup.addChild(Tool.getSprite('btn_商店.png'))
this.storeBtn.x = 750 / 6 * 5 - this.storeBtn.width / 2;
this.storeBtn.name = '商店';
bottomGroup.y = getAdjustBottomHeight(bottomGroup, (1624 - 1382 - 133) / 1624);
// 顶部
let topGroup = this.addChild(new Container());
this.userInfoGroup = topGroup.addChild(new UserInfoGroup({
avatar: 'https://source.unsplash.com/collection/collectionid/100x100',
nickName: '哈哈哈哈',
waterNum: '666'
}));
this.addChild(Tool.getSprite('game_bg.jpg'))
.addEventListener(MouseEvent.CLICK, () => {
console.log('点击了BG');
GameLayer.ins.plantList.hidden(); // 隐藏种植栏
GameLayer.ins.deactivateAllLand();
});
this.ruleBtn = topGroup.addChild(Tool.getSprite('btn_规则.png'));
this.ruleBtn.position.set(622, 0);
this.ruleBtn.name = '规则';
// 游戏层
this.gameLayer = this.addChild(GameLayer.ins);
topGroup.y = getAdjustTopHeight(topGroup, 117 / 1624);
// UI层
this.uiLayer = this.addChild(new UILayer());
this.adBtn = this.addChild(Tool.getSprite('广告.png'));
this.adBtn.position.set(30, (this.height - this.adBtn.height) / 2);
this.adBtn.name = '广告';
this.addChild(OptionPool.ins.takeOut(OPTION_TYPE.GET));
// 种植列表
this.plantList = this.addChild(new PlantList());
// this.plantList.visible = false;
}
start() {
......@@ -74,43 +40,21 @@ export class GameScene extends Scene {
}
/**
* 按钮的点击事件
* @param e
*/
private touchBtn(e) {
console.log(e.target.name);
switch (e.target) {
case this.taskBtn:
console.log('点击了任务');
break;
case this.wareHouseBtn:
console.log('点击了仓库');
break;
case this.storeBtn:
console.log('点击了商店');
break;
case this.ruleBtn:
console.log('点击了规则');
break;
case this.adBtn:
console.log('点击了广告');
break;
}
}
initEvents() {
super.initEvents();
[this.ruleBtn, this.taskBtn, this.wareHouseBtn, this.storeBtn, this.adBtn].forEach((v) => {
v.addEventListener(MouseEvent.CLICK, this.touchBtn, this);
});
this.gameLayer.initEvent();
this.uiLayer.initEvents();
}
removeEvents() {
super.removeEvents();
[this.ruleBtn, this.taskBtn, this.wareHouseBtn, this.storeBtn, this.adBtn].forEach((v) => {
v.removeEventListener(MouseEvent.CLICK, this.touchBtn, this);
});
this.gameLayer.removeEvent();
this.uiLayer.removeEvents();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment