bundle.js 215 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056
  1. var laya = (function (exports) {
  2. 'use strict';
  3. class GameConfig {
  4. constructor() { }
  5. static init() {
  6. var reg = Laya.ClassUtils.regClass;
  7. }
  8. }
  9. GameConfig.width = 720;
  10. GameConfig.height = 1280;
  11. GameConfig.scaleMode = "fixedwidth";
  12. GameConfig.screenMode = "none";
  13. GameConfig.alignV = "top";
  14. GameConfig.alignH = "left";
  15. GameConfig.startScene = "MainScene.scene";
  16. GameConfig.sceneRoot = "";
  17. GameConfig.debug = false;
  18. GameConfig.stat = false;
  19. GameConfig.physicsDebug = true;
  20. GameConfig.exportSceneToJson = true;
  21. GameConfig.init();
  22. class CheckMain {
  23. }
  24. CheckMain.Creat = false;
  25. class Main {
  26. constructor() {
  27. if (CheckMain.Creat)
  28. return;
  29. CheckMain.Creat = true;
  30. if (window["Laya3D"])
  31. Laya3D.init(GameConfig.width, GameConfig.height);
  32. else
  33. Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]);
  34. Laya["Physics"] && Laya["Physics"].enable();
  35. Laya["DebugPanel"] && Laya["DebugPanel"].enable();
  36. Laya.stage.scaleMode = GameConfig.scaleMode;
  37. Laya.stage.screenMode = GameConfig.screenMode;
  38. Laya.stage.alignV = GameConfig.alignV;
  39. Laya.stage.alignH = GameConfig.alignH;
  40. Laya.URL.exportSceneToJson = GameConfig.exportSceneToJson;
  41. if (GameConfig.debug || Laya.Utils.getQueryString("debug") == "true")
  42. Laya.enableDebugPanel();
  43. if (GameConfig.physicsDebug && Laya["PhysicsDebugDraw"])
  44. Laya["PhysicsDebugDraw"].enable();
  45. if (GameConfig.stat)
  46. Laya.Stat.show();
  47. Laya.alertGlobalError = true;
  48. if (Laya.Browser.onWeiXin) {
  49. Laya.Browser.window.wx.showShareMenu({
  50. withShareTicket: true
  51. });
  52. Laya.Browser.window.wx.onShareAppMessage(function () {
  53. return {
  54. title: "试一下你的脑力能到第几关",
  55. imageUrl: "Game/res/Share/fx.png",
  56. };
  57. });
  58. Laya.Browser.window.wx.onShow((option) => {
  59. var shareTicket = option.shareTicket;
  60. var userId = option.query.userId;
  61. var shareTitle = option.query.shareTitle;
  62. Main.SceneNum = option.scene;
  63. WXSDK.querychannel = option.query.channel;
  64. WXSDK.shareOpenId = option.query.userId;
  65. console.log("option---", option);
  66. console.log("scene:", option.scene);
  67. if (WXSDK.querychannel != null) {
  68. console.log("onShow channel is:", WXSDK.querychannel);
  69. }
  70. if (option.referrerInfo) {
  71. WXSDK.referrerInfoappId = option.referrerInfo.appId;
  72. console.log("onShow appId is:", option.referrerInfo.appId);
  73. }
  74. });
  75. const updateManager = Laya.Browser.window.wx.getUpdateManager();
  76. updateManager.onCheckForUpdate(function (res) {
  77. console.log("最新版本:" + res.hasUpdate);
  78. });
  79. updateManager.onUpdateReady(function () {
  80. Laya.Browser.window.wx.showModal({
  81. showCancel: false,
  82. title: '更新提示',
  83. content: '新版本已经准备好,是否重启应用?',
  84. success(res) {
  85. updateManager.applyUpdate();
  86. },
  87. fail(res) {
  88. updateManager.applyUpdate();
  89. }
  90. });
  91. });
  92. }
  93. Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION);
  94. }
  95. onVersionLoaded() {
  96. Laya.AtlasInfoManager.enable("fileconfig.json", Laya.Handler.create(this, this.onConfigLoaded));
  97. }
  98. onConfigLoaded() {
  99. new LoadView();
  100. }
  101. }
  102. Main.Ver = "1.0.3";
  103. Main.CFG = "123";
  104. Main.SceneNum = "000";
  105. new Main();
  106. var AccountUser;
  107. (function (AccountUser) {
  108. AccountUser[AccountUser["buyed_kun"] = 0] = "buyed_kun";
  109. AccountUser[AccountUser["diamond"] = 1] = "diamond";
  110. AccountUser[AccountUser["equip_themes"] = 2] = "equip_themes";
  111. AccountUser[AccountUser["favorite_times"] = 3] = "favorite_times";
  112. AccountUser[AccountUser["game_times"] = 4] = "game_times";
  113. AccountUser[AccountUser["get_themes"] = 5] = "get_themes";
  114. AccountUser[AccountUser["list_kun"] = 6] = "list_kun";
  115. AccountUser[AccountUser["moeny"] = 7] = "moeny";
  116. AccountUser[AccountUser["progress_themes"] = 8] = "progress_themes";
  117. AccountUser[AccountUser["revival"] = 9] = "revival";
  118. AccountUser[AccountUser["stage"] = 10] = "stage";
  119. })(AccountUser || (AccountUser = {}));
  120. class PlayerData {
  121. constructor(_token, _config, _appSetting, _user, _userbase, _useInvite, _user_stage = null, _user_sign, _user_achievement, lottery) {
  122. this.openid = "";
  123. this.userId = "";
  124. this.jianglidic = {};
  125. this.shitidic = {};
  126. this.chengjiuliebiao = {};
  127. this.zhengshu = _token;
  128. this.netzheshe = _appSetting;
  129. this.account = _user;
  130. this.accountssss = _userbase;
  131. this.qiandao = _user_sign;
  132. this.renwu = _user_achievement;
  133. this.userId = this.account["user_id"];
  134. this.openid = this.accountssss["openid"];
  135. this.m_invite = _useInvite;
  136. this.lottery = lottery;
  137. console.log("user_id:" + this.userId);
  138. }
  139. GainCollocation(_type) {
  140. return this.peizhis[_type];
  141. }
  142. GainAccount(_type) {
  143. return this.account[_type];
  144. }
  145. get fenxiang() {
  146. return this.netzheshe["share"] == "1";
  147. }
  148. get fenxiangneirong() {
  149. return this.netzheshe["sharecontent"];
  150. }
  151. get fuhuocishu() {
  152. return Number(this.netzheshe["revivenum"]);
  153. }
  154. get wudishijian() {
  155. return Number(this.netzheshe["Invincibletime"]);
  156. }
  157. get wudaoshijian() {
  158. return Number(this.netzheshe["cheattime"]);
  159. }
  160. get banner() {
  161. return this.netzheshe["banner"] == "1";
  162. }
  163. get video() {
  164. return this.netzheshe["video"] == "1";
  165. }
  166. get wudao() {
  167. return this.netzheshe["cheat"] == "1";
  168. }
  169. get jiancechangjin() {
  170. return this.netzheshe["checkscence"] == 1;
  171. }
  172. get reviverate() {
  173. return Number(this.netzheshe["revive"]);
  174. }
  175. get uintid() {
  176. return this.netzheshe["uintid"];
  177. }
  178. get music() {
  179. return this.netzheshe["music"] == "1";
  180. }
  181. get skin() {
  182. return this.netzheshe["skinget"] == "1";
  183. }
  184. get aicheatspeed() {
  185. return Number(this.netzheshe["aicheatspeed"]);
  186. }
  187. get aispeedtime() {
  188. return Number(this.netzheshe["aispeedtime"]);
  189. }
  190. get videoshare() {
  191. return this.netzheshe["videoshare"] == "1";
  192. }
  193. get trial() {
  194. return this.netzheshe["trial"] == "1";
  195. }
  196. get invite() {
  197. return this.netzheshe["invite"] == 1;
  198. }
  199. get re() {
  200. return this.netzheshe["re"] == 1;
  201. }
  202. get autosign() {
  203. return this.netzheshe["autosign"] == 1;
  204. }
  205. get showgift() {
  206. return this.netzheshe["showgift"] == 1;
  207. }
  208. get showshop() {
  209. return this.netzheshe["showshop"] == 1;
  210. }
  211. get lotteryTimer() {
  212. if (this.netzheshe["lotteryTimer"])
  213. return Number(this.netzheshe["lotteryTimer"]);
  214. return 0;
  215. }
  216. get falldownline() {
  217. return this.netzheshe["FallDownLine"];
  218. }
  219. get Restitution() {
  220. return this.netzheshe["restitution"];
  221. }
  222. get MergeSpeed() {
  223. return this.netzheshe["MergeSpeed"];
  224. }
  225. get CheckLose() {
  226. return this.netzheshe["CheckLose"];
  227. }
  228. get Save() {
  229. return this.netzheshe["Save"];
  230. }
  231. get GuideHeight() {
  232. return this.netzheshe["GuideHeight"];
  233. }
  234. get ShakeNum() {
  235. return this.netzheshe["ShakeNum"];
  236. }
  237. get Distance() {
  238. return this.netzheshe["Distance"];
  239. }
  240. get GiftSize() {
  241. return this.netzheshe["GiftSize"];
  242. }
  243. get OverRun() {
  244. return this.netzheshe["OverRun"];
  245. }
  246. get touchsize() {
  247. return Number(this.netzheshe["touchsize"]);
  248. }
  249. get touchsmoothness() {
  250. return Number(this.netzheshe["touchsmoothness"]);
  251. }
  252. GainQinDao(_key) {
  253. return this.qiandao[_key];
  254. }
  255. GainShiTi(_key, shuxing) {
  256. return this.shitidic[_key][shuxing];
  257. }
  258. GainJiangLi(_rewardid) {
  259. var reward = this.jianglidic[_rewardid];
  260. return reward;
  261. }
  262. GetPropNum(_index) {
  263. var type = this.account["functions"];
  264. var num = type[_index.toString()];
  265. if (num) {
  266. return num;
  267. }
  268. else {
  269. return 0;
  270. }
  271. }
  272. HasRole(_id) {
  273. var data = this.GainAccount("get_themes");
  274. for (var i = 0; i < data.length; i++) {
  275. var hd = data[i];
  276. if (_id == hd) {
  277. return true;
  278. }
  279. }
  280. return false;
  281. }
  282. HasGun(_id) {
  283. var data = this.GainAccount("functions");
  284. for (var i = 0; i < data.length; i++) {
  285. var hd = data[i];
  286. if (_id == hd) {
  287. return true;
  288. }
  289. }
  290. return false;
  291. }
  292. GetProgress(_id) {
  293. var config = this.account["progress_themes"];
  294. var progress = config[_id] ? config[_id] : 0;
  295. return progress;
  296. }
  297. GetJiangLiLieBiao() {
  298. var peiz = this.GainCollocation("rewards");
  299. for (var key in peiz) {
  300. this.jianglidic[peiz[key].id] = peiz[key];
  301. }
  302. }
  303. GetShiTiLieBiao() {
  304. var peiz = this.GainCollocation("entity");
  305. for (var key in peiz) {
  306. this.shitidic[peiz[key].entity_id] = peiz[key];
  307. }
  308. }
  309. GetChengJiuLieBiao() {
  310. var shujiu = this.GainCollocation("achievement");
  311. var aadsadsdas = {};
  312. for (var key1 in shujiu) {
  313. var type1 = shujiu[key1].type;
  314. if (aadsadsdas[type1]) {
  315. continue;
  316. }
  317. var fasas = [];
  318. for (var key2 in shujiu) {
  319. var type2 = shujiu[key2].type;
  320. if (type1 == type2) {
  321. fasas.push(shujiu[key2]);
  322. }
  323. }
  324. aadsadsdas[type1] = fasas;
  325. }
  326. this.chengjiuliebiao = aadsadsdas;
  327. }
  328. }
  329. var HttpRequest = Laya.HttpRequest;
  330. var Event = Laya.Event;
  331. const BlastToMergeApi = "https://btmapi.xwxgame.com/";
  332. class BlastToMerge {
  333. }
  334. BlastToMerge.DengLu = "user/login";
  335. BlastToMerge.KaiShi = "game/start";
  336. BlastToMerge.JieShu = "game/play";
  337. BlastToMerge.Use = "game/use";
  338. BlastToMerge.GetProgress = "game/progress";
  339. BlastToMerge.Save = "game/save";
  340. BlastToMerge.WithDraw = "qtt/withdraw";
  341. BlastToMerge.CheckCoin = "qtt/balance";
  342. BlastToMerge.GetCoin = "qtt/rewards";
  343. BlastToMerge.QianDao = "sign/sign";
  344. BlastToMerge.Chengjiu = "achievement/getRewards";
  345. BlastToMerge.Config = "config/table";
  346. BlastToMerge.FenXiang = "fission/share";
  347. BlastToMerge.LiXian = "fission/offline";
  348. BlastToMerge.vd = "fission/vd";
  349. BlastToMerge.FuHuo = "game/revival";
  350. BlastToMerge.gadagdag = "treasure/click";
  351. BlastToMerge.Invite = "invite/getRewards";
  352. BlastToMerge.Lottery = "lottery/lottery";
  353. BlastToMerge.ShareGetSkin = "theme/fission";
  354. BlastToMerge.WearEquip = "theme/equip";
  355. BlastToMerge.BuyEquip = "theme/buy";
  356. BlastToMerge.ShouQuan = "user/auth";
  357. BlastToMerge.JinBi = "user/sync";
  358. class ServerManager {
  359. constructor() { }
  360. static get Instance() {
  361. if (ServerManager.ins) {
  362. return ServerManager.ins;
  363. }
  364. else {
  365. return new ServerManager();
  366. }
  367. }
  368. Login(progresscb, completecb, errorcb) {
  369. var Account = AccountManager.Instance;
  370. var ver = Main.Ver;
  371. let Data = `code=${Account.code}&nickname=${Account.nickName}&avatar=${Account.avatarUrl}&gender=${Account.gender}&country=${Account.country}&province=${Account.province}&city=${Account.city}& device=${Account.device}$&share_id=${Account.share_id}&scene=${Account.scene}&v=${ver}`;
  372. let httpRequest = new HttpRequest();
  373. httpRequest.once(Event.PROGRESS, this, this.Progress, [progresscb, httpRequest]);
  374. httpRequest.once(Event.COMPLETE, this, this.Complete, [completecb, httpRequest]);
  375. httpRequest.once(Event.ERROR, this, this.Errorcb, [errorcb, httpRequest]);
  376. httpRequest.send(BlastToMergeApi + BlastToMerge.DengLu, Data, "post", "text");
  377. }
  378. Progress(_progresscb, _httpreq) {
  379. if (_progresscb) {
  380. _progresscb.run();
  381. }
  382. }
  383. Complete(_completecb, _httpreq) {
  384. let data = JSON.parse(_httpreq.data);
  385. console.log(data);
  386. if (data["code"] != "0") {
  387. console.log("登录异常错误!错误信息sssssssss:", _httpreq.data["code"]);
  388. return;
  389. }
  390. console.log("-----------sss", data["t"]);
  391. AccountManager.Instance.SFSFSF = data["t"];
  392. this.RessetConfig(data, _completecb);
  393. }
  394. RessetConfig(data, completecb) {
  395. AccountManager.Instance.ReSetting(data, (flag) => {
  396. if (flag) {
  397. completecb.runWith(data);
  398. }
  399. else {
  400. this.RessetConfig(data, completecb);
  401. }
  402. });
  403. }
  404. Errorcb(_errorcb, _httpreq) {
  405. if (_errorcb != null) {
  406. _errorcb.runWith(_httpreq);
  407. }
  408. }
  409. SendHttp(protocol, param, completecb, errorcb, hasToken = true) {
  410. let sfaasfsfa = "";
  411. let daadsads = BlastToMergeApi + protocol;
  412. if (hasToken == true) {
  413. sfaasfsfa = `token=${AccountManager.Instance.curplayerData.zhengshu}&`;
  414. }
  415. if (protocol == BlastToMerge.KaiShi || protocol == BlastToMerge.JieShu || protocol == BlastToMerge.vd || protocol == BlastToMerge.Lottery) {
  416. let asddsa = "abcdefghijkimnopqrstuvwxyz0123456789";
  417. let adsassda = "{";
  418. let saafsafs = "";
  419. for (let i = 0; i < 4; i++) {
  420. saafsafs += asddsa[Math.floor(Math.random() * 100) % asddsa.length];
  421. }
  422. for (let i = 0; i < param.length; i++) {
  423. for (let key in param[i]) {
  424. adsassda += `\"${key}\":\"${param[i][key]}\"`;
  425. }
  426. if (i < param.length - 1) {
  427. adsassda += ",";
  428. }
  429. else {
  430. adsassda += "}";
  431. }
  432. }
  433. sfaasfsfa += "_r=" + saafsafs + this.SFGSGSG(adsassda);
  434. }
  435. else {
  436. if (param != null) {
  437. for (let i = 0; i < param.length; i++) {
  438. for (let key in param[i]) {
  439. let val = param[i][key];
  440. sfaasfsfa += `${key}=${val}`;
  441. if (i < param.length - 1) {
  442. sfaasfsfa += "&";
  443. }
  444. }
  445. }
  446. }
  447. }
  448. let httpRequest = new HttpRequest();
  449. httpRequest.once(Event.COMPLETE, this, this.onHttpRequestComplete, [completecb, errorcb, httpRequest]);
  450. httpRequest.once(Event.ERROR, this, this.Errorcb, [errorcb, httpRequest]);
  451. httpRequest.send(daadsads, sfaasfsfa, "post", "text");
  452. }
  453. onHttpRequestComplete(succeedcb, failurecb, httpRequest) {
  454. let data = JSON.parse(httpRequest.data);
  455. if (data["code"] == 0) {
  456. AccountManager.Instance.ReSetting(data);
  457. if (succeedcb != null) {
  458. succeedcb.runWith(data);
  459. }
  460. }
  461. else {
  462. if (failurecb != null) {
  463. failurecb.runWith(data);
  464. }
  465. console.log("Error! Http request complete error, code: " + data["code"] + " message: " + data["message"]);
  466. }
  467. }
  468. SFGSGSG(str) {
  469. var c1, c2, c3;
  470. var SFSFFSFSFSFS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  471. var i = 0, len = str.length, SFFSSFFS = '';
  472. while (i < len) {
  473. c1 = str.charCodeAt(i++) & 0xff;
  474. if (i == len) {
  475. SFFSSFFS += SFSFFSFSFSFS.charAt(c1 >> 2);
  476. SFFSSFFS += SFSFFSFSFSFS.charAt((c1 & 0x3) << 4);
  477. SFFSSFFS += "==";
  478. break;
  479. }
  480. c2 = str.charCodeAt(i++);
  481. if (i == len) {
  482. SFFSSFFS += SFSFFSFSFSFS.charAt(c1 >> 2);
  483. SFFSSFFS += SFSFFSFSFSFS.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
  484. SFFSSFFS += SFSFFSFSFSFS.charAt((c2 & 0xF) << 2);
  485. SFFSSFFS += "=";
  486. break;
  487. }
  488. c3 = str.charCodeAt(i++);
  489. SFFSSFFS += SFSFFSFSFSFS.charAt(c1 >> 2);
  490. SFFSSFFS += SFSFFSFSFSFS.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
  491. SFFSSFFS += SFSFFSFSFSFS.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
  492. SFFSSFFS += SFSFFSFSFSFS.charAt(c3 & 0x3F);
  493. }
  494. return SFFSSFFS;
  495. }
  496. }
  497. class AccountManager {
  498. constructor(_code, _userinfo, _nickname, _avatarurl, _gender, _province, _city, _country, _device, _shareid, _scene, _v) {
  499. this.createTime = Laya.timer.currTimer;
  500. AccountManager.ins = this;
  501. this.code = _code;
  502. this.userInfo = _userinfo;
  503. this.nickName = _nickname;
  504. this.avatarUrl = _avatarurl;
  505. this.gender = _gender;
  506. this.province = _province;
  507. this.city = _city;
  508. this.country = _country;
  509. this.device = _device;
  510. this.share_id = _shareid;
  511. this.scene = _scene;
  512. this.v = _v;
  513. }
  514. static get Instance() {
  515. if (AccountManager.ins == null) {
  516. new AccountManager("222222", "你找谁?", "1233", "123", 1, "中国", "上海", "上海", "iphone6s", "123", "123", "123");
  517. }
  518. return AccountManager.ins;
  519. }
  520. ReSetting(data, cb = null) {
  521. var zhengshu = data["token"];
  522. var netset = data["app_setting"];
  523. var user = data["user"];
  524. var jichu = data["user_base"];
  525. var qiandao = data["user_sign"];
  526. var chengjiu = data["user_achievement"];
  527. var invite = data["user_invite"];
  528. var lottery = data["user_lottery"];
  529. if (this.curplayerData == null) {
  530. this.curplayerData = new PlayerData(zhengshu, null, netset, user, jichu, invite, null, qiandao, chengjiu, lottery);
  531. this.JundgCfg(data.table_version, cb);
  532. }
  533. else {
  534. if (netset) {
  535. this.curplayerData.netzheshe = netset;
  536. }
  537. if (user) {
  538. this.curplayerData.account = user;
  539. }
  540. if (jichu) {
  541. this.curplayerData.accountssss = jichu;
  542. }
  543. if (qiandao) {
  544. this.curplayerData.qiandao = qiandao;
  545. }
  546. if (chengjiu) {
  547. this.curplayerData.renwu = chengjiu;
  548. }
  549. }
  550. }
  551. JundgCfg(ver, callball) {
  552. var cfg = Laya.LocalStorage.getJSON(Main.CFG);
  553. if (cfg) {
  554. if (cfg.VER == ver) {
  555. console.log("已经拥有,不用更新");
  556. this.SetCfg(cfg);
  557. if (callball)
  558. callball(true);
  559. }
  560. else {
  561. console.log("cfg存在但是过期了");
  562. Laya.LocalStorage.removeItem(Main.CFG);
  563. ServerManager.Instance.SendHttp(BlastToMerge.Config, null, Laya.Handler.create(this, (data) => {
  564. data.configs.VER = ver;
  565. Laya.LocalStorage.setJSON(Main.CFG, data.configs);
  566. this.SetCfg(data.configs);
  567. if (callball)
  568. callball(true);
  569. }), Laya.Handler.create(this, (data) => {
  570. console.log("配置获取失败" + data);
  571. if (callball)
  572. callball(false);
  573. return;
  574. }));
  575. }
  576. }
  577. else {
  578. console.log("本地没有cfg");
  579. ServerManager.Instance.SendHttp(BlastToMerge.Config, null, Laya.Handler.create(this, (data) => {
  580. data.configs.VER = ver;
  581. Laya.LocalStorage.setJSON(Main.CFG, data.configs);
  582. this.SetCfg(data.configs);
  583. if (callball)
  584. callball(true);
  585. }), Laya.Handler.create(this, (data) => {
  586. console.log("配置获取失败" + data);
  587. }));
  588. }
  589. }
  590. SetCfg(data) {
  591. this.curplayerData.peizhis = data;
  592. this.curplayerData.GetJiangLiLieBiao();
  593. this.curplayerData.GetShiTiLieBiao();
  594. this.curplayerData.GetChengJiuLieBiao();
  595. }
  596. RessetConfig() {
  597. ServerManager.Instance.SendHttp(BlastToMerge.Config, null, Laya.Handler.create(this, (data) => {
  598. this.curplayerData.peizhis = data["configs"];
  599. this.curplayerData.GetJiangLiLieBiao();
  600. this.curplayerData.GetShiTiLieBiao();
  601. this.curplayerData.GetChengJiuLieBiao();
  602. }), null);
  603. }
  604. get ServerTime() {
  605. let time = Laya.timer.currTimer;
  606. let stime = this.SFSFSF + Math.ceil((time - this.createTime) / 1000);
  607. return stime;
  608. }
  609. }
  610. class RankPan {
  611. constructor() {
  612. this.Width = 0;
  613. this.Height = 0;
  614. this.shareCanvas = Laya.Browser.window.sharedCanvas;
  615. this.ShareSprite = new Laya.Sprite();
  616. this.ShareSprite.zOrder = 1008;
  617. this.ShareSprite.pos(0, 0);
  618. this.ShareSprite.cacheAs = "normal";
  619. Laya.stage.addChild(this.ShareSprite);
  620. this.SSSS = new Laya.Texture2D();
  621. this.TTTT = new Laya.Texture(this.SSSS);
  622. }
  623. ShuShi(_width = 720, _heigth = 1280) {
  624. this.Width = Laya.stage.width;
  625. this.Height = Laya.stage.height;
  626. this.shareCanvas.width = _width;
  627. this.shareCanvas.height = _heigth;
  628. }
  629. open() {
  630. Laya.timer.frameLoop(10, this, this.gengxin);
  631. this.ShareSprite.visible = true;
  632. }
  633. close() {
  634. Laya.timer.clear(this, this.gengxin);
  635. this.ShareSprite.visible = false;
  636. }
  637. gengxin() {
  638. this.HuaTu();
  639. }
  640. HuaTu() {
  641. this.SSSS.loadImageSource(this.shareCanvas);
  642. this.TTTT.setTo(this.SSSS);
  643. this.ShareSprite.graphics.clear();
  644. this.ShareSprite.graphics.drawTexture(this.TTTT, 0, 0, this.TTTT.width, this.TTTT.height);
  645. }
  646. draw2d() {
  647. this.AAAA.drawImage(this.shareCanvas, 0, 0, this.shareCanvas.width, this.shareCanvas.height);
  648. }
  649. }
  650. class RankSDK {
  651. constructor() { }
  652. static ShuShi() {
  653. if (!Laya.Browser.onWeiXin)
  654. return;
  655. this.SetScreen();
  656. this.RankPan = new RankPan();
  657. this.RankPan.ShuShi();
  658. }
  659. static OpenRank(keyName = "Level") {
  660. if (Laya.Browser.onWeiXin) {
  661. this.Send(keyName, "show_friend_rank");
  662. console.log("打开排行榜---openrank");
  663. }
  664. }
  665. static Leftpe() {
  666. if (Laya.Browser.onWeiXin)
  667. this.Send("", "show_up_page");
  668. }
  669. static Rightpe() {
  670. if (Laya.Browser.onWeiXin)
  671. this.Send("", "show_next_page");
  672. }
  673. static OpenPan() {
  674. console.log("Laya.Browser.onWeiXin", Laya.Browser.onWeiXin);
  675. if (Laya.Browser.window.wx)
  676. this.RankPan.open();
  677. }
  678. static ClosePan() {
  679. if (Laya.Browser.onWeiXin)
  680. this.RankPan.close();
  681. }
  682. static SetScreen() {
  683. if (!Laya.Browser.onWeiXin)
  684. return;
  685. let width = Laya.stage.width;
  686. let height = Laya.stage.height;
  687. let data = { width: width, height: height };
  688. this.Send("", "canvase_width_height", data);
  689. }
  690. static Send(keyName, action, data) {
  691. Laya.Browser.window.wx.postMessage({
  692. keyName: keyName,
  693. action: action,
  694. data: data
  695. });
  696. }
  697. static SetStage(keyName, value, callBack = null) {
  698. let obj = [{
  699. key: keyName,
  700. value: value
  701. }];
  702. Laya.Browser.window.wx.setUserCloudStorage({
  703. KVDataList: obj,
  704. success: function (res) {
  705. console.log("数据上传成功" + res);
  706. if (callBack) {
  707. callBack();
  708. }
  709. },
  710. fail: function (res) {
  711. console.log("数据上传失败" + res);
  712. if (callBack) {
  713. callBack();
  714. }
  715. }
  716. });
  717. }
  718. }
  719. class WXSDK {
  720. constructor() {
  721. WXSDK.ins = this;
  722. }
  723. static get Instance() {
  724. if (WXSDK.ins) {
  725. return WXSDK.ins;
  726. }
  727. else {
  728. return new WXSDK();
  729. }
  730. }
  731. static Init() {
  732. Laya.Browser.window.wx.showShareMenu({
  733. withShareTicket: true
  734. });
  735. Laya.Browser.window.wx.onShareAppMessage(function () {
  736. return {
  737. title: "",
  738. imageUrl: "gameResources/res/share/sharepictrue.png",
  739. };
  740. });
  741. Laya.Browser.window.wx.onShow((option) => {
  742. var shareTicket = option.shareTicket;
  743. var userId = option.query.userId;
  744. var shareTitle = option.query.shareTitle;
  745. Main.SceneNum = option.scene;
  746. WXSDK.querychannel = option.query.channel;
  747. WXSDK.shareOpenId = option.query.userId;
  748. console.log("option---", option);
  749. console.log("scene:", option.scene);
  750. if (WXSDK.querychannel != null) {
  751. console.log("onShow channel is:", WXSDK.querychannel);
  752. }
  753. if (option.referrerInfo) {
  754. WXSDK.referrerInfoappId = option.referrerInfo.appId;
  755. console.log("onShow appId is:", option.referrerInfo.appId);
  756. }
  757. });
  758. }
  759. static DengLu(_complete) {
  760. var that = this;
  761. Laya.Browser.window.wx.login({
  762. success: function (res) {
  763. if (res.code) {
  764. console.log("微信登陆成功----");
  765. that.codeValue = res.code;
  766. RankSDK.ShuShi();
  767. console.log("shareid:" + WXSDK.shareOpenId);
  768. new AccountManager(res.code, "", "", "", 0, "", "", "", "", WXSDK.shareOpenId, WXSDK.shareOpenId, Main.Ver);
  769. _complete(res);
  770. }
  771. else {
  772. WXSDK.DengLu(WXSDK.DengLu);
  773. console.log('wx no code' + res.errMsg);
  774. }
  775. },
  776. fail: function (res) { console.log("wx.login: failed, res=" + res); }
  777. });
  778. }
  779. static ShowTxt(text) {
  780. if (Laya.Browser.window.wx) {
  781. Laya.Browser.window.wx.showToast({ title: text });
  782. }
  783. else {
  784. console.log(text);
  785. }
  786. }
  787. static ShortShake() {
  788. Laya.Browser.window.wx.vibrateShort({});
  789. }
  790. static LongShake() {
  791. Laya.Browser.window.wx.vibrateLong({});
  792. }
  793. static Shake(_short = true) {
  794. if (Laya.Browser.onWeiXin && WXSDK.shake) {
  795. if (_short) {
  796. this.ShortShake();
  797. }
  798. else {
  799. this.LongShake();
  800. }
  801. }
  802. }
  803. static LoadSubPackage(name, _complete) {
  804. if (Laya.Browser.onWeiXin) {
  805. const loadTask = Laya.Browser.window.wx.loadSubpackage({
  806. name: 'Game',
  807. success: function (res) {
  808. _complete && _complete(true);
  809. console.log("分包加载成功");
  810. },
  811. fail: function (res) {
  812. _complete && _complete(false);
  813. console.log("分包加载失败");
  814. }
  815. });
  816. }
  817. else {
  818. console.log("未进行分包加载");
  819. _complete && _complete(true);
  820. }
  821. }
  822. static UpdateScore(_level) {
  823. var kvDataList = new Array();
  824. let date = new Date().getTime();
  825. var myValue = JSON.stringify({
  826. "wxgame": {
  827. "Level": _level,
  828. "update_time": date.toString(),
  829. }
  830. });
  831. kvDataList.push({ key: "Level", value: myValue });
  832. if (Laya.Browser.onWeiXin) {
  833. Laya.Browser.window.wx.setUserCloudStorage({
  834. KVDataList: kvDataList,
  835. success: r => {
  836. console.log("KVDATALIST---", kvDataList);
  837. console.log("上传分数成功:" + _level);
  838. }
  839. });
  840. }
  841. }
  842. IsNeedUpdate() {
  843. if (!Laya.Browser.onWeiXin)
  844. return;
  845. const updateManager = Laya.Browser.window.wx.getUpdateManager();
  846. updateManager.onCheckForUpdate(function (res) {
  847. console.log("最新版本:" + res.hasUpdate);
  848. });
  849. updateManager.onUpdateReady(function () {
  850. Laya.Browser.window.wx.showModal({
  851. showCancel: false,
  852. title: '更新提示',
  853. content: '新版本已经准备好,是否重启应用?',
  854. success(res) {
  855. updateManager.applyUpdate();
  856. },
  857. fail(res) {
  858. updateManager.applyUpdate();
  859. }
  860. });
  861. });
  862. }
  863. }
  864. WXSDK.codeValue = "";
  865. WXSDK.shareOpenId = "";
  866. WXSDK.openId = 0;
  867. WXSDK.shareScene = "";
  868. WXSDK.uid = "123";
  869. WXSDK.querychannel = "";
  870. WXSDK.referrerInfoappId = "";
  871. WXSDK.shake = true;
  872. var REG = Laya.ClassUtils.regClass;
  873. var ui;
  874. (function (ui) {
  875. class FailureViewUI extends Laya.Scene {
  876. constructor() { super(); }
  877. createChildren() {
  878. super.createChildren();
  879. this.createView(FailureViewUI.uiView);
  880. }
  881. }
  882. FailureViewUI.uiView = { "type": "Scene", "props": { "width": 720, "height": 1280 }, "compId": 2, "child": [{ "type": "Image", "props": { "y": 0, "x": 0, "var": "BG", "top": 0, "skin": "WinView/black.png", "sizeGrid": "12,14,14,13", "right": 0, "left": 0, "bottom": 0 }, "compId": 8 }, { "type": "Image", "props": { "y": 525, "x": 360, "width": 720, "skin": "ReviveView/fuhuo-1-1.png", "height": 994, "anchorY": 0.5, "anchorX": 0.5 }, "compId": 5, "child": [{ "type": "Image", "props": { "y": 252, "x": 285, "skin": "FailureView/shibai-1-1.png" }, "compId": 4 }, { "type": "Button", "props": { "y": 506, "x": 360, "var": "BackBtn", "stateNum": 1, "skin": "FailureView/shibai-1-2.png", "anchorY": 0.5, "anchorX": 0.5 }, "compId": 6 }, { "type": "Button", "props": { "y": 627, "x": 360, "var": "TryBtn", "stateNum": 1, "skin": "FailureView/shibai-1-3.png", "anchorY": 0.5, "anchorX": 0.5 }, "compId": 7 }] }], "loadList": ["WinView/black.png", "ReviveView/fuhuo-1-1.png", "FailureView/shibai-1-1.png", "FailureView/shibai-1-2.png", "FailureView/shibai-1-3.png"], "loadList3D": [] };
  883. ui.FailureViewUI = FailureViewUI;
  884. REG("ui.FailureViewUI", FailureViewUI);
  885. class GetRewardViewUI extends Laya.Scene {
  886. constructor() { super(); }
  887. createChildren() {
  888. super.createChildren();
  889. this.createView(GetRewardViewUI.uiView);
  890. }
  891. }
  892. GetRewardViewUI.uiView = { "type": "Scene", "props": { "width": 720, "height": 1280 }, "compId": 2, "child": [{ "type": "Image", "props": { "y": 472, "x": 360, "width": 696, "skin": "WinView/guoguan-1-7.png", "height": 720, "anchorY": 0.5, "anchorX": 0.5 }, "compId": 3, "child": [{ "type": "Image", "props": { "y": 182, "x": 328, "width": 126, "var": "skillicon", "pivotY": 62, "pivotX": 63, "height": 124 }, "compId": 4 }, { "type": "Text", "props": { "y": 408, "x": 347, "width": 433, "var": "des1", "valign": "middle", "text": "获得二倍道具", "pivotY": 28, "pivotX": 217, "height": 56, "fontSize": 30, "align": "center", "runtime": "laya.display.Text" }, "compId": 6 }, { "type": "Text", "props": { "y": 472, "x": 348, "width": 435, "var": "des2", "valign": "middle", "text": "将一个球变为2倍", "pivotY": 33, "pivotX": 218, "height": 59, "fontSize": 30, "align": "center", "runtime": "laya.display.Text" }, "compId": 7 }] }, { "type": "Button", "props": { "y": 771, "x": 360, "var": "VideoGetBtn", "stateNum": 1, "skin": "WinView/lingqu-1.png", "anchorY": 0.5, "anchorX": 0.5 }, "compId": 8 }, { "type": "Button", "props": { "y": 670, "x": 360, "width": 291, "var": "GetBtn", "stateNum": 1, "skin": "WinView/lingqu-2.png", "height": 90, "anchorY": 0.5, "anchorX": 0.5 }, "compId": 9 }], "loadList": ["WinView/guoguan-1-7.png", "WinView/lingqu-1.png", "WinView/lingqu-2.png"], "loadList3D": [] };
  893. ui.GetRewardViewUI = GetRewardViewUI;
  894. REG("ui.GetRewardViewUI", GetRewardViewUI);
  895. class InGameSceneUI extends Laya.Scene {
  896. constructor() { super(); }
  897. createChildren() {
  898. super.createChildren();
  899. this.createView(InGameSceneUI.uiView);
  900. }
  901. }
  902. InGameSceneUI.uiView = { "type": "Scene", "props": { "width": 720, "pref": "@Prefab:Pr", "height": 1280, "autoDestroyAtClosed": true }, "compId": 2, "child": [{ "type": "Image", "props": { "y": 892, "x": 0, "width": 729, "visible": true, "var": "BottomCollider", "skin": "InGameView/colliderbottom.png", "scaleY": 1, "scaleX": 1, "name": "BottomCollider", "height": 211, "bottom": 177, "alpha": 1 }, "compId": 58, "child": [{ "type": "Script", "props": { "points": "-2,-1,78,-1,78,65,83,81,110,108,147,129,190,145,248,157,291,164,353,166,423,164,486,156,551,139,596,119,626,96,642,72,643,0,732,0", "runtime": "laya.physics.ChainCollider" }, "compId": 200 }, { "type": "Script", "props": { "type": "static", "runtime": "laya.physics.RigidBody" }, "compId": 201 }] }, { "type": "Image", "props": { "y": 937, "x": 720, "width": 82, "var": "RightCollider", "skin": "InGameView/0.png", "pivotY": 939, "pivotX": 79, "name": "RightCollider", "height": 957, "alpha": 1 }, "compId": 55, "child": [{ "type": "Script", "props": { "y": 0, "x": 0, "points": "230,-454,82,-1,81,1404,2,1405,0,716,1,631,0,571,7,478,23,332,31,235,32,191,31,169,34,143,39,121,49,81,58,36,61,-1,84,0", "runtime": "laya.physics.ChainCollider" }, "compId": 195 }, { "type": "Script", "props": { "type": "static", "runtime": "laya.physics.RigidBody" }, "compId": 196 }] }, { "type": "Image", "props": { "y": 943, "x": 78, "width": 80, "var": "LeftCollider", "skin": "InGameView/1.png", "scaleY": 1, "scaleX": 1, "pivotY": 939, "pivotX": 80, "name": "LeftCollider", "height": 885, "alpha": 1 }, "compId": 52, "child": [{ "type": "Script", "props": { "y": 0, "x": 0, "points": "-153,-466,-1,-5,9,1434,0,-1,15,-1,18,32,25,67,39,115,44,144,46,165,46,198,49,254,57,312,63,366,80,533,80,678,83,1432", "runtime": "laya.physics.ChainCollider" }, "compId": 197 }, { "type": "Script", "props": { "type": "static", "runtime": "laya.physics.RigidBody" }, "compId": 198 }] }, { "type": "Image", "props": { "y": 0, "x": 0, "var": "BG", "top": 0, "skin": "InGameView/groundplane.png", "sizeGrid": "179,113,184,121", "right": 0, "left": 0, "bottom": 0 }, "compId": 4 }, { "type": "Image", "props": { "x": 78, "width": 514, "skin": "InGameView/borderbottom.png", "scaleX": 1.1, "name": "bottom", "height": 160, "bottom": 222 }, "compId": 37 }, { "type": "Image", "props": { "y": 0, "x": 14, "width": 346, "top": 0, "skin": "InGameView/border2.png", "scaleY": 2, "scaleX": 2, "name": "area", "bottom": 380 }, "compId": 36 }, { "type": "Image", "props": { "skin": "InGameView/blast-35.png", "right": 0, "name": "prop", "left": 0, "bottom": 0 }, "compId": 3, "child": [{ "type": "Button", "props": { "y": 132, "x": 629, "width": 82, "var": "arrowbtn", "stateNum": 1, "skin": "Skillicon/BoosterArrow1_00239.png", "pivotY": 37, "pivotX": 41, "name": "", "height": 73 }, "compId": 383, "child": [{ "type": "Image", "props": { "y": 62, "x": 84, "width": 29, "skin": "InGameView/blast-45.png", "pivotY": 14, "pivotX": 15, "name": "cycle", "height": 28 }, "compId": 20 }, { "type": "Text", "props": { "y": 64, "x": 84, "width": 32, "var": "Func5num", "valign": "middle", "text": "10", "pivotY": 9, "pivotX": 16, "height": 18, "fontSize": 20, "font": "Microsoft YaHei", "color": "#ffffff", "bold": false, "align": "center", "runtime": "laya.display.Text" }, "compId": 21 }] }, { "type": "Button", "props": { "y": 130, "x": 88, "width": 79, "var": "doublebtn", "stateNum": 1, "skin": "Skillicon/BoosterExplode1_00239.png", "pivotY": 29, "pivotX": 40, "height": 55 }, "compId": 384, "child": [{ "type": "Image", "props": { "y": 57, "x": 80, "width": 29, "skin": "InGameView/blast-45.png", "pivotY": 14, "pivotX": 15, "name": "cycle", "height": 28 }, "compId": 12 }, { "type": "Text", "props": { "y": 60, "x": 79, "width": 28, "var": "Func1num", "valign": "middle", "text": "10", "pivotY": 10, "pivotX": 14, "height": 20, "fontSize": 20, "font": "Microsoft YaHei", "color": "#ffffff", "bold": false, "align": "center", "runtime": "laya.display.Text" }, "compId": 13 }] }, { "type": "Button", "props": { "y": 166, "x": 222, "width": 85, "var": "zhunxin1btn", "stateNum": 1, "skin": "Skillicon/BoosterFire1_00239.png", "pivotY": 40, "pivotX": 43, "height": 80 }, "compId": 385, "child": [{ "type": "Image", "props": { "y": 57, "x": 79, "width": 29, "skin": "InGameView/blast-45.png", "pivotY": 14, "pivotX": 15, "name": "cycle", "height": 28 }, "compId": 14 }, { "type": "Text", "props": { "y": 59.5, "x": 79, "width": 27, "var": "Func2num", "valign": "middle", "text": "10", "pivotY": 12, "pivotX": 14, "height": 23, "fontSize": 20, "font": "Microsoft YaHei", "color": "#ffffff", "bold": false, "align": "center", "runtime": "laya.display.Text" }, "compId": 15 }] }, { "type": "Button", "props": { "y": 175, "x": 361, "width": 77, "var": "zhunxin2btn", "stateNum": 1, "skin": "Skillicon/BoosterShoot1_00240.png", "pivotY": 37, "pivotX": 39, "height": 73 }, "compId": 386, "child": [{ "type": "Image", "props": { "y": 58, "x": 76, "width": 29, "skin": "InGameView/blast-45.png", "pivotY": 14, "pivotX": 15, "name": "cycle", "height": 28 }, "compId": 16 }, { "type": "Text", "props": { "y": 61, "x": 76, "width": 31, "var": "Func3num", "valign": "middle", "text": "10", "pivotY": 11, "pivotX": 16, "height": 22, "fontSize": 20, "font": "Microsoft YaHei", "color": "#ffffff", "bold": false, "align": "center", "runtime": "laya.display.Text" }, "compId": 17 }] }, { "type": "Button", "props": { "y": 165, "x": 499, "width": 68, "var": "hammerbtn", "stateNum": 1, "skin": "Skillicon/BoosterHammer1_00238.png", "pivotY": 39, "pivotX": 34, "height": 78 }, "compId": 388, "child": [{ "type": "Image", "props": { "y": 56, "x": 84, "width": 29, "skin": "InGameView/blast-45.png", "pivotY": 14, "pivotX": 15, "name": "cycle", "height": 28 }, "compId": 18 }, { "type": "Text", "props": { "y": 58, "x": 84, "width": 31, "var": "Func4num", "valign": "middle", "text": "10", "pivotY": 12, "pivotX": 16, "height": 24, "fontSize": 20, "font": "Microsoft YaHei", "color": "#ffffff", "bold": false, "align": "center", "runtime": "laya.display.Text" }, "compId": 19 }] }] }, { "type": "Sprite", "props": { "y": 8, "x": 8, "width": 16, "var": "prefabbox", "pivotY": 8, "pivotX": 8, "height": 16 }, "compId": 677 }, { "type": "ProgressBar", "props": { "x": 360, "width": 281, "var": "LevelProgress", "value": 0, "top": 120, "skin": "InGameView/jindutiao-1-2.png", "pivotY": 22, "pivotX": 141, "height": 44 }, "compId": 574, "child": [{ "type": "Image", "props": { "y": 22, "x": -14, "width": 73, "skin": "InGameView/jindutiao-1-3.png", "pivotY": 37, "pivotX": 37, "height": 73 }, "compId": 570, "child": [{ "type": "FontClip", "props": { "y": 36, "x": 36, "width": 25, "var": "NowLv", "value": "1", "skin": "Ball/43.png", "sheet": "0123456789", "pivotY": 15, "pivotX": 13, "height": 29, "align": "center" }, "compId": 578 }] }, { "type": "Image", "props": { "y": 22, "x": 298, "width": 73, "skin": "InGameView/jindutiao-1-3.png", "pivotY": 37, "pivotX": 37, "height": 73 }, "compId": 571, "child": [{ "type": "FontClip", "props": { "y": 36.5, "x": 36.5, "width": 25, "var": "NextLv", "value": "2", "skin": "Ball/43.png", "sheet": "0123456789", "pivotY": 15, "pivotX": 13, "height": 29, "align": "center" }, "compId": 576 }] }, { "type": "Text", "props": { "y": -22, "x": 38, "width": 117, "var": "NowScore", "valign": "middle", "text": "0", "pivotY": 13, "pivotX": 19, "height": 26, "fontSize": 30, "color": "#ffffff", "align": "right", "runtime": "laya.display.Text" }, "compId": 674 }, { "type": "Text", "props": { "y": -21, "x": 208, "width": 124, "var": "RequireScore", "valign": "middle", "text": "0", "pivotY": 14, "pivotX": 62, "height": 27, "fontSize": 30, "color": "#ffffff", "align": "left", "runtime": "laya.display.Text" }, "compId": 675 }, { "type": "Text", "props": { "y": -34, "x": 136, "width": 10, "text": "/", "height": 25, "fontSize": 30, "color": "#ffffff", "runtime": "laya.display.Text" }, "compId": 676 }] }, { "type": "Image", "props": { "y": 49, "x": 0, "visible": false, "var": "Effect", "skin": "InGameView/youxinei-1-2.png", "right": 0, "left": 0 }, "compId": 558, "child": [{ "type": "Button", "props": { "y": 883, "x": 360, "width": 298, "var": "EffectBtn", "stateNum": 1, "skin": "InGameView/youxinei-1-5.png", "pivotY": 53, "pivotX": 149, "height": 106 }, "compId": 564 }, { "type": "Image", "props": { "y": 95, "x": 626, "width": 69, "pivotY": 36, "pivotX": 35, "name": "ICON", "height": 72 }, "compId": 565 }, { "type": "Image", "props": { "x": 0, "width": 72, "top": -48, "skin": "InGameView/youxinei-1-1.png", "name": "Left", "height": 1280 }, "compId": 566 }, { "type": "Image", "props": { "x": 684, "width": 72, "top": -48, "skin": "InGameView/youxinei-1-1.png", "rotation": 180, "pivotY": 640, "pivotX": 36, "name": "Right", "height": 1280 }, "compId": 567 }, { "type": "Text", "props": { "y": 52, "x": 318, "width": 153, "valign": "middle", "text": "消除所有的", "pivotY": 28, "pivotX": 77, "name": "describe", "height": 55, "fontSize": 30, "font": "Microsoft YaHei", "color": "#ffffff", "align": "left", "runtime": "laya.display.Text" }, "compId": 579, "child": [{ "type": "Text", "props": { "y": 26, "x": 176, "width": 40, "var": "ClearNum", "valign": "middle", "text": "2", "pivotY": 23, "pivotX": 20, "height": 45, "fontSize": 35, "color": "#ffffff", "align": "center", "runtime": "laya.display.Text" }, "compId": 580 }] }, { "type": "Text", "props": { "y": 52, "x": 362, "width": 241, "valign": "middle", "text": "消除你所砸到的球", "pivotY": 28, "pivotX": 121, "name": "describe2", "height": 55, "fontSize": 30, "font": "Microsoft YaHei", "color": "#ffffff", "align": "left", "runtime": "laya.display.Text" }, "compId": 678 }] }, { "type": "Image", "props": { "x": 311, "width": 124, "visible": false, "var": "Guide", "skin": "InGameView/yindao.png", "pivotY": 32, "pivotX": 31, "height": 148, "bottom": 160 }, "compId": 734, "child": [{ "type": "Image", "props": { "y": -40, "x": -55, "skin": "InGameView/zhujiemian-1-9.png" }, "compId": 736 }] }], "animations": [{ "nodes": [{ "target": 383, "keyframes": { "var": [{ "value": "arrowbtn", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "var", "index": 0 }], "skin": [{ "value": "Skillicon/BoosterArrow1_00239.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 0 }, { "value": "Skillicon/BoosterArrow1_00240.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 1 }, { "value": "Skillicon/BoosterArrow1_00241.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 2 }, { "value": "Skillicon/BoosterArrow1_00242.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 3 }, { "value": "Skillicon/BoosterArrow1_00243.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 4 }, { "value": "Skillicon/BoosterArrow1_00244.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 5 }, { "value": "Skillicon/BoosterArrow1_00245.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 6 }, { "value": "Skillicon/BoosterArrow1_00246.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 7 }, { "value": "Skillicon/BoosterArrow1_00247.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 8 }, { "value": "Skillicon/BoosterArrow1_00248.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 9 }, { "value": "Skillicon/BoosterArrow1_00249.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 10 }, { "value": "Skillicon/BoosterArrow1_00250.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 11 }, { "value": "Skillicon/BoosterArrow1_00251.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 12 }, { "value": "Skillicon/BoosterArrow1_00252.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 13 }, { "value": "Skillicon/BoosterArrow1_00253.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 14 }, { "value": "Skillicon/BoosterArrow1_00254.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 15 }, { "value": "Skillicon/BoosterArrow1_00255.png", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "skin", "index": 16 }], "name": [{ "value": "", "tweenMethod": "linearNone", "tween": false, "target": 383, "key": "name", "index": 0 }] } }], "name": "ani1", "id": 1, "frameRate": 24, "action": 0 }, { "nodes": [{ "target": 384, "keyframes": { "skin": [{ "value": "Skillicon/BoosterExplode1_00239.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 0 }, { "value": "Skillicon/BoosterExplode1_00240.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 1 }, { "value": "Skillicon/BoosterExplode1_00241.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 2 }, { "value": "Skillicon/BoosterExplode1_00242.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 3 }, { "value": "Skillicon/BoosterExplode1_00243.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 4 }, { "value": "Skillicon/BoosterExplode1_00244.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 5 }, { "value": "Skillicon/BoosterExplode1_00245.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 6 }, { "value": "Skillicon/BoosterExplode1_00246.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 7 }, { "value": "Skillicon/BoosterExplode1_00247.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 8 }, { "value": "Skillicon/BoosterExplode1_00248.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 9 }, { "value": "Skillicon/BoosterExplode1_00249.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 10 }, { "value": "Skillicon/BoosterExplode1_00250.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 11 }, { "value": "Skillicon/BoosterExplode1_00251.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 12 }, { "value": "Skillicon/BoosterExplode1_00252.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 13 }, { "value": "Skillicon/BoosterExplode1_00253.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 14 }, { "value": "Skillicon/BoosterExplode1_00254.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 15 }, { "value": "Skillicon/BoosterExplode1_00255.png", "tweenMethod": "linearNone", "tween": false, "target": 384, "key": "skin", "index": 16 }] } }], "name": "ani2", "id": 2, "frameRate": 24, "action": 0 }, { "nodes": [{ "target": 385, "keyframes": { "skin": [{ "value": "Skillicon/BoosterFire1_00239.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 0 }, { "value": "Skillicon/BoosterFire1_00240.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 1 }, { "value": "Skillicon/BoosterFire1_00241.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 2 }, { "value": "Skillicon/BoosterFire1_00242.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 3 }, { "value": "Skillicon/BoosterFire1_00243.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 4 }, { "value": "Skillicon/BoosterFire1_00244.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 5 }, { "value": "Skillicon/BoosterFire1_00245.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 6 }, { "value": "Skillicon/BoosterFire1_00246.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 7 }, { "value": "Skillicon/BoosterFire1_00247.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 8 }, { "value": "Skillicon/BoosterFire1_00248.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 9 }, { "value": "Skillicon/BoosterFire1_00249.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 10 }, { "value": "Skillicon/BoosterFire1_00250.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 11 }, { "value": "Skillicon/BoosterFire1_00251.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 12 }, { "value": "Skillicon/BoosterFire1_00252.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 13 }, { "value": "Skillicon/BoosterFire1_00253.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 14 }, { "value": "Skillicon/BoosterFire1_00254.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 15 }, { "value": "Skillicon/BoosterFire1_00255.png", "tweenMethod": "linearNone", "tween": false, "target": 385, "key": "skin", "index": 16 }] } }], "name": "ani3", "id": 3, "frameRate": 24, "action": 0 }, { "nodes": [{ "target": 386, "keyframes": { "skin": [{ "value": "Skillicon/BoosterShoot1_00240.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 0 }, { "value": "Skillicon/BoosterShoot1_00241.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 1 }, { "value": "Skillicon/BoosterShoot1_00242.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 2 }, { "value": "Skillicon/BoosterShoot1_00243.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 3 }, { "value": "Skillicon/BoosterShoot1_00244.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 4 }, { "value": "Skillicon/BoosterShoot1_00245.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 5 }, { "value": "Skillicon/BoosterShoot1_00246.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 6 }, { "value": "Skillicon/BoosterShoot1_00247.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 7 }, { "value": "Skillicon/BoosterShoot1_00248.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 8 }, { "value": "Skillicon/BoosterShoot1_00249.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 9 }, { "value": "Skillicon/BoosterShoot1_00250.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 10 }, { "value": "Skillicon/BoosterShoot1_00251.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 11 }, { "value": "Skillicon/BoosterShoot1_00252.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 12 }, { "value": "Skillicon/BoosterShoot1_00253.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 13 }, { "value": "Skillicon/BoosterShoot1_00254.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 14 }, { "value": "Skillicon/BoosterShoot1_00255.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 15 }, { "value": "Skillicon/BoosterShoot1_00256.png", "tweenMethod": "linearNone", "tween": false, "target": 386, "key": "skin", "index": 16 }] } }], "name": "ani4", "id": 4, "frameRate": 24, "action": 0 }, { "nodes": [{ "target": 388, "keyframes": { "skin": [{ "value": "Skillicon/BoosterHammer1_00238.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 0 }, { "value": "Skillicon/BoosterHammer1_00239.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 1 }, { "value": "Skillicon/BoosterHammer1_00240.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 2 }, { "value": "Skillicon/BoosterHammer1_00241.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 3 }, { "value": "Skillicon/BoosterHammer1_00242.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 4 }, { "value": "Skillicon/BoosterHammer1_00243.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 5 }, { "value": "Skillicon/BoosterHammer1_00244.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 6 }, { "value": "Skillicon/BoosterHammer1_00245.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 7 }, { "value": "Skillicon/BoosterHammer1_00246.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 8 }, { "value": "Skillicon/BoosterHammer1_00247.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 9 }, { "value": "Skillicon/BoosterHammer1_00248.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 10 }, { "value": "Skillicon/BoosterHammer1_00249.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 11 }, { "value": "Skillicon/BoosterHammer1_00250.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 12 }, { "value": "Skillicon/BoosterHammer1_00251.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 13 }, { "value": "Skillicon/BoosterHammer1_00252.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 14 }, { "value": "Skillicon/BoosterHammer1_00253.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 15 }, { "value": "Skillicon/BoosterHammer1_00254.png", "tweenMethod": "linearNone", "tween": false, "target": 388, "key": "skin", "index": 16 }] } }], "name": "ani5", "id": 5, "frameRate": 24, "action": 0 }, { "nodes": [{ "target": 734, "keyframes": { "scaleY": [{ "value": 1, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleY", "index": 0 }, { "value": 0.95, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleY", "index": 5 }, { "value": 0.9, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleY", "index": 10 }, { "value": 0.95, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleY", "index": 15 }, { "value": 1, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleY", "index": 20 }, { "value": 0.95, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleY", "index": 25 }, { "value": 0.9, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleY", "index": 30 }, { "value": 0.95, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleY", "index": 35 }, { "value": 1, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleY", "index": 40 }], "scaleX": [{ "value": 1, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleX", "index": 0 }, { "value": 0.95, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleX", "index": 5 }, { "value": 0.9, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleX", "index": 10 }, { "value": 0.95, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleX", "index": 15 }, { "value": 1, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleX", "index": 20 }, { "value": 0.95, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleX", "index": 25 }, { "value": 0.9, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleX", "index": 30 }, { "value": 0.95, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleX", "index": 35 }, { "value": 1, "tweenMethod": "linearNone", "tween": true, "target": 734, "key": "scaleX", "index": 40 }] } }], "name": "guide", "id": 6, "frameRate": 24, "action": 0 }], "loadList": ["InGameView/colliderbottom.png", "InGameView/0.png", "InGameView/1.png", "InGameView/groundplane.png", "InGameView/borderbottom.png", "InGameView/border2.png", "InGameView/blast-35.png", "Skillicon/BoosterArrow1_00239.png", "InGameView/blast-45.png", "Skillicon/BoosterExplode1_00239.png", "Skillicon/BoosterFire1_00239.png", "Skillicon/BoosterShoot1_00240.png", "Skillicon/BoosterHammer1_00238.png", "InGameView/jindutiao-1-2.png", "InGameView/jindutiao-1-3.png", "Ball/43.png", "InGameView/youxinei-1-2.png", "InGameView/youxinei-1-5.png", "InGameView/youxinei-1-1.png", "InGameView/yindao.png", "InGameView/zhujiemian-1-9.png", "Skillicon/BoosterArrow1_00240.png", "Skillicon/BoosterArrow1_00241.png", "Skillicon/BoosterArrow1_00242.png", "Skillicon/BoosterArrow1_00243.png", "Skillicon/BoosterArrow1_00244.png", "Skillicon/BoosterArrow1_00245.png", "Skillicon/BoosterArrow1_00246.png", "Skillicon/BoosterArrow1_00247.png", "Skillicon/BoosterArrow1_00248.png", "Skillicon/BoosterArrow1_00249.png", "Skillicon/BoosterArrow1_00250.png", "Skillicon/BoosterArrow1_00251.png", "Skillicon/BoosterArrow1_00252.png", "Skillicon/BoosterArrow1_00253.png", "Skillicon/BoosterArrow1_00254.png", "Skillicon/BoosterArrow1_00255.png", "Skillicon/BoosterExplode1_00240.png", "Skillicon/BoosterExplode1_00241.png", "Skillicon/BoosterExplode1_00242.png", "Skillicon/BoosterExplode1_00243.png", "Skillicon/BoosterExplode1_00244.png", "Skillicon/BoosterExplode1_00245.png", "Skillicon/BoosterExplode1_00246.png", "Skillicon/BoosterExplode1_00247.png", "Skillicon/BoosterExplode1_00248.png", "Skillicon/BoosterExplode1_00249.png", "Skillicon/BoosterExplode1_00250.png", "Skillicon/BoosterExplode1_00251.png", "Skillicon/BoosterExplode1_00252.png", "Skillicon/BoosterExplode1_00253.png", "Skillicon/BoosterExplode1_00254.png", "Skillicon/BoosterExplode1_00255.png", "Skillicon/BoosterFire1_00240.png", "Skillicon/BoosterFire1_00241.png", "Skillicon/BoosterFire1_00242.png", "Skillicon/BoosterFire1_00243.png", "Skillicon/BoosterFire1_00244.png", "Skillicon/BoosterFire1_00245.png", "Skillicon/BoosterFire1_00246.png", "Skillicon/BoosterFire1_00247.png", "Skillicon/BoosterFire1_00248.png", "Skillicon/BoosterFire1_00249.png", "Skillicon/BoosterFire1_00250.png", "Skillicon/BoosterFire1_00251.png", "Skillicon/BoosterFire1_00252.png", "Skillicon/BoosterFire1_00253.png", "Skillicon/BoosterFire1_00254.png", "Skillicon/BoosterFire1_00255.png", "Skillicon/BoosterShoot1_00241.png", "Skillicon/BoosterShoot1_00242.png", "Skillicon/BoosterShoot1_00243.png", "Skillicon/BoosterShoot1_00244.png", "Skillicon/BoosterShoot1_00245.png", "Skillicon/BoosterShoot1_00246.png", "Skillicon/BoosterShoot1_00247.png", "Skillicon/BoosterShoot1_00248.png", "Skillicon/BoosterShoot1_00249.png", "Skillicon/BoosterShoot1_00250.png", "Skillicon/BoosterShoot1_00251.png", "Skillicon/BoosterShoot1_00252.png", "Skillicon/BoosterShoot1_00253.png", "Skillicon/BoosterShoot1_00254.png", "Skillicon/BoosterShoot1_00255.png", "Skillicon/BoosterShoot1_00256.png", "Skillicon/BoosterHammer1_00239.png", "Skillicon/BoosterHammer1_00240.png", "Skillicon/BoosterHammer1_00241.png", "Skillicon/BoosterHammer1_00242.png", "Skillicon/BoosterHammer1_00243.png", "Skillicon/BoosterHammer1_00244.png", "Skillicon/BoosterHammer1_00245.png", "Skillicon/BoosterHammer1_00246.png", "Skillicon/BoosterHammer1_00247.png", "Skillicon/BoosterHammer1_00248.png", "Skillicon/BoosterHammer1_00249.png", "Skillicon/BoosterHammer1_00250.png", "Skillicon/BoosterHammer1_00251.png", "Skillicon/BoosterHammer1_00252.png", "Skillicon/BoosterHammer1_00253.png", "Skillicon/BoosterHammer1_00254.png"], "loadList3D": [] };
  903. ui.InGameSceneUI = InGameSceneUI;
  904. REG("ui.InGameSceneUI", InGameSceneUI);
  905. class LotteryViewUI extends Laya.View {
  906. constructor() { super(); }
  907. createChildren() {
  908. super.createChildren();
  909. this.createView(LotteryViewUI.uiView);
  910. }
  911. }
  912. LotteryViewUI.uiView = { "type": "View", "props": { "width": 720, "height": 1280 }, "compId": 2, "child": [{ "type": "Image", "props": { "y": 460, "x": 337, "var": "dial", "skin": "LotteryView/choujiang-1-1.png", "anchorY": 0.5, "anchorX": 0.5 }, "compId": 4, "child": [{ "type": "Box", "props": { "y": 171, "x": 344, "width": 93, "rotation": 0, "pivotY": 46, "pivotX": 47, "height": 91 }, "compId": 8, "child": [{ "type": "Image", "props": { "y": 46, "x": 47, "width": 87, "skin": "LotteryView/func1.png", "rotation": 221, "pivotY": 43, "pivotX": 44, "height": 86 }, "compId": 9 }, { "type": "Text", "props": { "y": 2, "x": 91, "width": 68, "valign": "middle", "text": "X1", "rotation": 225, "pivotY": 13, "pivotX": 34, "height": 25, "fontSize": 20, "color": "#ffffff", "align": "center", "runtime": "laya.display.Text" }, "compId": 10 }] }, { "type": "Box", "props": { "y": 277, "x": 403, "width": 93, "rotation": 12, "pivotY": 46, "pivotX": 47, "height": 91 }, "compId": 14, "child": [{ "type": "Image", "props": { "y": 46, "x": 47, "width": 87, "skin": "LotteryView/func4.png", "rotation": 253, "pivotY": 43, "pivotX": 44, "height": 86 }, "compId": 15 }, { "type": "Text", "props": { "y": 33, "x": 110, "width": 68, "valign": "middle", "text": "X2", "rotation": 254, "pivotY": 13, "pivotX": 34, "height": 25, "fontSize": 20, "color": "#ffffff", "align": "center", "runtime": "laya.display.Text" }, "compId": 16 }] }, { "type": "Box", "props": { "y": 395, "x": 345, "width": 93, "rotation": 60, "pivotY": 46, "pivotX": 47, "height": 91 }, "compId": 17, "child": [{ "type": "Image", "props": { "y": 46, "x": 47, "width": 87, "skin": "LotteryView/func5.png", "rotation": -86, "pivotY": 43, "pivotX": 44, "height": 86 }, "compId": 18 }, { "type": "Text", "props": { "y": 45.5, "x": 109, "width": 68, "valign": "middle", "text": "X1", "rotation": -91, "pivotY": 13, "pivotX": 34, "height": 25, "fontSize": 20, "color": "#ffffff", "align": "center", "runtime": "laya.display.Text" }, "compId": 19 }] }, { "type": "Box", "props": { "y": 395, "x": 207, "width": 93, "rotation": 120, "pivotY": 46, "pivotX": 47, "height": 91 }, "compId": 20, "child": [{ "type": "Image", "props": { "y": 46, "x": 47, "width": 87, "skin": "LotteryView/func5.png", "rotation": -87, "pivotY": 43, "pivotX": 44, "height": 86 }, "compId": 21 }, { "type": "Text", "props": { "y": 45.5, "x": 109, "width": 68, "valign": "middle", "text": "X2", "rotation": -91, "pivotY": 13, "pivotX": 34, "height": 25, "fontSize": 20, "color": "#ffffff", "align": "center", "runtime": "laya.display.Text" }, "compId": 22 }] }, { "type": "Box", "props": { "y": 277, "x": 139, "width": 93, "rotation": 180, "pivotY": 46, "pivotX": 47, "height": 91 }, "compId": 23, "child": [{ "type": "Image", "props": { "y": 46, "x": 47, "width": 87, "skin": "LotteryView/func1.png", "rotation": -83, "pivotY": 43, "pivotX": 44, "height": 86 }, "compId": 24 }, { "type": "Text", "props": { "y": 45.5, "x": 109, "width": 68, "valign": "middle", "text": "X2", "rotation": -91, "pivotY": 13, "pivotX": 34, "height": 25, "fontSize": 20, "color": "#ffffff", "align": "center", "runtime": "laya.display.Text" }, "compId": 25 }] }, { "type": "Box", "props": { "y": 162, "x": 207, "width": 93, "rotation": 236, "pivotY": 46, "pivotX": 47, "height": 91 }, "compId": 26, "child": [{ "type": "Image", "props": { "y": 46, "x": 47, "width": 87, "skin": "LotteryView/func2.png", "rotation": 90, "pivotY": 43, "pivotX": 44, "height": 86 }, "compId": 27 }, { "type": "Text", "props": { "y": 45.5, "x": 109, "width": 68, "valign": "middle", "text": "X1", "rotation": -91, "pivotY": 13, "pivotX": 34, "height": 25, "fontSize": 20, "color": "#ffffff", "align": "center", "runtime": "laya.display.Text" }, "compId": 28 }] }] }, { "type": "Button", "props": { "y": 227, "x": 614, "var": "CloseBtn", "stateNum": 1, "skin": "LotteryView/choujiang-1-4.png" }, "compId": 5 }, { "type": "Image", "props": { "y": 437, "x": 337, "width": 87, "skin": "LotteryView/choujiang-1-2.png", "pivotY": 77, "pivotX": 44, "name": "Pointer", "height": 153 }, "compId": 6 }, { "type": "Button", "props": { "y": 931, "x": 360, "width": 298, "var": "LotteryBtn", "stateNum": 1, "skin": "LotteryView/choujiang-1-3.png", "pivotY": 53, "pivotX": 149, "height": 106 }, "compId": 7 }], "loadList": ["LotteryView/choujiang-1-1.png", "LotteryView/func1.png", "LotteryView/func4.png", "LotteryView/func5.png", "LotteryView/func2.png", "LotteryView/choujiang-1-4.png", "LotteryView/choujiang-1-2.png", "LotteryView/choujiang-1-3.png"], "loadList3D": [] };
  913. ui.LotteryViewUI = LotteryViewUI;
  914. REG("ui.LotteryViewUI", LotteryViewUI);
  915. class MainSceneUI extends Laya.View {
  916. constructor() { super(); }
  917. createChildren() {
  918. super.createChildren();
  919. this.createView(MainSceneUI.uiView);
  920. }
  921. }
  922. MainSceneUI.uiView = { "type": "View", "props": { "width": 720, "height": 1280 }, "compId": 2, "child": [{ "type": "Image", "props": { "var": "BG", "top": 0, "skin": "MainView/zhujiemian-1-8.png", "sizeGrid": "15,17,13,9", "right": 0, "left": 0, "bottom": 0, "alpha": 1 }, "compId": 13 }, { "type": "Button", "props": { "y": 258, "x": 42, "width": 42, "var": "SetBtn", "stateNum": 1, "skin": "MainView/zhujiemian-1-6.png", "pivotY": 21, "pivotX": 21, "height": 42 }, "compId": 30 }, { "type": "Box", "props": { "x": 97, "width": 555, "height": 173, "bottom": 180 }, "compId": 56, "child": [{ "type": "Button", "props": { "y": 25, "x": 220, "var": "RankBtn", "stateNum": 1, "skin": "MainView/zhujiemian-1-3(1).png" }, "compId": 31 }, { "type": "Button", "props": { "y": 16, "x": 436, "var": "LotteryBtn", "stateNum": 1, "skin": "MainView/zhujiemian-1-4(1).png" }, "compId": 32 }, { "type": "Button", "props": { "y": 16, "x": 19, "var": "SignBtn", "stateNum": 1, "skin": "MainView/zhujiemian-1-2(1).png" }, "compId": 33 }] }, { "type": "Image", "props": { "x": 360, "width": 629, "top": 2, "skin": "MainView/zhujiemian-1-7.png", "pivotY": 468, "pivotX": 315, "height": 936 }, "compId": 60, "child": [{ "type": "Button", "props": { "y": 832.5, "x": 298, "width": 207, "var": "StartBtn", "stateNum": 1, "skin": "MainView/zhujiemian-1-5.png", "pivotY": 104, "pivotX": 104, "height": 207 }, "compId": 9 }] }, { "type": "Image", "props": { "y": 205, "x": 375, "width": 526, "skin": "MainView/logo.png", "pivotY": 153, "pivotX": 263, "height": 305 }, "compId": 57 }], "loadList": ["MainView/zhujiemian-1-8.png", "MainView/zhujiemian-1-6.png", "MainView/zhujiemian-1-3(1).png", "MainView/zhujiemian-1-4(1).png", "MainView/zhujiemian-1-2(1).png", "MainView/zhujiemian-1-7.png", "MainView/zhujiemian-1-5.png", "MainView/logo.png"], "loadList3D": [] };
  923. ui.MainSceneUI = MainSceneUI;
  924. REG("ui.MainSceneUI", MainSceneUI);
  925. class RankViewUI extends Laya.View {
  926. constructor() { super(); }
  927. createChildren() {
  928. super.createChildren();
  929. this.createView(RankViewUI.uiView);
  930. }
  931. }
  932. RankViewUI.uiView = { "type": "View", "props": { "width": 720, "height": 1280 }, "compId": 2, "child": [{ "type": "Image", "props": { "y": 513, "x": 360, "width": 555, "skin": "SetView/shezhi-1-1.png", "sizeGrid": "98,159,125,118", "height": 767, "anchorY": 0.5, "anchorX": 0.5 }, "compId": 5, "child": [{ "type": "Image", "props": { "y": 14, "x": 198, "skin": "RankView/paihang-1-1.png" }, "compId": 6 }] }, { "type": "Button", "props": { "y": 139, "x": 573, "var": "CloseBtn", "stateNum": 1, "skin": "SetView/shezhi-1-3.png" }, "compId": 7 }, { "type": "Box", "props": { "y": 231, "x": 118, "width": 495, "height": 623 }, "compId": 9, "child": [{ "type": "Image", "props": { "y": 6, "x": 12, "width": 459, "skin": "RankView/paihang-1-2.png", "sizeGrid": "22,39,25,23", "height": 65 }, "compId": 8 }, { "type": "Image", "props": { "y": 84, "x": 12, "width": 459, "skin": "RankView/paihang-1-2.png", "sizeGrid": "22,39,25,23", "height": 65 }, "compId": 11 }, { "type": "Image", "props": { "y": 163, "x": 12, "width": 459, "skin": "RankView/paihang-1-2.png", "sizeGrid": "22,39,25,23", "height": 65 }, "compId": 12 }, { "type": "Image", "props": { "y": 246.5, "x": 12, "width": 459, "skin": "RankView/paihang-1-2.png", "sizeGrid": "22,39,25,23", "height": 65 }, "compId": 13 }, { "type": "Image", "props": { "y": 328, "x": 12, "width": 459, "skin": "RankView/paihang-1-2.png", "sizeGrid": "22,39,25,23", "height": 65 }, "compId": 14 }, { "type": "Image", "props": { "y": 407, "x": 12, "width": 459, "skin": "RankView/paihang-1-2.png", "sizeGrid": "22,39,25,23", "height": 65 }, "compId": 15 }, { "type": "Image", "props": { "y": 551, "x": 2, "width": 487, "skin": "RankView/paihang-1-7.png", "sizeGrid": "25,31,28,24", "height": 70 }, "compId": 16 }] }, { "type": "Button", "props": { "y": 733, "x": 194, "var": "UpPageBtn", "stateNum": 1, "skin": "RankView/paihang-1-6.png" }, "compId": 17 }, { "type": "Button", "props": { "y": 744, "x": 476, "width": 69, "var": "DownPageBtn", "stateNum": 1, "skin": "RankView/paihang-1-6.png", "rotation": 180, "pivotY": 16, "pivotX": 35, "height": 31 }, "compId": 18 }], "loadList": ["SetView/shezhi-1-1.png", "RankView/paihang-1-1.png", "SetView/shezhi-1-3.png", "RankView/paihang-1-2.png", "RankView/paihang-1-7.png", "RankView/paihang-1-6.png"], "loadList3D": [] };
  933. ui.RankViewUI = RankViewUI;
  934. REG("ui.RankViewUI", RankViewUI);
  935. class ReviveViewUI extends Laya.Scene {
  936. constructor() { super(); }
  937. createChildren() {
  938. super.createChildren();
  939. this.createView(ReviveViewUI.uiView);
  940. }
  941. }
  942. ReviveViewUI.uiView = { "type": "Scene", "props": { "width": 720, "height": 1280 }, "compId": 2, "child": [{ "type": "Image", "props": { "y": 0, "x": 0, "var": "BG", "top": 0, "skin": "WinView/black.png", "sizeGrid": "10,12,13,13", "right": 0, "left": 0, "bottom": 0 }, "compId": 10 }, { "type": "Image", "props": { "y": 17, "x": 0, "skin": "ReviveView/fuhuo-1-1.png" }, "compId": 4, "child": [{ "type": "Image", "props": { "y": 250, "x": 285, "skin": "ReviveView/fuhuo-1-2.png" }, "compId": 5 }] }, { "type": "Image", "props": { "y": 449, "x": 370, "width": 147, "skin": "ReviveView/fuhuo-1-4.png", "pivotY": 74, "pivotX": 74, "height": 147 }, "compId": 6, "child": [{ "type": "Text", "props": { "y": 70, "x": 74, "width": 103, "var": "Time", "valign": "middle", "text": "9", "pivotY": 58, "pivotX": 52, "height": 117, "fontSize": 125, "color": "#f05929", "align": "center", "runtime": "laya.display.Text" }, "compId": 7 }] }, { "type": "Button", "props": { "y": 760, "x": 304.5, "var": "NoBtn", "stateNum": 1, "skin": "ReviveView/fuhuo-1-5.png" }, "compId": 8 }, { "type": "Button", "props": { "y": 583, "x": 304.5, "var": "VideoBtn", "stateNum": 1, "skin": "ReviveView/fuhuo-1-3.png" }, "compId": 9 }], "loadList": ["WinView/black.png", "ReviveView/fuhuo-1-1.png", "ReviveView/fuhuo-1-2.png", "ReviveView/fuhuo-1-4.png", "ReviveView/fuhuo-1-5.png", "ReviveView/fuhuo-1-3.png"], "loadList3D": [] };
  943. ui.ReviveViewUI = ReviveViewUI;
  944. REG("ui.ReviveViewUI", ReviveViewUI);
  945. class SetViewUI extends Laya.View {
  946. constructor() { super(); }
  947. createChildren() {
  948. super.createChildren();
  949. this.createView(SetViewUI.uiView);
  950. }
  951. }
  952. SetViewUI.uiView = { "type": "View", "props": { "width": 720, "height": 1280 }, "compId": 2, "child": [{ "type": "Image", "props": { "y": 380, "x": 360, "width": 550, "skin": "SetView/shezhi-1-1.png", "pivotY": 178, "pivotX": 275, "height": 355, "alpha": 1, "sizeGrid": "98,159,125,118" }, "compId": 4, "child": [{ "type": "Image", "props": { "y": 17, "x": 225, "skin": "SetView/shezhi-1-2.png" }, "compId": 5 }] }, { "type": "Button", "props": { "y": 226, "x": 574, "var": "CloseBtn", "stateNum": 1, "skin": "SetView/shezhi-1-3.png" }, "compId": 6 }, { "type": "Sprite", "props": { "y": 335, "x": 191, "texture": "SetView/shezhi-1-4.png", "name": "SoundSprite" }, "compId": 7 }, { "type": "Sprite", "props": { "y": 431, "x": 193, "texture": "SetView/shezhi-1-5.png", "name": "ShakeSprite" }, "compId": 8 }, { "type": "Box", "props": { "y": 325, "x": 427, "width": 100, "var": "Sound", "height": 51 }, "compId": 9, "child": [{ "type": "Image", "props": { "y": 21, "x": 0, "skin": "SetView/shezhi-1-6.png" }, "compId": 10 }, { "type": "Image", "props": { "y": 26, "x": 70, "width": 51, "skin": "SetView/shezhi-1-8.png", "pivotY": 26, "pivotX": 26, "name": "open", "height": 51 }, "compId": 11 }, { "type": "Image", "props": { "y": 26, "x": 32, "width": 51, "skin": "SetView/shezhi-1-9.png", "pivotY": 26, "pivotX": 26, "name": "close", "height": 51 }, "compId": 12 }, { "type": "Button", "props": { "y": 26, "x": 50, "width": 100, "pivotY": 26, "pivotX": 50, "name": "btn", "height": 51 }, "compId": 17 }] }, { "type": "Box", "props": { "y": 423, "x": 427, "width": 100, "var": "Shake", "height": 54 }, "compId": 13, "child": [{ "type": "Image", "props": { "y": 23, "x": 0, "skin": "SetView/shezhi-1-7.png" }, "compId": 14 }, { "type": "Image", "props": { "y": 28, "x": 70, "width": 51, "skin": "SetView/shezhi-1-8.png", "pivotY": 26, "pivotX": 26, "name": "open", "height": 51 }, "compId": 15 }, { "type": "Image", "props": { "y": 28, "x": 32, "width": 51, "skin": "SetView/shezhi-1-9.png", "pivotY": 26, "pivotX": 26, "name": "close", "height": 51 }, "compId": 16 }, { "type": "Button", "props": { "y": 28, "x": 50, "width": 100, "pivotY": 26, "pivotX": 50, "name": "btn", "height": 51 }, "compId": 18 }] }, { "type": "Text", "props": { "y": 515, "x": 285, "width": 128, "valign": "middle", "text": "UserID:", "pivotY": 26, "pivotX": 64, "height": 52, "fontSize": 30, "align": "center", "runtime": "laya.display.Text" }, "compId": 19 }, { "type": "Text", "props": { "y": 493, "x": 360, "width": 189, "var": "userid", "valign": "middle", "height": 45, "fontSize": 30, "align": "left", "runtime": "laya.display.Text" }, "compId": 20 }], "loadList": ["SetView/shezhi-1-1.png", "SetView/shezhi-1-2.png", "SetView/shezhi-1-3.png", "SetView/shezhi-1-4.png", "SetView/shezhi-1-5.png", "SetView/shezhi-1-6.png", "SetView/shezhi-1-8.png", "SetView/shezhi-1-9.png", "SetView/shezhi-1-7.png"], "loadList3D": [] };
  953. ui.SetViewUI = SetViewUI;
  954. REG("ui.SetViewUI", SetViewUI);
  955. class SignViewUI extends Laya.Scene {
  956. constructor() { super(); }
  957. createChildren() {
  958. super.createChildren();
  959. this.createView(SignViewUI.uiView);
  960. }
  961. }
  962. SignViewUI.uiView = { "type": "Scene", "props": { "width": 720, "height": 1280 }, "compId": 2, "child": [{ "type": "Image", "props": { "y": 581, "x": 360, "width": 555, "skin": "SetView/shezhi-1-1.png", "sizeGrid": "98,159,125,118", "height": 871, "anchorY": 0.5, "anchorX": 0.5 }, "compId": 3, "child": [{ "type": "Image", "props": { "y": 13, "x": 225, "skin": "SignView/qiandao-1-1.png" }, "compId": 4 }, { "type": "Box", "props": { "y": 109, "x": 27, "width": 497, "var": "ItemList", "height": 572 }, "compId": 5, "child": [{ "type": "Box", "props": { "y": 3, "x": 0, "width": 150, "height": 188 }, "compId": 6, "child": [{ "type": "Image", "props": { "y": 32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-3.png", "sizeGrid": "9,45,22,34", "height": 157 }, "compId": 7, "child": [{ "type": "Image", "props": { "y": -32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-2.png", "height": 46 }, "compId": 8 }, { "type": "Image", "props": { "y": -23, "x": 39, "skin": "SignView/qiandao-1-4.png" }, "compId": 9 }, { "type": "Text", "props": { "y": -23, "x": 66.548095703125, "text": "1", "fontSize": 25, "color": "#ffffff", "runtime": "laya.display.Text" }, "compId": 10 }] }, { "type": "Button", "props": { "y": 114, "x": 74, "width": 147, "pivotY": 73, "pivotX": 74, "name": "btn", "height": 145 }, "compId": 11 }, { "type": "Image", "props": { "y": 94, "x": 74, "width": 100, "pivotY": 50, "pivotX": 50, "name": "icon", "height": 100 }, "compId": 12, "child": [{ "type": "Text", "props": { "y": 119, "x": 50, "width": 99, "valign": "middle", "text": "X3", "pivotY": 16, "pivotX": 50, "name": "num", "height": 31, "fontSize": 25, "align": "center", "runtime": "laya.display.Text" }, "compId": 13 }] }, { "type": "Image", "props": { "y": 0, "x": 0, "width": 148, "visible": false, "skin": "SignView/qiandao-1-7(1).png", "name": "complete", "height": 186 }, "compId": 14, "child": [{ "type": "Image", "props": { "y": 93, "x": 74, "width": 51, "skin": "SignView/qiandao-1-8.png", "pivotY": 26, "pivotX": 26, "height": 51 }, "compId": 15 }] }] }, { "type": "Box", "props": { "y": 3, "x": 173.5, "width": 150, "height": 188 }, "compId": 16, "child": [{ "type": "Image", "props": { "y": 32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-3.png", "sizeGrid": "9,45,22,34", "height": 157 }, "compId": 17, "child": [{ "type": "Image", "props": { "y": -32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-2.png", "height": 46 }, "compId": 18 }, { "type": "Image", "props": { "y": -23, "x": 39, "skin": "SignView/qiandao-1-4.png" }, "compId": 19 }, { "type": "Text", "props": { "y": -23, "x": 66.548095703125, "text": "2", "fontSize": 25, "color": "#ffffff", "runtime": "laya.display.Text" }, "compId": 20 }] }, { "type": "Button", "props": { "y": 114, "x": 74, "width": 147, "pivotY": 73, "pivotX": 74, "name": "btn", "height": 145 }, "compId": 21 }, { "type": "Image", "props": { "y": 94, "x": 74, "width": 100, "pivotY": 50, "pivotX": 50, "name": "icon", "height": 100 }, "compId": 22, "child": [{ "type": "Text", "props": { "y": 119, "x": 50, "width": 99, "valign": "middle", "text": "X3", "pivotY": 16, "pivotX": 50, "name": "num", "height": 31, "fontSize": 25, "align": "center", "runtime": "laya.display.Text" }, "compId": 23 }] }, { "type": "Image", "props": { "y": 0, "x": 0, "width": 148, "visible": false, "skin": "SignView/qiandao-1-7(1).png", "name": "complete", "height": 186 }, "compId": 24, "child": [{ "type": "Image", "props": { "y": 93, "x": 74, "width": 51, "skin": "SignView/qiandao-1-8.png", "pivotY": 26, "pivotX": 26, "height": 51 }, "compId": 25 }] }] }, { "type": "Box", "props": { "y": 3, "x": 347, "width": 150, "height": 188 }, "compId": 26, "child": [{ "type": "Image", "props": { "y": 32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-3.png", "sizeGrid": "9,45,22,34", "height": 157 }, "compId": 27, "child": [{ "type": "Image", "props": { "y": -32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-2.png", "height": 46 }, "compId": 28 }, { "type": "Image", "props": { "y": -23, "x": 39, "skin": "SignView/qiandao-1-4.png" }, "compId": 29 }, { "type": "Text", "props": { "y": -23, "x": 66.548095703125, "text": "3", "fontSize": 25, "color": "#ffffff", "runtime": "laya.display.Text" }, "compId": 30 }] }, { "type": "Button", "props": { "y": 114, "x": 74, "width": 147, "pivotY": 73, "pivotX": 74, "name": "btn", "height": 145 }, "compId": 31 }, { "type": "Image", "props": { "y": 94, "x": 74, "width": 100, "pivotY": 50, "pivotX": 50, "name": "icon", "height": 100 }, "compId": 32, "child": [{ "type": "Text", "props": { "y": 119, "x": 50, "width": 99, "valign": "middle", "text": "X3", "pivotY": 16, "pivotX": 50, "name": "num", "height": 31, "fontSize": 25, "align": "center", "runtime": "laya.display.Text" }, "compId": 33 }] }, { "type": "Image", "props": { "y": 0, "x": 0, "width": 148, "visible": false, "skin": "SignView/qiandao-1-7(1).png", "name": "complete", "height": 186 }, "compId": 34, "child": [{ "type": "Image", "props": { "y": 93, "x": 74, "width": 51, "skin": "SignView/qiandao-1-8.png", "pivotY": 26, "pivotX": 26, "height": 51 }, "compId": 35 }] }] }, { "type": "Box", "props": { "y": 217, "x": 0, "width": 150, "height": 188 }, "compId": 36, "child": [{ "type": "Image", "props": { "y": 32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-3.png", "sizeGrid": "9,45,22,34", "height": 157 }, "compId": 37, "child": [{ "type": "Image", "props": { "y": -32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-2.png", "height": 46 }, "compId": 38 }, { "type": "Image", "props": { "y": -23, "x": 39, "skin": "SignView/qiandao-1-4.png" }, "compId": 39 }, { "type": "Text", "props": { "y": -23, "x": 66.548095703125, "text": "4", "fontSize": 25, "color": "#ffffff", "runtime": "laya.display.Text" }, "compId": 40 }] }, { "type": "Button", "props": { "y": 114, "x": 74, "width": 147, "pivotY": 73, "pivotX": 74, "name": "btn", "height": 145 }, "compId": 41 }, { "type": "Image", "props": { "y": 94, "x": 74, "width": 100, "pivotY": 50, "pivotX": 50, "name": "icon", "height": 100 }, "compId": 42, "child": [{ "type": "Text", "props": { "y": 119, "x": 50, "width": 99, "valign": "middle", "text": "X3", "pivotY": 16, "pivotX": 50, "name": "num", "height": 31, "fontSize": 25, "align": "center", "runtime": "laya.display.Text" }, "compId": 43 }] }, { "type": "Image", "props": { "y": 0, "x": 0, "width": 148, "visible": false, "skin": "SignView/qiandao-1-7(1).png", "name": "complete", "height": 186 }, "compId": 44, "child": [{ "type": "Image", "props": { "y": 93, "x": 74, "width": 51, "skin": "SignView/qiandao-1-8.png", "pivotY": 26, "pivotX": 26, "height": 51 }, "compId": 45 }] }] }, { "type": "Box", "props": { "y": 217, "x": 173.5, "width": 150, "height": 188 }, "compId": 46, "child": [{ "type": "Image", "props": { "y": 32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-3.png", "sizeGrid": "9,45,22,34", "height": 157 }, "compId": 47, "child": [{ "type": "Image", "props": { "y": -32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-2.png", "height": 46 }, "compId": 48 }, { "type": "Image", "props": { "y": -23, "x": 39, "skin": "SignView/qiandao-1-4.png" }, "compId": 49 }, { "type": "Text", "props": { "y": -23, "x": 66.548095703125, "text": "5", "fontSize": 25, "color": "#ffffff", "runtime": "laya.display.Text" }, "compId": 50 }] }, { "type": "Button", "props": { "y": 114, "x": 74, "width": 147, "pivotY": 73, "pivotX": 74, "name": "btn", "height": 145 }, "compId": 51 }, { "type": "Image", "props": { "y": 94, "x": 74, "width": 100, "pivotY": 50, "pivotX": 50, "name": "icon", "height": 100 }, "compId": 52, "child": [{ "type": "Text", "props": { "y": 119, "x": 50, "width": 99, "valign": "middle", "text": "X3", "pivotY": 16, "pivotX": 50, "name": "num", "height": 31, "fontSize": 25, "align": "center", "runtime": "laya.display.Text" }, "compId": 53 }] }, { "type": "Image", "props": { "y": 0, "x": 0, "width": 148, "visible": false, "skin": "SignView/qiandao-1-7(1).png", "name": "complete", "height": 186 }, "compId": 54, "child": [{ "type": "Image", "props": { "y": 93, "x": 74, "width": 51, "skin": "SignView/qiandao-1-8.png", "pivotY": 26, "pivotX": 26, "height": 51 }, "compId": 55 }] }] }, { "type": "Box", "props": { "y": 217, "x": 347, "width": 150, "height": 188 }, "compId": 56, "child": [{ "type": "Image", "props": { "y": 32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-3.png", "sizeGrid": "9,45,22,34", "height": 157 }, "compId": 57, "child": [{ "type": "Image", "props": { "y": -32, "x": 0, "width": 147, "skin": "SignView/qiandao-1-2.png", "height": 46 }, "compId": 58 }, { "type": "Image", "props": { "y": -23, "x": 39, "skin": "SignView/qiandao-1-4.png" }, "compId": 59 }, { "type": "Text", "props": { "y": -23, "x": 66.548095703125, "text": "6", "fontSize": 25, "color": "#ffffff", "runtime": "laya.display.Text" }, "compId": 60 }] }, { "type": "Button", "props": { "y": 114, "x": 74, "width": 147, "pivotY": 73, "pivotX": 74, "name": "btn", "height": 145 }, "compId": 61 }, { "type": "Image", "props": { "y": 94, "x": 74, "width": 100, "pivotY": 50, "pivotX": 50, "name": "icon", "height": 100 }, "compId": 62, "child": [{ "type": "Text", "props": { "y": 119, "x": 50, "width": 99, "valign": "middle", "text": "X3", "pivotY": 16, "pivotX": 50, "name": "num", "height": 31, "fontSize": 25, "align": "center", "runtime": "laya.display.Text" }, "compId": 63 }] }, { "type": "Image", "props": { "y": 0, "x": 0, "width": 148, "visible": false, "skin": "SignView/qiandao-1-7(1).png", "name": "complete", "height": 186 }, "compId": 64, "child": [{ "type": "Image", "props": { "y": 93, "x": 74, "width": 51, "skin": "SignView/qiandao-1-8.png", "pivotY": 26, "pivotX": 26, "height": 51 }, "compId": 65 }] }] }, { "type": "Box", "props": { "y": 413, "x": 1, "width": 490, "height": 158 }, "compId": 66, "child": [{ "type": "Image", "props": { "y": 2, "x": 3, "skin": "SignView/qiandao-1-6.png" }, "compId": 67, "child": [{ "type": "Image", "props": { "y": 20, "x": 243.5, "width": 69, "skin": "SignView/qiandao-1-4.png", "pivotY": 14, "pivotX": 35, "height": 28 }, "compId": 68 }, { "type": "Text", "props": { "y": 6, "x": 237, "text": "7", "fontSize": 25, "color": "#ffffff", "runtime": "laya.display.Text" }, "compId": 69 }] }, { "type": "Button", "props": { "y": 43, "x": 4, "width": 485, "name": "btn", "height": 113 }, "compId": 70 }, { "type": "Image", "props": { "y": 79, "x": 245, "width": 71, "pivotY": 32, "pivotX": 34, "name": "icon", "height": 69 }, "compId": 71, "child": [{ "type": "Text", "props": { "y": 86, "x": 34, "width": 99, "valign": "middle", "text": "X3", "pivotY": 16, "pivotX": 50, "name": "num", "height": 31, "fontSize": 25, "align": "center", "runtime": "laya.display.Text" }, "compId": 72 }] }, { "type": "Image", "props": { "y": 0, "x": 2, "width": 489, "visible": false, "skin": "SignView/qiandao-1-7(1).png", "name": "complete", "height": 157 }, "compId": 73, "child": [{ "type": "Image", "props": { "y": 78.5, "x": 244.5, "width": 51, "skin": "SignView/qiandao-1-8.png", "pivotY": 26, "pivotX": 26, "height": 51 }, "compId": 74 }] }] }] }, { "type": "Button", "props": { "y": 17, "x": 490, "var": "CloseBtn", "stateNum": 1, "skin": "SetView/shezhi-1-3.png" }, "compId": 75 }, { "type": "Button", "props": { "y": 765, "x": 278, "width": 298, "var": "SignBtn", "stateNum": 1, "skin": "SignView/qiandao-1-5.png", "pivotY": 53, "pivotX": 149, "height": 106 }, "compId": 76 }] }], "loadList": ["SetView/shezhi-1-1.png", "SignView/qiandao-1-1.png", "SignView/qiandao-1-3.png", "SignView/qiandao-1-2.png", "SignView/qiandao-1-4.png", "SignView/qiandao-1-7(1).png", "SignView/qiandao-1-8.png", "SignView/qiandao-1-6.png", "SetView/shezhi-1-3.png", "SignView/qiandao-1-5.png"], "loadList3D": [] };
  963. ui.SignViewUI = SignViewUI;
  964. REG("ui.SignViewUI", SignViewUI);
  965. class WinViewUI extends Laya.Scene {
  966. constructor() { super(); }
  967. createChildren() {
  968. super.createChildren();
  969. this.createView(WinViewUI.uiView);
  970. }
  971. }
  972. WinViewUI.uiView = { "type": "Scene", "props": { "width": 720, "visible": true, "height": 1280 }, "compId": 2, "child": [{ "type": "Image", "props": { "var": "BG", "top": 0, "skin": "WinView/black.png", "sizeGrid": "12,14,12,12", "right": 0, "left": 0, "bottom": 0 }, "compId": 8 }, { "type": "Image", "props": { "y": 520, "x": 360, "width": 720, "skin": "WinView/guoguan-1-1.png", "pivotY": 510, "pivotX": 360, "height": 994 }, "compId": 4, "child": [{ "type": "Image", "props": { "y": 249, "x": 283, "visible": true, "skin": "WinView/guoguan-1-2.png" }, "compId": 5 }] }, { "type": "Button", "props": { "y": 487, "x": 252, "var": "BackBtn", "stateNum": 1, "skin": "WinView/guoguan-1-3.png" }, "compId": 6 }, { "type": "Button", "props": { "y": 600, "x": 228, "var": "NextBtn", "stateNum": 1, "skin": "WinView/guoguan-1-4.png" }, "compId": 7 }], "loadList": ["WinView/black.png", "WinView/guoguan-1-1.png", "WinView/guoguan-1-2.png", "WinView/guoguan-1-3.png", "WinView/guoguan-1-4.png"], "loadList3D": [] };
  973. ui.WinViewUI = WinViewUI;
  974. REG("ui.WinViewUI", WinViewUI);
  975. })(ui || (ui = {}));
  976. var PropEffecf;
  977. (function (PropEffecf) {
  978. PropEffecf[PropEffecf["NONE"] = 0] = "NONE";
  979. PropEffecf[PropEffecf["DOUBLE"] = 1] = "DOUBLE";
  980. PropEffecf[PropEffecf["HAMMER"] = 2] = "HAMMER";
  981. PropEffecf[PropEffecf["UP"] = 3] = "UP";
  982. PropEffecf[PropEffecf["CLEARLAST"] = 4] = "CLEARLAST";
  983. PropEffecf[PropEffecf["CLEARTWO"] = 5] = "CLEARTWO";
  984. })(PropEffecf || (PropEffecf = {}));
  985. var StageMode;
  986. (function (StageMode) {
  987. StageMode[StageMode["ReStart"] = 0] = "ReStart";
  988. StageMode[StageMode["Start"] = 1] = "Start";
  989. StageMode[StageMode["Lose"] = 2] = "Lose";
  990. StageMode[StageMode["Win"] = 3] = "Win";
  991. StageMode[StageMode["Clone"] = 4] = "Clone";
  992. StageMode[StageMode["Over"] = 5] = "Over";
  993. StageMode[StageMode["Revive"] = 6] = "Revive";
  994. StageMode[StageMode["Refresh"] = 7] = "Refresh";
  995. StageMode[StageMode["Check"] = 8] = "Check";
  996. StageMode[StageMode["GetReward"] = 9] = "GetReward";
  997. })(StageMode || (StageMode = {}));
  998. class EventManager {
  999. static EventOn(_mode, caller, fun, args = []) {
  1000. EventManager.Instance.on(PropEffecf[_mode], caller, fun, args);
  1001. }
  1002. static EventOff(_mode, caller, fun, args = []) {
  1003. EventManager.Instance.off(PropEffecf[_mode], caller, fun);
  1004. }
  1005. static EventTrigger(_mode, args = []) {
  1006. EventManager.Instance.event(PropEffecf[_mode], args);
  1007. EventManager.PropState = _mode;
  1008. }
  1009. static StageOn(_mode, caller, fun, args = []) {
  1010. EventManager.Instance.on(StageMode[_mode], caller, fun, args);
  1011. }
  1012. static StageOff(_mode, caller, fun, args = []) {
  1013. EventManager.Instance.off(StageMode[_mode], caller, fun);
  1014. }
  1015. static StageTrigger(_mode, args = []) {
  1016. EventManager.Instance.event(StageMode[_mode], args);
  1017. }
  1018. }
  1019. EventManager.Instance = new Laya.EventDispatcher();
  1020. EventManager.PropState = PropEffecf.NONE;
  1021. class GameManager {
  1022. constructor() {
  1023. this.ReviveNum = 0;
  1024. this.ScoreProgress = 0;
  1025. this.ScoreRecord2 = 0;
  1026. this.ScoreRecord = 0;
  1027. this.First = true;
  1028. this.Wave = 1;
  1029. this.CheckHeight = true;
  1030. this.played = false;
  1031. this.EliminateNum = 0;
  1032. GameManager.ins = this;
  1033. EventManager.StageOn(StageMode.Refresh, this, this.Fresh);
  1034. }
  1035. static get Instance() {
  1036. if (GameManager.ins) {
  1037. return GameManager.ins;
  1038. }
  1039. else {
  1040. return new GameManager();
  1041. }
  1042. }
  1043. Fresh() {
  1044. this.ScoreProgress = 0;
  1045. }
  1046. }
  1047. class MainView extends ui.MainSceneUI {
  1048. constructor() {
  1049. super();
  1050. this.STAGE = 0;
  1051. }
  1052. static get Instance() {
  1053. if (MainView.ins) {
  1054. return MainView.ins;
  1055. }
  1056. else {
  1057. return new MainView();
  1058. }
  1059. }
  1060. Show() {
  1061. let stage = AccountManager.Instance.curplayerData.GainAccount("stage");
  1062. this.STAGE = Number(stage);
  1063. this.StartBtn.clickHandler = Laya.Handler.create(this, this.ClickStart);
  1064. this.RankBtn.clickHandler = Laya.Handler.create(this, this.ClickRank);
  1065. this.SignBtn.clickHandler = Laya.Handler.create(this, this.ClickSign);
  1066. this.LotteryBtn.clickHandler = Laya.Handler.create(this, this.ClickLottery);
  1067. this.SetBtn.clickHandler = Laya.Handler.create(this, this.ClickSet);
  1068. this.height = Laya.stage.height;
  1069. this.BG.height = Laya.stage.height;
  1070. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  1071. this.height = Laya.stage.height;
  1072. this.BG.height = Laya.stage.height;
  1073. });
  1074. }
  1075. ClickStart() {
  1076. var agrs = [{ "t": AccountManager.Instance.ServerTime.toString() }];
  1077. ServerManager.Instance.SendHttp(BlastToMerge.KaiShi, agrs, Laya.Handler.create(this, this.GameStart), null);
  1078. }
  1079. GameStart(_data) {
  1080. GameManager.Instance.play_id = _data.play_id;
  1081. EventManager.StageTrigger(StageMode.Start, [true]);
  1082. }
  1083. ClickRank() {
  1084. ViewManager.Instance.ShowView(ViewType.RankView);
  1085. }
  1086. ClickLottery() {
  1087. ViewManager.Instance.ShowView(ViewType.LotteryView);
  1088. }
  1089. ClickSign() {
  1090. ViewManager.Instance.ShowView(ViewType.SignView);
  1091. }
  1092. ClickSet() {
  1093. ViewManager.Instance.ShowView(ViewType.SetView);
  1094. }
  1095. Close() {
  1096. }
  1097. }
  1098. class faafssfafsa {
  1099. constructor(_message, _pos, _size, _fontSize, _color = null) {
  1100. this.fontSize = 30;
  1101. this.message = "";
  1102. this.size = new Laya.Vector2(_size.x, _size.y);
  1103. this.fontSize = _fontSize;
  1104. this.color = _color;
  1105. this.message = _message;
  1106. this.pos = _pos;
  1107. }
  1108. }
  1109. class GameTools {
  1110. constructor() {
  1111. GameTools.ins = this;
  1112. }
  1113. static get Instance() {
  1114. if (GameTools.ins) {
  1115. return GameTools.ins;
  1116. }
  1117. else {
  1118. return new GameTools();
  1119. }
  1120. }
  1121. lerp(form, to, t) {
  1122. if (t <= 0) {
  1123. return form;
  1124. }
  1125. else if (t >= 1) {
  1126. return to;
  1127. }
  1128. var a = t * to + (1 - t) * form;
  1129. return a;
  1130. }
  1131. SetCollider(setNode, CollisionGroup) {
  1132. var numchild = setNode.numChildren;
  1133. for (var i = 0; i < setNode.numChildren; i++) {
  1134. var numchild2 = setNode.getChildAt(i).numChildren;
  1135. if (numchild2 > 1) {
  1136. this.SetCollider(setNode.getChildAt(i), CollisionGroup);
  1137. }
  1138. var physicsCollider = setNode.getChildAt(i).getComponent(Laya.PhysicsCollider);
  1139. if (physicsCollider) {
  1140. physicsCollider.collisionGroup = CollisionGroup;
  1141. }
  1142. }
  1143. }
  1144. static RandomNumber(from, to) {
  1145. if (from >= to) {
  1146. return 0;
  1147. }
  1148. var size = to - from;
  1149. var curNumber = Math.random() * size + from;
  1150. return curNumber;
  1151. }
  1152. static RandomANumber(from, to) {
  1153. if (from >= to) {
  1154. return 0;
  1155. }
  1156. var size = to - from;
  1157. var curNumber = Math.random() * size + from;
  1158. return Math.floor(curNumber);
  1159. }
  1160. static GetMoney(_num, _pos = null, _completeHandle = null) {
  1161. if (_num == 0)
  1162. return;
  1163. var fafaafsfa = new Laya.Box;
  1164. fafaafsfa.width = 400;
  1165. fafaafsfa.height = 100;
  1166. fafaafsfa.pivotX = fafaafsfa.width / 2;
  1167. fafaafsfa.pivotY = fafaafsfa.height / 2;
  1168. if (_pos == null) {
  1169. _pos = new Laya.Vector2(Laya.stage.width / 2, Laya.stage.height / 2);
  1170. }
  1171. fafaafsfa.pos(_pos.x, _pos.y);
  1172. var aafafaffa = new Laya.Image;
  1173. aafafaffa.skin = "game/qiandao_1_7.png";
  1174. aafafaffa.width = 60;
  1175. aafafaffa.height = 60;
  1176. aafafaffa.left = 50;
  1177. aafafaffa.y = 10;
  1178. fafaafsfa.addChild(aafafaffa);
  1179. var faasfafsafs = new Laya.Text;
  1180. faasfafsafs.width = 300;
  1181. faasfafsafs.height = 50;
  1182. faasfafsafs.align = "center";
  1183. faasfafsafs.valign = "middle";
  1184. faasfafsafs.font = "Microsoft YaHei";
  1185. faasfafsafs.fontSize = 40;
  1186. faasfafsafs.color = "#FFFFFF";
  1187. faasfafsafs.bold = true;
  1188. faasfafsafs.font = "Microsoft YaHei";
  1189. faasfafsafs.text = "金币 +" + _num;
  1190. faasfafsafs.x = 60;
  1191. faasfafsafs.y = 10;
  1192. fafaafsfa.addChild(faasfafsafs);
  1193. Laya.stage.addChild(fafaafsfa);
  1194. var faasfsaf = Laya.Tween.to(fafaafsfa, { y: fafaafsfa.y - 200 }, 1500, Laya.Ease.expoInOut, Laya.Handler.create(this, () => {
  1195. faasfsaf.clear();
  1196. fafaafsfa.destroy();
  1197. if (_completeHandle) {
  1198. _completeHandle.run();
  1199. }
  1200. }), 100);
  1201. }
  1202. static TweenText(faafssfafsa, _hight, _completeHandle = null, hide = true, _duration = 500) {
  1203. var afasafsafsfa = new Laya.Text();
  1204. afasafsafsfa.width = faafssfafsa.size.x;
  1205. afasafsafsfa.height = faafssfafsa.size.y;
  1206. afasafsafsfa.align = "center";
  1207. afasafsafsfa.valign = "middle";
  1208. afasafsafsfa.font = "Microsoft YaHei";
  1209. afasafsafsfa.fontSize = faafssfafsa.fontSize;
  1210. afasafsafsfa.pivotX = afasafsafsfa.width / 2;
  1211. afasafsafsfa.pivotY = afasafsafsfa.height / 2;
  1212. afasafsafsfa.color = "#5ad122";
  1213. afasafsafsfa.bold = true;
  1214. afasafsafsfa.stroke = 5;
  1215. afasafsafsfa.strokeColor = "#ffffff";
  1216. if (faafssfafsa.color) {
  1217. faafssfafsa.color = faafssfafsa.color;
  1218. }
  1219. afasafsafsfa.text = faafssfafsa.message;
  1220. afasafsafsfa.zOrder = 1;
  1221. Laya.stage.addChildAt(afasafsafsfa, Laya.stage.numChildren - 1);
  1222. afasafsafsfa.pos(faafssfafsa.pos.x, faafssfafsa.pos.y);
  1223. var tween = Laya.Tween.to(afasafsafsfa, { y: afasafsafsfa.y - _hight, update: new Laya.Handler(this, function () {
  1224. }) }, _duration, Laya.Ease.expoInOut, Laya.Handler.create(this, function () {
  1225. tween.clear();
  1226. if (hide) {
  1227. afasafsafsfa.destroy();
  1228. }
  1229. if (_completeHandle) {
  1230. _completeHandle.run();
  1231. }
  1232. }));
  1233. if (hide) {
  1234. Laya.Tween.to(afasafsafsfa, { alpha: 0.4 }, 500);
  1235. }
  1236. return afasafsafsfa;
  1237. }
  1238. static StationTweenText(faafssfafsa, _hight, _completeHandle = null, hide = true, _duration = 500) {
  1239. var afasafsafsfa = new Laya.Text();
  1240. afasafsafsfa.width = faafssfafsa.size.x;
  1241. afasafsafsfa.height = faafssfafsa.size.y;
  1242. afasafsafsfa.align = "center";
  1243. afasafsafsfa.valign = "middle";
  1244. afasafsafsfa.font = "Microsoft YaHei";
  1245. afasafsafsfa.fontSize = 50;
  1246. afasafsafsfa.pivotX = afasafsafsfa.width / 2;
  1247. afasafsafsfa.pivotY = afasafsafsfa.height / 2;
  1248. afasafsafsfa.color = "#5ad122";
  1249. afasafsafsfa.bold = true;
  1250. afasafsafsfa.stroke = 5;
  1251. afasafsafsfa.strokeColor = "#ffffff";
  1252. if (faafssfafsa.color) {
  1253. faafssfafsa.color = faafssfafsa.color;
  1254. }
  1255. afasafsafsfa.text = faafssfafsa.message;
  1256. afasafsafsfa.zOrder = 1;
  1257. Laya.stage.addChildAt(afasafsafsfa, Laya.stage.numChildren - 1);
  1258. afasafsafsfa.pos(faafssfafsa.pos.x, faafssfafsa.pos.y);
  1259. var tween = Laya.Tween.to(afasafsafsfa, { y: afasafsafsfa.y - _hight, update: new Laya.Handler(this, function () {
  1260. }) }, _duration, Laya.Ease.expoInOut, Laya.Handler.create(this, function () {
  1261. tween.clear();
  1262. if (hide) {
  1263. afasafsafsfa.destroy();
  1264. }
  1265. if (_completeHandle) {
  1266. _completeHandle.run();
  1267. }
  1268. }));
  1269. if (hide) {
  1270. Laya.Tween.to(afasafsafsfa, { alpha: 0.4 }, 10000);
  1271. }
  1272. return afasafsafsfa;
  1273. }
  1274. static tweenMove(transform, targPos, delay, ease, complete) {
  1275. let curPos = transform.position.clone();
  1276. return Laya.Tween.to(curPos, {
  1277. x: targPos.x,
  1278. y: targPos.y,
  1279. z: targPos.z,
  1280. update: new Laya.Handler(this, () => {
  1281. transform.position = curPos.clone();
  1282. })
  1283. }, delay, ease, complete);
  1284. }
  1285. static tweenRotate(transform, targEuler, delay, ease, complete) {
  1286. let curEuler = transform.rotationEuler.clone();
  1287. return Laya.Tween.to(curEuler, {
  1288. x: targEuler.x,
  1289. y: targEuler.y,
  1290. z: targEuler.z,
  1291. update: new Laya.Handler(this, () => {
  1292. transform.rotationEuler = curEuler.clone();
  1293. })
  1294. }, delay, ease, complete);
  1295. }
  1296. }
  1297. var MusicType;
  1298. (function (MusicType) {
  1299. MusicType[MusicType["clear"] = 0] = "clear";
  1300. MusicType[MusicType["down"] = 1] = "down";
  1301. })(MusicType || (MusicType = {}));
  1302. class AudioManager {
  1303. constructor() { }
  1304. static musicres(_type) {
  1305. return "Game/res/Music/" + MusicType[_type] + ".wav";
  1306. }
  1307. static playMusic(_type) {
  1308. if (!this.open)
  1309. return;
  1310. Laya.SoundManager.playSound(this.musicres(_type));
  1311. }
  1312. static StopMusic() {
  1313. Laya.SoundManager.stopMusic();
  1314. }
  1315. }
  1316. AudioManager.open = true;
  1317. class GamePool {
  1318. constructor() {
  1319. this.maxAcount = 30;
  1320. this.modelpool = {};
  1321. GamePool.ins = this;
  1322. }
  1323. static get Instance() {
  1324. if (GamePool.ins) {
  1325. return GamePool.ins;
  1326. }
  1327. else {
  1328. return new GamePool();
  1329. }
  1330. }
  1331. GetModel(title) {
  1332. let poolname = title;
  1333. if (this.modelpool[poolname] != null && this.modelpool[poolname] != undefined) {
  1334. if (this.modelpool[poolname].length > 0) {
  1335. let model1 = this.modelpool[poolname].shift();
  1336. if (!model1.active) {
  1337. model1.active = true;
  1338. }
  1339. return model1;
  1340. }
  1341. else {
  1342. let model = new Laya.Image();
  1343. model.name = title;
  1344. return model;
  1345. }
  1346. }
  1347. else {
  1348. let model = new Laya.Image();
  1349. model.name = title;
  1350. return model;
  1351. }
  1352. }
  1353. RecoverModel(_image, title = "", modelstate = false) {
  1354. if (_image.destroyed) {
  1355. return;
  1356. }
  1357. if (!modelstate && _image.active == false) {
  1358. return;
  1359. }
  1360. let poolname = title;
  1361. if (this.modelpool[poolname] != null && this.modelpool[poolname] != undefined) {
  1362. let modelnum = this.modelpool[poolname];
  1363. this.modelpool[poolname].push(_image);
  1364. }
  1365. else {
  1366. let modelnum = [];
  1367. modelnum.push(_image);
  1368. this.modelpool[poolname] = modelnum;
  1369. }
  1370. _image.removeSelf();
  1371. _image.active = false;
  1372. }
  1373. }
  1374. class Gift extends Laya.Script {
  1375. constructor() {
  1376. super();
  1377. this.type = 0;
  1378. this.GiftIndex = 0;
  1379. this.GiftNum = 0;
  1380. this.time = 9;
  1381. this.count = false;
  1382. this.fuhuo = false;
  1383. Gift.ins = this;
  1384. }
  1385. static get Instance() {
  1386. if (Gift.ins) {
  1387. return Gift.ins;
  1388. }
  1389. else {
  1390. return new Gift();
  1391. }
  1392. }
  1393. onAwake() {
  1394. let countdown = this.owner.getChildByName("CountDown");
  1395. if (countdown) {
  1396. Laya.timer.loop(1000, this, this.CountTime);
  1397. }
  1398. this.owner.on(Laya.Event.CLICK, this, this.ClickBox);
  1399. }
  1400. onUpdate() {
  1401. }
  1402. onEnable() {
  1403. }
  1404. CountTime() {
  1405. let countdown = this.owner.getChildByName("CountDown");
  1406. let _rig = this.owner.getComponent(Laya.RigidBody);
  1407. let _collider = this.owner.getComponent(Laya.ChainCollider);
  1408. let owner = this.owner;
  1409. if (this.count && this.time > 0) {
  1410. this.time -= 1;
  1411. countdown.text = this.time.toString();
  1412. if (this.time < 1) {
  1413. Laya.timer.clear(this, this.CountTime);
  1414. this.owner.removeSelf();
  1415. let name = this.type == 0 ? "Gift" : "GiftTime";
  1416. GamePool.Instance.RecoverModel(owner, name);
  1417. }
  1418. }
  1419. }
  1420. ClickBox() {
  1421. let owner = this.owner;
  1422. let countdown = this.owner.getChildByName("CountDown");
  1423. if (countdown) {
  1424. Laya.timer.clear(this, this.CountTime);
  1425. }
  1426. let array = [];
  1427. array.push(this.GiftIndex);
  1428. array.push(this.GiftNum);
  1429. ViewManager.Instance.OpenPopView(ViewType.GetRewardView, array);
  1430. let _rig = this.owner.getComponent(Laya.RigidBody);
  1431. let _collider = this.owner.getComponent(Laya.ChainCollider);
  1432. this.owner.removeSelf();
  1433. let name = this.type == 0 ? "Gift" : "GiftTime";
  1434. GamePool.Instance.RecoverModel(owner, name);
  1435. }
  1436. }
  1437. class DropRule {
  1438. constructor() {
  1439. this.GiftName = new Array("Gift", "TimeGift");
  1440. this.GiftArray = [];
  1441. this.EffectName = new Array("blue", "yellow", "purple", "green");
  1442. this.EffectArray = [];
  1443. this.PrefabName = new Array("2", "4", "8", "16", "32", "64", "128", "256", "512", "1024", "2048", "4096", "8192", "16384", "32768", "65536", "131072", "262144");
  1444. this.Cloned = false;
  1445. DropRule.ins = this;
  1446. this.Init();
  1447. this.InitEffect();
  1448. this.InitGift();
  1449. EventManager.StageOn(StageMode.Refresh, this, this.Init);
  1450. EventManager.StageOn(StageMode.ReStart, this, this.Pass);
  1451. }
  1452. static get Instance() {
  1453. if (DropRule.ins) {
  1454. return DropRule.ins;
  1455. }
  1456. else {
  1457. return new DropRule();
  1458. }
  1459. }
  1460. Init(_data) {
  1461. this.STAGE = Number(AccountManager.Instance.curplayerData.GainAccount("stage"));
  1462. let level = AccountManager.Instance.curplayerData.GainCollocation("level");
  1463. if (_data) {
  1464. for (var key in level) {
  1465. if (level[key].id == this.STAGE) {
  1466. let Level = level[Number(key)];
  1467. this.DropHeight = Number(Level.hight);
  1468. this.GoalScore = Number(Level.goal);
  1469. this.BallNum = Level.edge.split(";");
  1470. this.StartNum = Number(Level.start_number);
  1471. this.DropNum = Level.drop_number.split(";");
  1472. let min = Number(this.BallNum[0]);
  1473. let minnext = Number(this.BallNum[1]);
  1474. this.MinBall = Number(this.PrefabName[min - 1]);
  1475. this.MinNextBall = Number(this.PrefabName[minnext - 1]);
  1476. }
  1477. }
  1478. }
  1479. else {
  1480. for (var key in level) {
  1481. if (level[key].id == this.STAGE) {
  1482. let Level = level[Number(key)];
  1483. this.DropHeight = Number(Level.hight);
  1484. this.GoalScore = Number(Level.goal);
  1485. this.SizeIndex = Level.index.split(";");
  1486. this.BallNum = Level.edge.split(";");
  1487. this.StartNum = Number(Level.start_number);
  1488. this.DropNum = Level.drop_number.split(";");
  1489. this.EdgeIndex = Level.edgeindex.split(";");
  1490. let min = Number(this.BallNum[0]);
  1491. let minnext = Number(this.BallNum[this.BallNum.length - 1]);
  1492. this.MinBall = Number(this.PrefabName[min - 1]);
  1493. this.MinNextBall = Number(this.PrefabName[minnext - 1]);
  1494. }
  1495. }
  1496. }
  1497. this.Read();
  1498. }
  1499. InitEffect() {
  1500. for (let i = 0; i < this.EffectName.length; i++) {
  1501. this.EffectReadJson(i);
  1502. }
  1503. }
  1504. EffectReadJson(i) {
  1505. Laya.loader.create("Effect/" + this.EffectName[i] + ".json", Laya.Handler.create(this, this.EffectCreat));
  1506. }
  1507. EffectCreat(Prefab) {
  1508. let obj = new Laya.Prefab();
  1509. obj.json = Prefab;
  1510. this.EffectArray.push(obj);
  1511. }
  1512. InitGift() {
  1513. for (let i = 0; i < this.GiftName.length; i++) {
  1514. this.GiftReadJson(i);
  1515. }
  1516. }
  1517. GiftReadJson(i) {
  1518. Laya.loader.create("GiftPrefab/" + this.GiftName[i] + ".json", Laya.Handler.create(this, this.GiftCreat));
  1519. }
  1520. GiftCreat(Prefab) {
  1521. let obj = new Laya.Prefab();
  1522. obj.json = Prefab;
  1523. this.GiftArray.push(obj);
  1524. }
  1525. CreateEffect(_score, _pos) {
  1526. let effect;
  1527. let index;
  1528. if (_score == 2 || _score == 16 || _score == 256 || _score == 2048 || _score == 32768 || _score == 262144) {
  1529. effect = this.EffectArray[3];
  1530. index = 3;
  1531. }
  1532. else if (_score == 8 || _score == 32 || _score == 4096 || _score == 131072) {
  1533. effect = this.EffectArray[1];
  1534. index = 1;
  1535. }
  1536. else if (_score == 64 || _score == 512 || _score == 16384) {
  1537. effect = this.EffectArray[2];
  1538. index = 2;
  1539. }
  1540. else if (_score == 4 || _score == 128 || _score == 1024 || _score == 8192 || _score == 65536) {
  1541. effect = this.EffectArray[0];
  1542. index = 0;
  1543. }
  1544. let pre = Laya.Pool.getItemByCreateFun(this.EffectName[index], effect.create, effect);
  1545. pre.pos(_pos.x, _pos.y);
  1546. Laya.stage.addChild(pre);
  1547. pre.on(Laya.Event.COMPLETE, this, () => {
  1548. pre.removeSelf();
  1549. pre.destroy();
  1550. });
  1551. }
  1552. Pass(_data) {
  1553. if (_data) {
  1554. if (this.STAGE >= 2 && this.STAGE <= 6) {
  1555. let X = GameTools.RandomANumber(100, 500);
  1556. let pos = new Laya.Vector2(X, 0);
  1557. switch (this.STAGE) {
  1558. case 2:
  1559. this.CreateGift(0, pos, 5, 2);
  1560. break;
  1561. case 3:
  1562. this.CreateGift(0, pos, 4, 2);
  1563. break;
  1564. case 4:
  1565. this.CreateGift(0, pos, 3, 2);
  1566. break;
  1567. case 5:
  1568. this.CreateGift(0, pos, 2, 2);
  1569. break;
  1570. case 6:
  1571. this.CreateGift(0, pos, 1, 2);
  1572. break;
  1573. }
  1574. }
  1575. if (this.STAGE >= 9) {
  1576. for (let i = 0; i < Laya.stage.numChildren; i++) {
  1577. if (Laya.stage.getChildAt(i).name == "Gift") {
  1578. return;
  1579. }
  1580. else {
  1581. let X = GameTools.RandomANumber(100, 500);
  1582. let pos = new Laya.Vector2(X, 0);
  1583. this.CreateGift(0, pos, this.JudgePropNum(), 1);
  1584. }
  1585. }
  1586. }
  1587. }
  1588. }
  1589. JudgePropNum() {
  1590. let proparray = [];
  1591. let one = { "key": "1", "value": AccountManager.Instance.curplayerData.GetPropNum(1) };
  1592. let two = { "key": "2", "value": AccountManager.Instance.curplayerData.GetPropNum(2) };
  1593. let three = { "key": "3", "value": AccountManager.Instance.curplayerData.GetPropNum(3) };
  1594. let four = { "key": "4", "value": AccountManager.Instance.curplayerData.GetPropNum(4) };
  1595. let five = { "key": "5", "value": AccountManager.Instance.curplayerData.GetPropNum(5) };
  1596. proparray.push(one);
  1597. proparray.push(two);
  1598. proparray.push(three);
  1599. proparray.push(four);
  1600. proparray.push(five);
  1601. for (let i = 0; i < proparray.length; i++) {
  1602. for (let j = 0; j < proparray.length - i - 1; j++) {
  1603. if (proparray[j].value < proparray[j + 1].value) {
  1604. let temp = proparray[j].value;
  1605. proparray[j].value = proparray[j + 1].value;
  1606. proparray[j + 1].value = temp;
  1607. }
  1608. }
  1609. }
  1610. return proparray[0].value;
  1611. }
  1612. CreateGift(index, _pos, giftindex, giftnum) {
  1613. let giftname = index == 0 ? "Gift" : "TimeGift";
  1614. let pre = GamePool.Instance.GetModel(giftname);
  1615. pre.skin = "Game/res/Skin/" + giftname + ".png";
  1616. pre.anchorX = 0.5;
  1617. pre.anchorY = 0.5;
  1618. pre.height = AccountManager.Instance.curplayerData.GiftSize;
  1619. pre.width = AccountManager.Instance.curplayerData.GiftSize;
  1620. pre.name = giftname;
  1621. let _rig = pre.getComponent(Laya.RigidBody);
  1622. if (!_rig) {
  1623. let rig = pre.addComponent(Laya.RigidBody);
  1624. rig.gravityScale = 3;
  1625. }
  1626. else {
  1627. pre.getComponent(Laya.RigidBody).enabled = true;
  1628. }
  1629. let _collider = pre.getComponent(Laya.CircleCollider);
  1630. if (!_collider) {
  1631. let collider = pre.addComponent(Laya.CircleCollider);
  1632. collider.radius = AccountManager.Instance.curplayerData.GiftSize / 2;
  1633. collider.restitution = AccountManager.Instance.curplayerData.Restitution;
  1634. }
  1635. else {
  1636. pre.getComponent(Laya.CircleCollider).enabled = true;
  1637. }
  1638. if (index == 1) {
  1639. let kuang = new Laya.Image();
  1640. kuang.skin = "Game/res/Skin/kuang.png";
  1641. kuang.anchorX = 0.5;
  1642. kuang.anchorY = 0.5;
  1643. pre.addChild(kuang);
  1644. kuang.centerX = 0;
  1645. kuang.centerY = 0;
  1646. let countdown = new Laya.Text();
  1647. countdown.width = 33;
  1648. countdown.height = 24;
  1649. countdown.color = "#ffffff";
  1650. countdown.align = "center";
  1651. countdown.valign = "middle";
  1652. countdown.fontSize = 20;
  1653. pre.addChild(countdown);
  1654. countdown.x = pre.x;
  1655. countdown.y = pre.y;
  1656. }
  1657. let script = pre.getComponent(Gift);
  1658. if (!script) {
  1659. let giftscript = pre.addComponent(Gift);
  1660. giftscript.GiftIndex = giftindex;
  1661. giftscript.GiftNum = giftnum;
  1662. giftscript.type = index;
  1663. }
  1664. pre.pos(_pos.x, _pos.y);
  1665. Laya.stage.addChild(pre);
  1666. }
  1667. GetBallIndex(_score) {
  1668. let num;
  1669. for (let i = 0; i < this.PrefabName.length; i++) {
  1670. if (_score == Number(this.PrefabName[i])) {
  1671. num = i;
  1672. }
  1673. else if (_score > Number(this.PrefabName[i]) && _score < Number(this.PrefabName[i + 1])) {
  1674. num = i;
  1675. }
  1676. }
  1677. return num;
  1678. }
  1679. GetScore(_score) {
  1680. let num;
  1681. for (let i = 0; i < this.PrefabName.length; i++) {
  1682. if (_score == Number(this.PrefabName[i])) {
  1683. num = Number(this.PrefabName[i]);
  1684. }
  1685. else if (_score > Number(this.PrefabName[i]) && _score < Number(this.PrefabName[i + 1])) {
  1686. num = Number(this.PrefabName[i]);
  1687. }
  1688. }
  1689. return num;
  1690. }
  1691. GetBallSize(_score) {
  1692. let num;
  1693. let index;
  1694. let size = 0;
  1695. for (let i = 0; i < this.PrefabName.length; i++) {
  1696. if (_score == Number(this.PrefabName[i])) {
  1697. num = i;
  1698. }
  1699. else if (_score > Number(this.PrefabName[i]) && _score < Number(this.PrefabName[i + 1])) {
  1700. num = i;
  1701. }
  1702. }
  1703. for (let j = 0; j < this.EdgeIndex.length; j++) {
  1704. if (num + 1 == Number(this.EdgeIndex[j])) {
  1705. index = Number(this.SizeIndex[j]);
  1706. size = this.Size(num + 1, index);
  1707. }
  1708. }
  1709. if (size == 0) {
  1710. let cimi = Number(this.EdgeIndex[this.EdgeIndex.length - 1]);
  1711. index = Number(this.SizeIndex[this.EdgeIndex.length - 1]);
  1712. size = this.Size(cimi, index);
  1713. let n = (num + 1) - cimi;
  1714. size = size + (n * 5);
  1715. }
  1716. return size;
  1717. }
  1718. Size(_index, sizelevel) {
  1719. let ballsize;
  1720. let ball = AccountManager.Instance.curplayerData.GainCollocation("ball");
  1721. for (var key in ball) {
  1722. let item = ball[key];
  1723. if (_index == item.ball && sizelevel == item.size_level) {
  1724. ballsize = Number(item.size);
  1725. }
  1726. }
  1727. return ballsize;
  1728. }
  1729. CreatBall(_index, size, pos) {
  1730. let ball = GamePool.Instance.GetModel("img" + _index.toString());
  1731. ball.skin = "Game/res/Ball/blast" + _index + ".png";
  1732. ball.anchorX = 0.5;
  1733. ball.anchorY = 0.5;
  1734. ball.height = size;
  1735. ball.width = size;
  1736. ball.name = "ball";
  1737. let _rig = ball.getComponent(Laya.RigidBody);
  1738. if (!_rig) {
  1739. let rig = ball.addComponent(Laya.RigidBody);
  1740. rig.allowRotation = true;
  1741. rig.gravityScale = 3;
  1742. }
  1743. else {
  1744. _rig.enabled = true;
  1745. }
  1746. let _collider = ball.getComponent(Laya.CircleCollider);
  1747. if (!_collider) {
  1748. let collider = ball.addComponent(Laya.CircleCollider);
  1749. collider.restitution = AccountManager.Instance.curplayerData.Restitution;
  1750. if (this.STAGE == 1 && GameManager.Instance.Wave < 3) {
  1751. collider.restitution = 0;
  1752. }
  1753. collider.radius = size / 2;
  1754. }
  1755. else {
  1756. _collider.enabled = true;
  1757. _collider.isSensor = false;
  1758. }
  1759. let _num = ball.getChildByName("num");
  1760. let zi;
  1761. if (!_num) {
  1762. let num = new Laya.FontClip();
  1763. num.name = "num";
  1764. num.skin = "Game/res/Ball/44.png";
  1765. num.anchorX = 0.5;
  1766. num.anchorY = 0.5;
  1767. num.sheet = "0123456789";
  1768. zi = this.PrefabName[_index];
  1769. num.value = zi;
  1770. ball.addChild(num);
  1771. num.centerX = 0;
  1772. num.centerY = 0;
  1773. }
  1774. let _light = ball.getChildByName("light");
  1775. if (!_light) {
  1776. let light = new Laya.Image();
  1777. light.skin = "Game/res/Ball/" + zi + ".png";
  1778. light.anchorX = 0.5;
  1779. light.anchorY = 0.5;
  1780. light.width = this.LightSize(size);
  1781. light.height = this.LightSize(size);
  1782. light.name = "light";
  1783. ball.addChild(light);
  1784. light.centerX = 0;
  1785. light.centerY = 0;
  1786. }
  1787. else {
  1788. _light.anchorX = 0.5;
  1789. _light.anchorY = 0.5;
  1790. _light.width = this.LightSize(size);
  1791. _light.height = this.LightSize(size);
  1792. _light.centerX = 0;
  1793. _light.centerY = 0;
  1794. }
  1795. let _script = ball.getComponent(Ball);
  1796. if (!_script) {
  1797. let script = ball.addComponent(Ball);
  1798. }
  1799. ball.pos(pos.x, pos.y);
  1800. Laya.timer.once(1, this, () => {
  1801. EventManager.StageTrigger(StageMode.Clone, [ball]);
  1802. });
  1803. this.Cloned = true;
  1804. AudioManager.playMusic(MusicType.down);
  1805. }
  1806. CreatBall2(_index, size, pos) {
  1807. let ball = GamePool.Instance.GetModel("img" + _index.toString());
  1808. ball.skin = "Game/res/Ball/blast" + _index + ".png";
  1809. ball.anchorX = 0.5;
  1810. ball.anchorY = 0.5;
  1811. ball.height = size;
  1812. ball.width = size;
  1813. ball.name = "ball";
  1814. let _collider = ball.getComponent(Laya.CircleCollider);
  1815. if (!_collider) {
  1816. let collider = ball.addComponent(Laya.CircleCollider);
  1817. collider.restitution = AccountManager.Instance.curplayerData.Restitution;
  1818. if (this.STAGE == 1 && GameManager.Instance.Wave < 3) {
  1819. collider.restitution = 0;
  1820. }
  1821. collider.radius = size / 2;
  1822. }
  1823. else {
  1824. ball.getComponent(Laya.CircleCollider).enabled = true;
  1825. ball.getComponent(Laya.CircleCollider).isSensor = true;
  1826. }
  1827. let _rig = ball.getComponent(Laya.RigidBody);
  1828. if (!_rig) {
  1829. let rig = ball.addComponent(Laya.RigidBody);
  1830. rig.allowRotation = true;
  1831. rig.gravityScale = 3;
  1832. }
  1833. else {
  1834. ball.getComponent(Laya.RigidBody).enabled = true;
  1835. }
  1836. let _num = ball.getChildByName("num");
  1837. let zi;
  1838. if (!_num) {
  1839. let num = new Laya.FontClip();
  1840. num.name = "num";
  1841. num.skin = "Game/res/Ball/44.png";
  1842. num.anchorX = 0.5;
  1843. num.anchorY = 0.5;
  1844. num.sheet = "0123456789";
  1845. zi = this.PrefabName[_index];
  1846. num.value = zi;
  1847. ball.addChild(num);
  1848. num.centerX = 0;
  1849. num.centerY = 0;
  1850. }
  1851. let _light = ball.getChildByName("light");
  1852. if (!_light) {
  1853. let light = new Laya.Image();
  1854. light.skin = "Game/res/Ball/" + zi + ".png";
  1855. light.anchorX = 0.5;
  1856. light.anchorY = 0.5;
  1857. light.width = this.LightSize(size);
  1858. light.height = this.LightSize(size);
  1859. light.name = "light";
  1860. ball.addChild(light);
  1861. light.centerX = 0;
  1862. light.centerY = 0;
  1863. }
  1864. else {
  1865. _light.anchorX = 0.5;
  1866. _light.anchorY = 0.5;
  1867. _light.width = this.LightSize(size);
  1868. _light.height = this.LightSize(size);
  1869. _light.centerX = 0;
  1870. _light.centerY = 0;
  1871. }
  1872. let _script = ball.getComponent(Ball);
  1873. if (!_script) {
  1874. let script = ball.addComponent(Ball);
  1875. }
  1876. ball.pos(pos.x, pos.y);
  1877. Laya.timer.once(1, this, () => {
  1878. EventManager.StageTrigger(StageMode.Clone, [ball]);
  1879. });
  1880. AudioManager.playMusic(MusicType.down);
  1881. }
  1882. SetPosition(_node, _pos) {
  1883. _node.pos(_pos.x, _pos.y);
  1884. }
  1885. LightSize(_size) {
  1886. let num;
  1887. switch (_size) {
  1888. case 65:
  1889. num = 79;
  1890. break;
  1891. case 70:
  1892. num = 87;
  1893. break;
  1894. case 75:
  1895. num = 95;
  1896. break;
  1897. case 80:
  1898. num = 100;
  1899. break;
  1900. case 85:
  1901. num = 105;
  1902. break;
  1903. case 90:
  1904. num = 110;
  1905. break;
  1906. case 95:
  1907. num = 117;
  1908. break;
  1909. case 100:
  1910. num = 124;
  1911. break;
  1912. case 105:
  1913. num = 130;
  1914. break;
  1915. case 110:
  1916. num = 136;
  1917. break;
  1918. case 115:
  1919. num = 143;
  1920. break;
  1921. case 120:
  1922. num = 150;
  1923. break;
  1924. case 125:
  1925. num = 152;
  1926. break;
  1927. case 130:
  1928. num = 160;
  1929. break;
  1930. case 135:
  1931. num = 165;
  1932. break;
  1933. case 140:
  1934. num = 174;
  1935. break;
  1936. case 145:
  1937. num = 181;
  1938. break;
  1939. case 150:
  1940. num = 186;
  1941. break;
  1942. case 155:
  1943. num = 192;
  1944. break;
  1945. case 160:
  1946. num = 199;
  1947. break;
  1948. case 165:
  1949. num = 202;
  1950. break;
  1951. case 170:
  1952. num = 210;
  1953. break;
  1954. case 175:
  1955. num = 215;
  1956. break;
  1957. case 180:
  1958. num = 223;
  1959. break;
  1960. case 185:
  1961. num = 231;
  1962. break;
  1963. case 190:
  1964. num = 236;
  1965. break;
  1966. case 195:
  1967. num = 241;
  1968. break;
  1969. case 200:
  1970. num = 247;
  1971. break;
  1972. case 205:
  1973. num = 253;
  1974. break;
  1975. case 210:
  1976. num = 260;
  1977. break;
  1978. case 215:
  1979. num = 268;
  1980. break;
  1981. case 220:
  1982. num = 275;
  1983. break;
  1984. case 225:
  1985. num = 280;
  1986. break;
  1987. case 230:
  1988. num = 287;
  1989. break;
  1990. }
  1991. return num;
  1992. }
  1993. FallDown(_time) {
  1994. if (!_time) {
  1995. let mindrop = Number(this.DropNum[0]);
  1996. let maxdrop = Number(this.DropNum[1]);
  1997. _time = GameTools.RandomANumber(mindrop, maxdrop + 1);
  1998. }
  1999. let min = Number(this.BallNum[0]);
  2000. let max = Number(this.BallNum[this.BallNum.length - 1]);
  2001. let index;
  2002. let size;
  2003. for (let j = 0; j < _time; j++) {
  2004. let num = GameTools.RandomANumber(min, max + 1);
  2005. for (let i = 0; i < this.BallNum.length; i++) {
  2006. if (num == Number(this.BallNum[i])) {
  2007. index = Number(this.SizeIndex[i]);
  2008. size = this.Size(num, index);
  2009. }
  2010. }
  2011. let X = GameTools.RandomANumber(100, 500);
  2012. let pos = new Laya.Vector2(X, 30);
  2013. this.CreatBall2(num - 1, size, pos);
  2014. }
  2015. }
  2016. GuideFallDown() {
  2017. GameManager.Instance.CheckHeight = false;
  2018. let num;
  2019. let shuliang;
  2020. if (GameManager.Instance.Wave == 1) {
  2021. shuliang = 2;
  2022. num = 1;
  2023. }
  2024. else if (GameManager.Instance.Wave == 2) {
  2025. shuliang = 2;
  2026. num = 2;
  2027. }
  2028. else if (GameManager.Instance.Wave == 3) {
  2029. shuliang = 6;
  2030. num = 1;
  2031. }
  2032. else if (GameManager.Instance.Wave == 4) {
  2033. shuliang = 12;
  2034. num = 1;
  2035. }
  2036. else if (GameManager.Instance.Wave == 5) {
  2037. shuliang = 6;
  2038. num = 2;
  2039. }
  2040. else if (GameManager.Instance.Wave == 6) {
  2041. shuliang = 12;
  2042. num = 2;
  2043. }
  2044. else {
  2045. GameManager.Instance.CheckHeight = true;
  2046. this.DropHeight = AccountManager.Instance.curplayerData.GuideHeight;
  2047. let mindrop = Number(this.DropNum[0]);
  2048. let maxdrop = Number(this.DropNum[1]);
  2049. num = GameTools.RandomANumber(mindrop, maxdrop + 1);
  2050. }
  2051. let score = Number(this.PrefabName[num - 1]);
  2052. let index = this.GetBallIndex(score);
  2053. let size = this.GetBallSize(score);
  2054. for (let j = 0; j < shuliang; j++) {
  2055. let X = GameTools.RandomANumber(100, 500);
  2056. let pos = new Laya.Vector2(X, 30);
  2057. this.CreatBall2(num - 1, size, pos);
  2058. }
  2059. }
  2060. RecoverScene() {
  2061. for (let i = 0; i < this.progress.length - 3; i++) {
  2062. let item = this.progress[i];
  2063. if (item.itemtype == 0) {
  2064. this.CreatBall2(Number(item.index) - 1, Number(item.size), new Laya.Vector2(Number(item.pos.x), Number(item.pos.y)));
  2065. }
  2066. else if (item.itemtype == 1) {
  2067. this.CreateGift(item.type, new Laya.Vector2(Number(item.pos.x), Number(item.pos.y)), Number(item.proptype), Number(item.giftnum));
  2068. }
  2069. }
  2070. }
  2071. Read() {
  2072. if (this.STAGE > 1) {
  2073. let args = [{ "stage": "0" }];
  2074. ServerManager.Instance.SendHttp(BlastToMerge.GetProgress, args, Laya.Handler.create(this, (res) => {
  2075. let json = JSON.parse(res.user_game.detail);
  2076. this.progress = json;
  2077. if (this.progress.length > 1) {
  2078. let items = this.progress[this.progress.length - 2];
  2079. let _score = Number(items.jindu);
  2080. GameManager.Instance.ScoreProgress = _score;
  2081. this.SizeIndex = this.progress[this.progress.length - 1].sizeindex;
  2082. this.EdgeIndex = this.progress[this.progress.length - 3].edgeindex;
  2083. }
  2084. console.log("获取进度成功");
  2085. }), Laya.Handler.create(this, () => {
  2086. console.log("获取进度失败");
  2087. }));
  2088. }
  2089. }
  2090. }
  2091. var Vector2 = Laya.Vector2;
  2092. class Ball extends Laya.Script {
  2093. constructor() {
  2094. super();
  2095. this.moved = false;
  2096. this.mark = false;
  2097. this.clear = false;
  2098. this.score = 0;
  2099. Ball.ins = this;
  2100. }
  2101. static get Instance() {
  2102. if (Ball.ins) {
  2103. return Ball.ins;
  2104. }
  2105. else {
  2106. return new Ball();
  2107. }
  2108. }
  2109. onAwake() {
  2110. this.Light = this.owner.getChildByName("light");
  2111. this.Light.visible = false;
  2112. this.owner.on(Laya.Event.CLICK, this, this.ClickBall);
  2113. EventManager.EventOn(PropEffecf.DOUBLE, this, this.ClickDouble);
  2114. EventManager.EventOn(PropEffecf.NONE, this, this.ClickNone);
  2115. EventManager.EventOn(PropEffecf.HAMMER, this, this.ClickHammer);
  2116. let score = this.owner.getChildByName("num");
  2117. this.score = Number(score.value);
  2118. }
  2119. onEnable() {
  2120. this.moved = false;
  2121. this.mark = false;
  2122. this.clear = false;
  2123. this.owner.on(Laya.Event.CLICK, this, this.ClickBall);
  2124. EventManager.EventOn(PropEffecf.DOUBLE, this, this.ClickDouble);
  2125. EventManager.EventOn(PropEffecf.NONE, this, this.ClickNone);
  2126. EventManager.EventOn(PropEffecf.HAMMER, this, this.ClickHammer);
  2127. let score = this.owner.getChildByName("num");
  2128. this.score = Number(score.value);
  2129. }
  2130. onUpdate() {
  2131. this.CheckLight();
  2132. if (this.mark) {
  2133. if (!this.moved) {
  2134. let owner = this.owner;
  2135. let _rig = this.owner.getComponent(Laya.RigidBody);
  2136. let _collider = this.owner.getComponent(Laya.CircleCollider);
  2137. _collider.isSensor = true;
  2138. _collider.enabled = false;
  2139. _rig.enabled = false;
  2140. _collider.destroy();
  2141. _rig.destroy();
  2142. this.Move(GameManager.Instance.TargetPosition);
  2143. this.moved = true;
  2144. }
  2145. }
  2146. }
  2147. CheckLight() {
  2148. let light = false;
  2149. let _node = this.owner;
  2150. for (let i = 0; i < InGameView.Instance.prefabbox.numChildren; i++) {
  2151. let other = InGameView.Instance.prefabbox.getChildAt(i);
  2152. let ball = other.getComponent(Ball);
  2153. if (other.x == _node.x && other.y == _node.y) {
  2154. continue;
  2155. }
  2156. let distan = Laya.Vector3.distance(new Laya.Vector3(other.x, other.y, 0), new Laya.Vector3(_node.x, _node.y, 0));
  2157. let dis = _node.width / 2 + other.width / 2;
  2158. if (Math.abs(distan - dis) <= AccountManager.Instance.curplayerData.Distance || Math.abs(distan - dis) <= AccountManager.Instance.curplayerData.Distance || distan < dis) {
  2159. if (ball.score == this.score) {
  2160. light = true;
  2161. }
  2162. }
  2163. }
  2164. if (light) {
  2165. this.Light.visible = true;
  2166. }
  2167. else {
  2168. this.Light.visible = false;
  2169. }
  2170. }
  2171. ClickNone() {
  2172. this.owner.off(Laya.Event.CLICK, this, this.Hammer);
  2173. this.owner.off(Laya.Event.CLICK, this, this.Double);
  2174. this.owner.on(Laya.Event.CLICK, this, this.ClickBall);
  2175. }
  2176. ClickDouble() {
  2177. this.owner.off(Laya.Event.CLICK, this, this.ClickBall);
  2178. this.owner.off(Laya.Event.CLICK, this, this.Hammer);
  2179. this.owner.on(Laya.Event.CLICK, this, this.Double);
  2180. }
  2181. Double() {
  2182. var args = [{ "t": AccountManager.Instance.ServerTime.toString() }, { "play_id": GameManager.Instance.play_id }, { "fid": "1" }];
  2183. ServerManager.Instance.SendHttp(BlastToMerge.Use, args, Laya.Handler.create(this, () => {
  2184. let num = this.score * 2;
  2185. let owner = this.owner;
  2186. let _position = new Laya.Vector2(owner.x, owner.y);
  2187. let _rig = this.owner.getComponent(Laya.RigidBody);
  2188. let _collider = this.owner.getComponent(Laya.CircleCollider);
  2189. _collider.enabled = false;
  2190. _rig.enabled = false;
  2191. _collider.destroy();
  2192. _rig.destroy();
  2193. this.owner.removeSelf();
  2194. let _index = DropRule.Instance.GetBallIndex(this.score).toString();
  2195. GamePool.Instance.RecoverModel(owner, "img" + _index);
  2196. let id = DropRule.Instance.GetBallIndex(num);
  2197. let size = DropRule.Instance.GetBallSize(num);
  2198. GameManager.Instance.ScoreProgress += num;
  2199. DropRule.Instance.CreatBall(id, size, _position);
  2200. InGameView.Instance.SkillNumRefresh();
  2201. EventManager.EventTrigger(PropEffecf.NONE);
  2202. }), Laya.Handler.create(this, () => {
  2203. console.log("道具使用失败");
  2204. }));
  2205. }
  2206. ClickHammer() {
  2207. this.owner.off(Laya.Event.CLICK, this, this.ClickBall);
  2208. this.owner.off(Laya.Event.CLICK, this, this.Double);
  2209. this.owner.on(Laya.Event.CLICK, this, this.Hammer);
  2210. }
  2211. Hammer() {
  2212. var args = [{ "t": AccountManager.Instance.ServerTime.toString() }, { "play_id": GameManager.Instance.play_id }, { "fid": "4" }];
  2213. ServerManager.Instance.SendHttp(BlastToMerge.Use, args, Laya.Handler.create(this, () => {
  2214. let num = this.score;
  2215. let owner = this.owner;
  2216. GameManager.Instance.ScoreProgress += num;
  2217. let _rig = this.owner.getComponent(Laya.RigidBody);
  2218. let _collider = this.owner.getComponent(Laya.CircleCollider);
  2219. _collider.enabled = false;
  2220. _rig.enabled = false;
  2221. _collider.destroy();
  2222. _rig.destroy();
  2223. owner.removeSelf();
  2224. let _index = DropRule.Instance.GetBallIndex(this.score).toString();
  2225. GamePool.Instance.RecoverModel(owner, "img" + _index);
  2226. InGameView.Instance.SkillNumRefresh();
  2227. EventManager.EventTrigger(PropEffecf.NONE);
  2228. InGameView.Instance.EffectMode(false);
  2229. }), Laya.Handler.create(this, () => {
  2230. console.log("道具使用失败");
  2231. }));
  2232. }
  2233. onDestroy() {
  2234. this.owner.offAll();
  2235. EventManager.EventOff(PropEffecf.DOUBLE, this, this.ClickDouble);
  2236. EventManager.EventOff(PropEffecf.NONE, this, this.ClickNone);
  2237. EventManager.EventOff(PropEffecf.HAMMER, this, this.ClickHammer);
  2238. }
  2239. onTriggerEnter(other) {
  2240. let targetparent = other.owner;
  2241. if (DropRule.Instance.STAGE == 1 && GameManager.Instance.Wave < 3) {
  2242. if (targetparent.name == "BottomCollider" && this.Light.visible == true) {
  2243. if (!InGameView.Instance.guide.isPlaying && !GameManager.Instance.played) {
  2244. InGameView.Instance.guide.play(null, false);
  2245. GameManager.Instance.played = true;
  2246. }
  2247. InGameView.Instance.Guide.visible = true;
  2248. }
  2249. }
  2250. }
  2251. Move(_position) {
  2252. if (!this.moved) {
  2253. let owner = this.owner;
  2254. GameManager.Instance.EliminateNum += 1;
  2255. let ball = owner.getComponent(Ball);
  2256. let ownerscore = ball.score;
  2257. GameManager.Instance.ScoreRecord += ownerscore;
  2258. GameManager.Instance.ScoreRecord2 = GameManager.Instance.ScoreRecord;
  2259. let move = Laya.Tween.to(this.owner, {
  2260. x: _position.x, y: _position.y, update: new Laya.Handler(this, function () {
  2261. })
  2262. }, AccountManager.Instance.curplayerData.MergeSpeed * 1000, Laya.Ease.linearInOut, Laya.Handler.create(this, () => {
  2263. move.clear();
  2264. this.owner.removeSelf();
  2265. let _index = DropRule.Instance.GetBallIndex(this.score).toString();
  2266. GamePool.Instance.RecoverModel(owner, "img" + _index);
  2267. if (!DropRule.Instance.Cloned) {
  2268. let num = DropRule.Instance.GetBallIndex(GameManager.Instance.ScoreRecord2);
  2269. let size = DropRule.Instance.GetBallSize(GameManager.Instance.ScoreRecord2);
  2270. let score = DropRule.Instance.GetScore(GameManager.Instance.ScoreRecord2);
  2271. let ball = DropRule.Instance.CreatBall(num, size, GameManager.Instance.TargetPosition);
  2272. GameManager.Instance.ScoreProgress += score;
  2273. if (GameManager.Instance.EliminateNum >= AccountManager.Instance.curplayerData.ShakeNum) {
  2274. WXSDK.Shake();
  2275. }
  2276. if (DropRule.Instance.STAGE > 1 && !InGameView.Instance.OverRun) {
  2277. DropRule.Instance.FallDown();
  2278. }
  2279. GameManager.Instance.EliminateNum = 0;
  2280. GameManager.Instance.ScoreRecord = 0;
  2281. GameManager.Instance.played = false;
  2282. GameManager.Instance.Wave += 1;
  2283. AudioManager.playMusic(MusicType.clear);
  2284. if (DropRule.Instance.STAGE == 1) {
  2285. if (InGameView.Instance.Guide.visible == true) {
  2286. InGameView.Instance.Guide.visible = false;
  2287. }
  2288. DropRule.Instance.GuideFallDown();
  2289. }
  2290. EventManager.StageTrigger(StageMode.Check);
  2291. }
  2292. }));
  2293. }
  2294. }
  2295. ClickBall() {
  2296. let owner = this.owner;
  2297. DropRule.Instance.Cloned = false;
  2298. GameManager.Instance.TargetPosition = new Vector2(owner.x, owner.y);
  2299. this.MouseClick(owner);
  2300. }
  2301. MouseClick(_node) {
  2302. let _nodeball = _node.getComponent(Ball);
  2303. for (let i = 0; i < InGameView.Instance.prefabbox.numChildren; i++) {
  2304. let other = InGameView.Instance.prefabbox.getChildAt(i);
  2305. let ball = other.getComponent(Ball);
  2306. if (other.x == _node.x && other.y == _node.y) {
  2307. continue;
  2308. }
  2309. if (ball.mark) {
  2310. continue;
  2311. }
  2312. let distan = Laya.Vector3.distance(new Laya.Vector3(other.x, other.y, 0), new Laya.Vector3(_node.x, _node.y, 0));
  2313. let dis = _node.width / 2 + other.width / 2;
  2314. if (Math.abs(distan - dis) <= AccountManager.Instance.curplayerData.Distance || Math.abs(distan - dis) <= AccountManager.Instance.curplayerData.Distance || distan < dis) {
  2315. if (ball.score == _nodeball.score) {
  2316. ball.mark = true;
  2317. this.MouseClick(other);
  2318. }
  2319. }
  2320. }
  2321. }
  2322. }
  2323. class InGameView extends ui.InGameSceneUI {
  2324. constructor() {
  2325. super();
  2326. this.LoseView = false;
  2327. this.WinView = false;
  2328. this.OverRun = false;
  2329. this.lingdianerwu = false;
  2330. this.lingdianwu = false;
  2331. this.lingdianqiwu = false;
  2332. InGameView.ins = this;
  2333. EventManager.StageOn(StageMode.Clone, this, this.AddPrefab);
  2334. EventManager.StageOn(StageMode.Win, this, this.Win);
  2335. EventManager.StageOn(StageMode.Lose, this, this.Lose);
  2336. EventManager.StageOn(StageMode.ReStart, this, this.ReStart);
  2337. EventManager.StageOn(StageMode.Over, this, this.Over);
  2338. EventManager.StageOn(StageMode.Revive, this, this.Revive);
  2339. EventManager.StageOn(StageMode.Check, this, this.Check);
  2340. }
  2341. static get Instance() {
  2342. if (InGameView.ins) {
  2343. return InGameView.ins;
  2344. }
  2345. else {
  2346. return new InGameView();
  2347. }
  2348. }
  2349. Show() {
  2350. let stage = AccountManager.Instance.curplayerData.GainAccount("stage");
  2351. this.STAGE = Number(stage);
  2352. Laya.timer.loop(AccountManager.Instance.curplayerData.Save * 1000, this, this.Save);
  2353. Laya.timer.once(200, this, this.SkillRefresh);
  2354. Laya.timer.frameLoop(2, this, this.CheckHeight);
  2355. Laya.timer.frameLoop(1, this, this.Progress);
  2356. Laya.timer.once(AccountManager.Instance.curplayerData.CheckLose * 1000, this, this.CheckLose);
  2357. Laya.timer.frameLoop(500, this, this.SkillAnimation);
  2358. this.ScoreRefresh();
  2359. this.SkillNumRefresh();
  2360. this.arrowbtn.clickHandler = new Laya.Handler(this, this.ClickArrow);
  2361. this.zhunxin1btn.clickHandler = new Laya.Handler(this, this.ClickZhunXin1);
  2362. this.zhunxin2btn.clickHandler = new Laya.Handler(this, this.ClickZhunXin2);
  2363. this.doublebtn.clickHandler = new Laya.Handler(this, this.ClickDouble);
  2364. this.hammerbtn.clickHandler = new Laya.Handler(this, this.ClickHammer);
  2365. this.height = Laya.stage.height;
  2366. this.BG.height = Laya.stage.height;
  2367. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  2368. this.height = Laya.stage.height;
  2369. this.BG.height = Laya.stage.height;
  2370. });
  2371. }
  2372. Check() {
  2373. Laya.timer.clear(this, this.CheckLose);
  2374. Laya.timer.once(AccountManager.Instance.curplayerData.CheckLose * 1000, this, this.CheckLose);
  2375. }
  2376. AddPrefab(ball) {
  2377. this.prefabbox.addChild(ball);
  2378. }
  2379. CheckHeight() {
  2380. if (GameManager.Instance.CheckHeight) {
  2381. let down = false;
  2382. this.OverRun = false;
  2383. for (let i = 0; i < this.prefabbox.numChildren; i++) {
  2384. let child = this.prefabbox.getChildAt(i);
  2385. if (child.y < DropRule.Instance.DropHeight) {
  2386. down = true;
  2387. }
  2388. if (child.y < AccountManager.Instance.curplayerData.OverRun) {
  2389. this.OverRun = true;
  2390. }
  2391. }
  2392. if (!down) {
  2393. DropRule.Instance.FallDown();
  2394. }
  2395. }
  2396. }
  2397. CheckLose() {
  2398. if (!this.LoseView) {
  2399. let lose = true;
  2400. for (let i = 0; i < this.prefabbox.numChildren; i++) {
  2401. let ball = this.prefabbox.getChildAt(i);
  2402. let light = ball.getChildByName("light");
  2403. if (light.visible) {
  2404. lose = false;
  2405. }
  2406. }
  2407. if (lose) {
  2408. this.LoseView = true;
  2409. Laya.timer.clear(this, this.Save);
  2410. this.Save(true);
  2411. EventManager.StageTrigger(StageMode.Lose);
  2412. }
  2413. }
  2414. }
  2415. ScoreRefresh() {
  2416. let score = DropRule.Instance.GoalScore;
  2417. this.NowLv.value = DropRule.Instance.STAGE.toString();
  2418. this.NextLv.value = (DropRule.Instance.STAGE + 1).toString();
  2419. this.NowScore.text = GameManager.Instance.ScoreProgress.toString();
  2420. this.RequireScore.text = score.toString();
  2421. }
  2422. SkillNumRefresh() {
  2423. this.Func1num.text = AccountManager.Instance.curplayerData.GetPropNum(1).toString();
  2424. this.Func2num.text = AccountManager.Instance.curplayerData.GetPropNum(2).toString();
  2425. this.Func3num.text = AccountManager.Instance.curplayerData.GetPropNum(3).toString();
  2426. this.Func4num.text = AccountManager.Instance.curplayerData.GetPropNum(4).toString();
  2427. this.Func5num.text = AccountManager.Instance.curplayerData.GetPropNum(5).toString();
  2428. }
  2429. SkillRefresh() {
  2430. this.ani1.play(null, false);
  2431. this.ani2.play(null, false);
  2432. this.ani3.play(null, false);
  2433. this.ani4.play(null, false);
  2434. this.ani5.play(null, false);
  2435. }
  2436. SkillAnimation() {
  2437. let random = GameTools.RandomANumber(1, 6);
  2438. switch (random) {
  2439. case 1:
  2440. this.ani1.play(null, false);
  2441. break;
  2442. case 2:
  2443. this.ani2.play(null, false);
  2444. break;
  2445. case 3:
  2446. this.ani3.play(null, false);
  2447. break;
  2448. case 4:
  2449. this.ani4.play(null, false);
  2450. break;
  2451. case 5:
  2452. this.ani5.play(null, false);
  2453. break;
  2454. }
  2455. }
  2456. get Ratio() {
  2457. let score = DropRule.Instance.GoalScore;
  2458. let value = GameManager.Instance.ScoreProgress / score;
  2459. return value;
  2460. }
  2461. Progress() {
  2462. if (!this.WinView) {
  2463. this.LevelProgress.value = this.Ratio;
  2464. if (GameManager.Instance.ScoreProgress >= Number(this.RequireScore.text)) {
  2465. GameManager.Instance.ScoreProgress = Number(this.RequireScore.text);
  2466. this.NowScore.text = GameManager.Instance.ScoreProgress.toString();
  2467. Laya.timer.clear(this, this.Save);
  2468. Laya.timer.clear(this, this.CheckLose);
  2469. this.Save(true);
  2470. EventManager.StageTrigger(StageMode.Win);
  2471. this.WinView = true;
  2472. }
  2473. this.NowScore.text = GameManager.Instance.ScoreProgress.toString();
  2474. }
  2475. if (DropRule.Instance.STAGE >= 7) {
  2476. let X = GameTools.RandomANumber(100, 500);
  2477. let pos = new Laya.Vector2(X, 10);
  2478. if (this.Ratio >= 0.25 && this.Ratio < 0.5 && !this.lingdianerwu) {
  2479. DropRule.Instance.CreateGift(1, pos, DropRule.Instance.JudgePropNum(), 1);
  2480. this.lingdianerwu = true;
  2481. }
  2482. if (this.Ratio >= 0.5 && this.Ratio < 0.75 && !this.lingdianwu) {
  2483. DropRule.Instance.CreateGift(1, pos, DropRule.Instance.JudgePropNum(), 1);
  2484. this.lingdianwu = true;
  2485. }
  2486. if (this.Ratio >= 0.75 && this.Ratio < 1 && !this.lingdianqiwu) {
  2487. DropRule.Instance.CreateGift(1, pos, DropRule.Instance.JudgePropNum(), 1);
  2488. this.lingdianqiwu = true;
  2489. }
  2490. }
  2491. }
  2492. ClickArrow() {
  2493. console.log("点到了推球道具--");
  2494. if (Number(this.Func5num.text) > 0) {
  2495. let args = [{ "t": AccountManager.Instance.ServerTime.toString() }, { "play_id": GameManager.Instance.play_id }, { "fid": "5" }];
  2496. ServerManager.Instance.SendHttp(BlastToMerge.Use, args, Laya.Handler.create(this, (res) => {
  2497. for (let i = 0; i < this.prefabbox.numChildren; i++) {
  2498. let ball = this.prefabbox.getChildAt(i);
  2499. if (ball.destroyed) {
  2500. continue;
  2501. }
  2502. else {
  2503. let _rig = ball.getComponent(Laya.RigidBody);
  2504. _rig.applyLinearImpulseToCenter({ x: 0, y: -1000 });
  2505. }
  2506. }
  2507. this.SkillNumRefresh();
  2508. }), Laya.Handler.create(this, (res) => {
  2509. console.log(res);
  2510. }));
  2511. }
  2512. }
  2513. ClickDouble() {
  2514. if (EventManager.PropState == PropEffecf.DOUBLE) {
  2515. EventManager.EventTrigger(PropEffecf.NONE);
  2516. console.log("切换为普通模式");
  2517. return;
  2518. }
  2519. if (EventManager.PropState != PropEffecf.NONE) {
  2520. this.EffectMode(false);
  2521. return;
  2522. }
  2523. if (Number(this.Func1num.text) > 0) {
  2524. EventManager.EventTrigger(PropEffecf.DOUBLE);
  2525. console.log("切换为双倍模式");
  2526. }
  2527. }
  2528. ClickZhunXin1() {
  2529. console.log("点到了准心1道具--");
  2530. if (Number(this.Func2num.text) > 0) {
  2531. if (EventManager.PropState == PropEffecf.NONE) {
  2532. this.EffectMode(true, PropEffecf.CLEARLAST);
  2533. }
  2534. else {
  2535. this.EffectMode(false);
  2536. }
  2537. }
  2538. }
  2539. ClickZhunXin2() {
  2540. console.log("点到了准心2道具--");
  2541. if (Number(this.Func3num.text) > 0) {
  2542. if (EventManager.PropState == PropEffecf.NONE) {
  2543. this.EffectMode(true, PropEffecf.CLEARTWO);
  2544. }
  2545. else {
  2546. this.EffectMode(false);
  2547. }
  2548. }
  2549. }
  2550. ClickHammer() {
  2551. console.log("点到了锤子道具--");
  2552. if (Number(this.Func4num.text) > 0) {
  2553. if (EventManager.PropState == PropEffecf.NONE) {
  2554. this.EffectMode(true, PropEffecf.HAMMER);
  2555. }
  2556. else {
  2557. this.EffectMode(false);
  2558. }
  2559. }
  2560. }
  2561. EffectMode(_open, _type = null) {
  2562. this.Effect.visible = _open;
  2563. if (_open) {
  2564. EventManager.PropState = _type;
  2565. let describe2 = this.Effect.getChildByName("describe2");
  2566. let describe = this.Effect.getChildByName("describe");
  2567. let icon = this.Effect.getChildByName("ICON");
  2568. switch (_type) {
  2569. case PropEffecf.CLEARLAST:
  2570. this.EffectBtn.visible = true;
  2571. describe.visible = true;
  2572. describe2.visible = false;
  2573. icon.visible = true;
  2574. icon.skin = this.GetIcon(DropRule.Instance.MinBall);
  2575. this.ClearNum.text = DropRule.Instance.MinBall.toString();
  2576. this.EffectBtn.clickHandler = Laya.Handler.create(this, this.ClearLast);
  2577. break;
  2578. case PropEffecf.CLEARTWO:
  2579. this.EffectBtn.visible = true;
  2580. describe.visible = true;
  2581. describe2.visible = false;
  2582. icon.visible = true;
  2583. icon.skin = this.GetIcon(DropRule.Instance.MinNextBall);
  2584. this.ClearNum.text = DropRule.Instance.MinNextBall.toString();
  2585. this.EffectBtn.clickHandler = Laya.Handler.create(this, this.ClearTwo);
  2586. break;
  2587. case PropEffecf.HAMMER:
  2588. this.EffectBtn.visible = false;
  2589. describe.visible = false;
  2590. describe2.visible = true;
  2591. icon.visible = false;
  2592. EventManager.EventTrigger(PropEffecf.HAMMER);
  2593. break;
  2594. }
  2595. }
  2596. else {
  2597. EventManager.PropState = PropEffecf.NONE;
  2598. this.EffectBtn.clickHandler = null;
  2599. }
  2600. }
  2601. ClearLast() {
  2602. var args = [{ "t": AccountManager.Instance.ServerTime.toString() }, { "play_id": GameManager.Instance.play_id }, { "fid": "2" }];
  2603. ServerManager.Instance.SendHttp(BlastToMerge.Use, args, Laya.Handler.create(this, () => {
  2604. for (let i = this.prefabbox.numChildren - 1; i > -1; i--) {
  2605. let prefab = this.prefabbox.getChildAt(i);
  2606. if (prefab.name == "Gift" || prefab.name == "TimeGift") {
  2607. continue;
  2608. }
  2609. let ball = prefab.getComponent(Ball);
  2610. if (ball.score == DropRule.Instance.MinBall) {
  2611. GameManager.Instance.ScoreProgress += ball.score;
  2612. DropRule.Instance.CreateEffect(ball.score, new Laya.Vector2(prefab.x, prefab.y));
  2613. let _rig = prefab.getComponent(Laya.RigidBody);
  2614. let _collider = prefab.getComponent(Laya.CircleCollider);
  2615. _collider.enabled = false;
  2616. _rig.enabled = false;
  2617. Laya.timer.clearAll(prefab);
  2618. prefab.removeSelf();
  2619. let _index = DropRule.Instance.GetBallIndex(ball.score);
  2620. GamePool.Instance.RecoverModel(prefab, _index.toString());
  2621. }
  2622. }
  2623. this.SkillNumRefresh();
  2624. this.Effect.visible = false;
  2625. this.EffectBtn.clickHandler = null;
  2626. EventManager.PropState = PropEffecf.NONE;
  2627. }), Laya.Handler.create(this, () => {
  2628. console.log("道具使用失败");
  2629. }));
  2630. }
  2631. ClearTwo() {
  2632. var args = [{ "t": AccountManager.Instance.ServerTime.toString() }, { "play_id": GameManager.Instance.play_id }, { "fid": "3" }];
  2633. ServerManager.Instance.SendHttp(BlastToMerge.Use, args, Laya.Handler.create(this, () => {
  2634. for (let i = this.prefabbox.numChildren - 1; i > -1; i--) {
  2635. let prefab = this.prefabbox.getChildAt(i);
  2636. if (prefab.name == "Gift" || prefab.name == "TimeGift") {
  2637. continue;
  2638. }
  2639. let ball = prefab.getComponent(Ball);
  2640. if (ball.score == DropRule.Instance.MinNextBall) {
  2641. GameManager.Instance.ScoreProgress += ball.score;
  2642. DropRule.Instance.CreateEffect(ball.score, new Laya.Vector2(prefab.x, prefab.y));
  2643. let _rig = prefab.getComponent(Laya.RigidBody);
  2644. let _collider = prefab.getComponent(Laya.CircleCollider);
  2645. _collider.enabled = false;
  2646. _rig.enabled = false;
  2647. Laya.timer.clearAll(prefab);
  2648. prefab.removeSelf();
  2649. let _index = DropRule.Instance.GetBallIndex(ball.score);
  2650. GamePool.Instance.RecoverModel(prefab, _index.toString());
  2651. }
  2652. }
  2653. this.SkillNumRefresh();
  2654. this.Effect.visible = false;
  2655. this.EffectBtn.clickHandler = null;
  2656. EventManager.PropState = PropEffecf.NONE;
  2657. }), null);
  2658. }
  2659. GetIcon(_score) {
  2660. let index;
  2661. for (let i = 0; i < DropRule.Instance.PrefabName.length; i++) {
  2662. if (_score == Number(DropRule.Instance.PrefabName[i])) {
  2663. index = i.toString();
  2664. }
  2665. }
  2666. return "Ball/blast" + index + ".png";
  2667. }
  2668. ClearStage() {
  2669. if (!this.prefabbox.destroyed) {
  2670. for (let i = this.prefabbox.numChildren - 1; i > -1; i--) {
  2671. let prefab = this.prefabbox.getChildAt(i);
  2672. if (prefab.name == "Gift" || prefab.name == "TimeGift") {
  2673. let giftscript = prefab.getComponent(Gift);
  2674. let _rig = prefab.getComponent(Laya.RigidBody);
  2675. let _collider = prefab.getComponent(Laya.CircleCollider);
  2676. _collider.enabled = false;
  2677. _rig.enabled = false;
  2678. _collider.destroy();
  2679. _rig.destroy();
  2680. Laya.timer.clearAll(prefab);
  2681. prefab.removeSelf();
  2682. let name = giftscript.type == 0 ? "Gift" : "TimeGift";
  2683. GamePool.Instance.RecoverModel(prefab, name);
  2684. continue;
  2685. }
  2686. let ball = prefab.getComponent(Ball);
  2687. let _rig = prefab.getComponent(Laya.RigidBody);
  2688. let _collider = prefab.getComponent(Laya.CircleCollider);
  2689. _collider.enabled = false;
  2690. _rig.enabled = false;
  2691. _collider.destroy();
  2692. _rig.destroy();
  2693. Laya.timer.clearAll(prefab);
  2694. prefab.removeSelf();
  2695. let _index = DropRule.Instance.GetBallIndex(ball.score);
  2696. GamePool.Instance.RecoverModel(prefab, _index.toString());
  2697. }
  2698. }
  2699. }
  2700. Over() {
  2701. this.ClearStage();
  2702. EventManager.StageOff(StageMode.Clone, this, this.AddPrefab);
  2703. EventManager.StageOff(StageMode.Win, this, this.Win);
  2704. EventManager.StageOff(StageMode.Lose, this, this.Lose);
  2705. EventManager.StageOff(StageMode.ReStart, this, this.ReStart);
  2706. EventManager.StageOff(StageMode.Over, this, this.Over);
  2707. EventManager.StageOff(StageMode.Revive, this, this.Revive);
  2708. EventManager.StageOff(StageMode.Check, this, this.Check);
  2709. this.ClearCollider(this.BottomCollider);
  2710. this.ClearCollider(this.RightCollider);
  2711. this.ClearCollider(this.LeftCollider);
  2712. }
  2713. Revive() {
  2714. for (let i = this.prefabbox.numChildren - 1; i > -1; i--) {
  2715. let prefab = this.prefabbox.getChildAt(i);
  2716. if (prefab.name == "Gift" || prefab.name == "TimeGift") {
  2717. continue;
  2718. }
  2719. let ball = prefab.getComponent(Ball);
  2720. for (let j = 0; j < DropRule.Instance.BallNum.length; j++) {
  2721. let Score = DropRule.Instance.GetBallIndex(ball.score);
  2722. if (Score + 1 == Number(DropRule.Instance.BallNum[j])) {
  2723. DropRule.Instance.CreateEffect(ball.score, new Laya.Vector2(prefab.x, prefab.y));
  2724. let _rig = prefab.getComponent(Laya.RigidBody);
  2725. let _collider = prefab.getComponent(Laya.CircleCollider);
  2726. _collider.enabled = false;
  2727. _rig.enabled = false;
  2728. Laya.timer.clearAll(prefab);
  2729. prefab.removeSelf();
  2730. let _index = DropRule.Instance.GetBallIndex(ball.score);
  2731. GamePool.Instance.RecoverModel(prefab, _index.toString());
  2732. }
  2733. }
  2734. }
  2735. Laya.timer.frameLoop(2, this, this.CheckHeight);
  2736. Laya.timer.once(500, this, () => {
  2737. this.LoseView = false;
  2738. });
  2739. }
  2740. Win() {
  2741. Laya.timer.clear(this, this.CheckHeight);
  2742. }
  2743. Lose() {
  2744. Laya.timer.clear(this, this.CheckHeight);
  2745. }
  2746. ReStart(_data) {
  2747. if (_data) {
  2748. for (let i = this.prefabbox.numChildren - 1; i > -1; i--) {
  2749. let prefab = this.prefabbox.getChildAt(i);
  2750. if (prefab.name == "Gift" || prefab.name == "TimeGift") {
  2751. continue;
  2752. }
  2753. let ball = prefab.getComponent(Ball);
  2754. for (let j = 0; j < DropRule.Instance.BallNum.length; j++) {
  2755. let Score = DropRule.Instance.GetBallIndex(ball.score);
  2756. if (Score + 1 == Number(DropRule.Instance.BallNum[j])) {
  2757. DropRule.Instance.CreateEffect(ball.score, new Laya.Vector2(prefab.x, prefab.y));
  2758. let _rig = prefab.getComponent(Laya.RigidBody);
  2759. let _collider = prefab.getComponent(Laya.CircleCollider);
  2760. _collider.enabled = false;
  2761. _rig.enabled = false;
  2762. Laya.timer.clearAll(prefab);
  2763. prefab.removeSelf();
  2764. let _index = DropRule.Instance.GetBallIndex(ball.score);
  2765. GamePool.Instance.RecoverModel(prefab, _index.toString());
  2766. }
  2767. }
  2768. }
  2769. let ballarray = this.PassDeal;
  2770. if (ballarray.length > 4) {
  2771. let ballarray2 = [];
  2772. for (let m = 0; m < 4; m++) {
  2773. ballarray2.push(ballarray[m]);
  2774. }
  2775. for (let k = this.prefabbox.numChildren - 1; k > -1; k--) {
  2776. let prefab = this.prefabbox.getChildAt(k);
  2777. if (prefab.name == "Gift" || prefab.name == "TimeGift") {
  2778. continue;
  2779. }
  2780. let ball = prefab.getComponent(Ball);
  2781. let dispear = true;
  2782. for (let l = 0; l < ballarray2.length; l++) {
  2783. if (ball.score == ballarray2[l]) {
  2784. dispear = false;
  2785. }
  2786. }
  2787. if (dispear) {
  2788. DropRule.Instance.CreateEffect(ball.score, new Laya.Vector2(prefab.x, prefab.y));
  2789. let _rig = prefab.getComponent(Laya.RigidBody);
  2790. let _collider = prefab.getComponent(Laya.CircleCollider);
  2791. _collider.enabled = false;
  2792. _rig.enabled = false;
  2793. Laya.timer.clearAll(prefab);
  2794. prefab.removeSelf();
  2795. let _index = DropRule.Instance.GetBallIndex(ball.score);
  2796. GamePool.Instance.RecoverModel(prefab, _index.toString());
  2797. }
  2798. }
  2799. }
  2800. Laya.timer.loop(5000, this, this.Save);
  2801. this.WinView = false;
  2802. this.lingdianerwu = false;
  2803. this.lingdianwu = false;
  2804. this.lingdianqiwu = false;
  2805. this.ScoreRefresh();
  2806. this.Progress();
  2807. DropRule.Instance.FallDown(DropRule.Instance.StartNum);
  2808. Laya.timer.frameLoop(2, this, this.CheckHeight);
  2809. }
  2810. else {
  2811. this.ClearStage();
  2812. this.LoseView = false;
  2813. this.WinView = false;
  2814. this.lingdianerwu = false;
  2815. this.lingdianwu = false;
  2816. this.lingdianqiwu = false;
  2817. this.ScoreRefresh();
  2818. this.Progress();
  2819. if (DropRule.Instance.STAGE == 1) {
  2820. this.Guide.visible = false;
  2821. GameManager.Instance.Wave = 1;
  2822. DropRule.Instance.GuideFallDown();
  2823. GameManager.Instance.CheckHeight = false;
  2824. }
  2825. else {
  2826. DropRule.Instance.FallDown(DropRule.Instance.StartNum);
  2827. }
  2828. Laya.timer.frameLoop(2, this, this.CheckHeight);
  2829. }
  2830. }
  2831. ClearCollider(_node) {
  2832. let collier = _node.getComponent(Laya.ChainCollider);
  2833. let rig = _node.getComponent(Laya.RigidBody);
  2834. if (collier) {
  2835. collier.enabled = false;
  2836. }
  2837. if (rig) {
  2838. rig.enabled = false;
  2839. }
  2840. if (_node) {
  2841. _node.removeSelf();
  2842. _node.destroy();
  2843. }
  2844. }
  2845. Close() {
  2846. Laya.timer.clearAll(this);
  2847. }
  2848. get PassDeal() {
  2849. let array = [];
  2850. for (let i = 0; i < this.prefabbox.numChildren; i++) {
  2851. let prefab = this.prefabbox.getChildAt(i);
  2852. let ball = prefab.getComponent(Ball);
  2853. if (array.length == 0) {
  2854. array.push(ball.score);
  2855. }
  2856. if (i > 0) {
  2857. let add = true;
  2858. for (let j = 0; j < array.length; j++) {
  2859. if (ball.score == array[j]) {
  2860. add = false;
  2861. }
  2862. }
  2863. if (add) {
  2864. array.push(ball.score);
  2865. }
  2866. }
  2867. }
  2868. if (array.length > 4) {
  2869. for (let k = 0; k < array.length; k++) {
  2870. for (let l = 0; l < array.length - k - 1; l++) {
  2871. if (array[l] < array[l + 1]) {
  2872. let temp = array[l];
  2873. array[l] = array[l + 1];
  2874. array[l + 1] = temp;
  2875. }
  2876. }
  2877. }
  2878. }
  2879. return array;
  2880. }
  2881. Save(_data) {
  2882. let type;
  2883. let proptype;
  2884. let propnum;
  2885. let ball;
  2886. let score;
  2887. let size;
  2888. let index;
  2889. let point;
  2890. let obj = {};
  2891. let objarray = [];
  2892. if (!_data) {
  2893. for (let i = 0; i < this.prefabbox.numChildren; i++) {
  2894. let prefab = this.prefabbox.getChildAt(i);
  2895. if (prefab.name == "ball") {
  2896. ball = prefab.getComponent(Ball);
  2897. score = ball.score;
  2898. index = (DropRule.Instance.GetBallIndex(score) + 1).toString();
  2899. size = prefab.width.toString();
  2900. point = new Laya.Vector2(prefab.x, prefab.y);
  2901. obj = { "index": index, "size": size, "pos": point, "itemtype": 0 };
  2902. }
  2903. else if (prefab.name == "Gift") {
  2904. let giftscript = prefab.getComponent(Gift);
  2905. type = giftscript.type;
  2906. proptype = giftscript.GiftIndex;
  2907. propnum = giftscript.GiftNum;
  2908. point = new Laya.Vector2(prefab.x, prefab.y);
  2909. obj = { "type": type, "proptype": proptype, "propnum": propnum, "pos": point, "itemtype": 1 };
  2910. }
  2911. objarray.push(obj);
  2912. }
  2913. let jindutiao = { "jindu": GameManager.Instance.ScoreProgress.toString() };
  2914. let sizeindex = { "sizeindex": DropRule.Instance.SizeIndex };
  2915. let edgeindex = { "edgeindex": DropRule.Instance.EdgeIndex };
  2916. objarray.push(edgeindex);
  2917. objarray.push(jindutiao);
  2918. objarray.push(sizeindex);
  2919. var progress = JSON.stringify(objarray);
  2920. var args = [{ "stage": DropRule.Instance.STAGE.toString() }, { "progress": progress }];
  2921. }
  2922. else {
  2923. obj = { "0": "0" };
  2924. objarray.push(obj);
  2925. var progress = JSON.stringify(objarray);
  2926. var args = [{ "stage": DropRule.Instance.STAGE.toString() }, { "progress": progress }];
  2927. }
  2928. ServerManager.Instance.SendHttp(BlastToMerge.Save, args, Laya.Handler.create(this, (res) => {
  2929. }), Laya.Handler.create(this, () => {
  2930. console.log("保存进度失败++");
  2931. }));
  2932. }
  2933. }
  2934. var on_off;
  2935. (function (on_off) {
  2936. on_off[on_off["on"] = 0] = "on";
  2937. on_off[on_off["off"] = 1] = "off";
  2938. })(on_off || (on_off = {}));
  2939. class Switch extends Laya.Script {
  2940. constructor() {
  2941. super();
  2942. this.kaiguan = on_off.off;
  2943. }
  2944. onAwake() {
  2945. this.CloseSprite = this.owner.getChildByName("close");
  2946. this.OpenSprite = this.owner.getChildByName("open");
  2947. this.Button = this.owner.getChildByName("btn");
  2948. this.Button.clickHandler = Laya.Handler.create(this, () => {
  2949. this.ChangeMode(this.kaiguan);
  2950. this.kaiguan++;
  2951. if (this.kaiguan > 1) {
  2952. this.kaiguan = 0;
  2953. }
  2954. }, null, false);
  2955. }
  2956. ListenOn_Off(on = true, OpenFunction = null, CloseFunction = null) {
  2957. this.kaiguan = on ? on_off.on : on_off.off;
  2958. this.OpenFunction = OpenFunction;
  2959. this.CloseFunction = CloseFunction;
  2960. this.ChangeMode(this.kaiguan);
  2961. this.kaiguan++;
  2962. if (this.kaiguan > 1) {
  2963. this.kaiguan = 0;
  2964. }
  2965. }
  2966. ChangeMode(_mode) {
  2967. switch (_mode) {
  2968. case on_off.off:
  2969. this.OpenSprite.visible = false;
  2970. this.CloseSprite.visible = true;
  2971. this.CloseFunction.run();
  2972. break;
  2973. case on_off.on:
  2974. this.OpenSprite.visible = true;
  2975. this.CloseSprite.visible = false;
  2976. this.OpenFunction.run();
  2977. break;
  2978. }
  2979. }
  2980. }
  2981. class SetView extends ui.SetViewUI {
  2982. constructor() {
  2983. super();
  2984. }
  2985. static get Instance() {
  2986. if (SetView.ins) {
  2987. return SetView.ins;
  2988. }
  2989. else {
  2990. return new SetView();
  2991. }
  2992. }
  2993. Show() {
  2994. this.userid.text = AccountManager.Instance.curplayerData.userId;
  2995. this.CloseBtn.clickHandler = Laya.Handler.create(this, this.ClickClose);
  2996. this.SoundSwitch = this.Sound.addComponent(Switch);
  2997. this.ShakeSwitch = this.Shake.addComponent(Switch);
  2998. this.SoundSwitch.ListenOn_Off(AudioManager.open, Laya.Handler.create(this, this.OpenSound, [true], false), Laya.Handler.create(this, this.OpenSound, [false], false));
  2999. this.ShakeSwitch.ListenOn_Off(WXSDK.shake, Laya.Handler.create(this, this.OpenShake, [true], false), Laya.Handler.create(this, this.OpenShake, [false], false));
  3000. this.height = Laya.stage.height;
  3001. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  3002. this.height = Laya.stage.height;
  3003. });
  3004. }
  3005. Close() {
  3006. }
  3007. ClickClose() {
  3008. ViewManager.Instance.ShowView(ViewType.MainView);
  3009. }
  3010. OpenSound(_open) {
  3011. AudioManager.open = _open;
  3012. }
  3013. OpenShake(_open) {
  3014. WXSDK.shake = _open;
  3015. }
  3016. }
  3017. class RankView extends ui.RankViewUI {
  3018. constructor() {
  3019. super();
  3020. }
  3021. static get Instance() {
  3022. if (RankView.ins) {
  3023. return RankView.ins;
  3024. }
  3025. else {
  3026. return new RankView();
  3027. }
  3028. }
  3029. Show() {
  3030. RankSDK.OpenPan();
  3031. RankSDK.OpenRank("Level");
  3032. this.CloseBtn.clickHandler = Laya.Handler.create(this, this.ClickClose);
  3033. this.UpPageBtn.clickHandler = Laya.Handler.create(this, this.UpPage);
  3034. this.DownPageBtn.clickHandler = Laya.Handler.create(this, this.DownPage);
  3035. this.height = Laya.stage.height;
  3036. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  3037. this.height = Laya.stage.height;
  3038. });
  3039. }
  3040. ClickClose() {
  3041. ViewManager.Instance.ShowView(ViewType.MainView);
  3042. }
  3043. UpPage() {
  3044. RankSDK.Leftpe();
  3045. }
  3046. DownPage() {
  3047. RankSDK.Rightpe();
  3048. }
  3049. Close() {
  3050. RankSDK.ClosePan();
  3051. }
  3052. }
  3053. class GuangGao {
  3054. static InitId() {
  3055. }
  3056. static JiaZaiShiPin() {
  3057. if (this.afsfsaafsfsa)
  3058. return;
  3059. if (!Laya.Browser.onWeiXin)
  3060. return;
  3061. this.fsaasfafssfa = Laya.Browser.window.wx.createRewardedVideoAd({ adUnitId: this.videlAdUnitId });
  3062. this.fsaasfafssfa.onLoad(() => {
  3063. console.log('激励视频 广告加载成功');
  3064. this.asfasfsaffsa = true;
  3065. });
  3066. this.fsaasfafssfa.onError(err => {
  3067. console.log("激励视屏加载失败:" + err);
  3068. this.asfasfsaffsa = false;
  3069. });
  3070. this.afsfasfasasf = 0;
  3071. this.afsfsaafsfsa = true;
  3072. }
  3073. static KaiShiPin(callback) {
  3074. if (Laya.Browser.onWeiXin) {
  3075. console.log("showVideoAd , asfasfsaffsa:" + this.asfasfsaffsa);
  3076. if (AccountManager.Instance.curplayerData.videoshare && AccountManager.Instance.curplayerData.fenxiang) ;
  3077. if (AccountManager.Instance.curplayerData.video == false) {
  3078. WXSDK.ShowTxt("暂未开放");
  3079. return;
  3080. }
  3081. this.fassfafasafs(callback);
  3082. this.fsaasfafssfa.show().catch(err => {
  3083. this.fsaasfafssfa.load().then(() => {
  3084. this.fassfafasafs(callback);
  3085. this.fsaasfafssfa.show();
  3086. });
  3087. });
  3088. }
  3089. else {
  3090. callback(false);
  3091. }
  3092. }
  3093. static fassfafasafs(callback) {
  3094. this.fsaasfafssfa.offClose();
  3095. this.fsaasfafssfa.onClose(res => {
  3096. console.log("激励视频关闭:" + res.isEnded);
  3097. if (res && res.isEnded || res === undefined) {
  3098. callback && callback(true);
  3099. }
  3100. else {
  3101. callback && callback(false);
  3102. }
  3103. this.fsaasfafssfa.offClose();
  3104. });
  3105. }
  3106. static OpenBanner(gap = 0, callVack = null, iswait = false) {
  3107. if (!Laya.Browser.onWeiXin)
  3108. return;
  3109. if (this.afsfasfasasf >= 10000) {
  3110. var hh = this.gasagsgasgsa(gap);
  3111. if (iswait) {
  3112. this.asgagassga.hide();
  3113. Laya.timer.once(AccountManager.Instance.curplayerData.wudaoshijian * 1000, this, () => {
  3114. if (callVack != null) {
  3115. callVack(hh);
  3116. }
  3117. this.asgagassga.show();
  3118. });
  3119. }
  3120. else {
  3121. if (callVack != null) {
  3122. callVack(hh);
  3123. }
  3124. this.asgagassga.show();
  3125. }
  3126. }
  3127. else {
  3128. var idd = this.bannerAdUnitId;
  3129. console.log("adUnitId:" + idd);
  3130. let newBanner = Laya.Browser.window.wx.createBannerAd({
  3131. adUnitId: idd,
  3132. style: {
  3133. left: 0,
  3134. top: 0,
  3135. width: 460
  3136. }
  3137. });
  3138. newBanner.onError(err => {
  3139. console.log(err);
  3140. this.gasagsgasgsa(gap);
  3141. });
  3142. newBanner.onLoad(() => {
  3143. this.afsfasfasasf++;
  3144. if (this.asgagassga)
  3145. this.asgagassga.destroy();
  3146. this.asgagassga = newBanner;
  3147. var hight = this.gasagsgasgsa(gap);
  3148. if (iswait) {
  3149. this.asgagassga.hide();
  3150. Laya.timer.once(AccountManager.Instance.curplayerData.wudaoshijian * 1000, this, () => {
  3151. if (callVack != null) {
  3152. callVack(hight);
  3153. }
  3154. this.asgagassga.show();
  3155. });
  3156. }
  3157. else {
  3158. if (callVack != null) {
  3159. callVack(hight);
  3160. }
  3161. this.asgagassga.show();
  3162. }
  3163. });
  3164. }
  3165. }
  3166. static gasagsgasgsa(gap) {
  3167. if (this.asgagassga) {
  3168. let info = Laya.Browser.window.wx.getSystemInfoSync();
  3169. this.asgagassga.style.width = info.windowWidth;
  3170. this.asgagassga.style.top = info.windowHeight - this.asgagassga.style.realHeight - gap - 30;
  3171. return Laya.stage.height / info.windowHeight * this.asgagassga.style.realHeight;
  3172. }
  3173. }
  3174. static Clear() {
  3175. Laya.timer.clearAll(this);
  3176. if (!Laya.Browser.onWeiXin)
  3177. return;
  3178. if (this.asgagassga)
  3179. this.asgagassga.hide();
  3180. }
  3181. static agagsagags() {
  3182. if (!Laya.Browser.onWeiXin)
  3183. return;
  3184. if (this.asgagassga)
  3185. this.asgagassga.hide();
  3186. }
  3187. static gasagsasg() {
  3188. if (!Laya.Browser.onWeiXin)
  3189. return;
  3190. if (this.asgagassga)
  3191. this.asgagassga.show();
  3192. }
  3193. static get keyiwudao() {
  3194. var wudao = AccountManager.Instance.curplayerData.wudao;
  3195. if (wudao == false) {
  3196. console.log("cheat:" + wudao);
  3197. return false;
  3198. }
  3199. if (Main.SceneNum == "1037" || Main.SceneNum == "1007"
  3200. || Main.SceneNum == "1044" || Main.SceneNum == "1104"
  3201. || Main.SceneNum == "1089" || Main.SceneNum == "1001"
  3202. || Main.SceneNum == "00000") {
  3203. console.log("cheat:true-> " + Main.SceneNum);
  3204. return true;
  3205. }
  3206. else {
  3207. var checkscence = AccountManager.Instance.curplayerData.jiancechangjin;
  3208. if (checkscence == false) {
  3209. console.log("cheat:true->checkscence: " + checkscence);
  3210. return true;
  3211. }
  3212. }
  3213. console.log("cheat:false-> " + Main.SceneNum);
  3214. return false;
  3215. }
  3216. static WudaoAnNiu(btn, ShowBanner = true, complete = null, gap = 0) {
  3217. if (AccountManager.Instance.curplayerData.banner) {
  3218. GuangGao.agagsagags();
  3219. if (GuangGao.keyiwudao == false) {
  3220. btn.bottom = 300;
  3221. GuangGao.OpenBanner();
  3222. }
  3223. else {
  3224. if (ShowBanner) {
  3225. btn.bottom = 100;
  3226. btn.mouseEnabled = false;
  3227. console.log("bottom:100");
  3228. GuangGao.OpenBanner(gap, (height) => {
  3229. if (height == null) {
  3230. console.log("展示互推位");
  3231. }
  3232. else {
  3233. var end = Laya.stage.height - height - btn.height;
  3234. btn.y = end;
  3235. btn.bottom = NaN;
  3236. console.log("y:" + end);
  3237. }
  3238. }, true);
  3239. Laya.timer.once(AccountManager.Instance.curplayerData.wudaoshijian * 1000, this, () => {
  3240. btn.mouseEnabled = true;
  3241. if (complete != null) {
  3242. complete();
  3243. }
  3244. });
  3245. }
  3246. else {
  3247. if (complete != null) {
  3248. complete();
  3249. }
  3250. }
  3251. }
  3252. }
  3253. }
  3254. on3DComplete() {
  3255. var scene;
  3256. Laya.stage.addChild(scene);
  3257. var camera1 = new Laya.Camera();
  3258. scene.addChild(camera1);
  3259. camera1.transform.translate(new Laya.Vector3(0, 2, 8), true);
  3260. camera1.transform.rotate(new Laya.Vector3(-23, 0, 0), true, false);
  3261. camera1.viewport = new Laya.Viewport(0, 0, 640, 720);
  3262. var camera2 = new Laya.Camera();
  3263. scene.addChild(camera2);
  3264. camera2.transform.rotate(new Laya.Vector3(-45, 0, 0), false, false);
  3265. camera2.transform.translate(new Laya.Vector3(0, 0, 25), true);
  3266. camera2.viewport = new Laya.Viewport(640, 0, 640, 720);
  3267. }
  3268. onModelOK() {
  3269. var scene = new Laya.Scene();
  3270. Laya.stage.addChild(scene);
  3271. var camera = new Laya.Camera(0, 0.1, 1000);
  3272. scene.addChild(camera);
  3273. camera.transform.rotate(new Laya.Vector3(-25, 0, 0), false, false);
  3274. camera.transform.position = new Laya.Vector3(0, 5, 10);
  3275. var role3D = Laya.loader.getRes("monkey/monkey.lh");
  3276. scene.addChild(role3D);
  3277. }
  3278. }
  3279. GuangGao.videlAdUnitId = "adunit-47ace2391e74f21e";
  3280. GuangGao.bannerAdUnitId = "adunit-876b793421608933";
  3281. GuangGao.afsfsaafsfsa = false;
  3282. GuangGao.asfasfsaffsa = false;
  3283. GuangGao.afsfasfasasf = 0;
  3284. var QianDaoMode;
  3285. (function (QianDaoMode) {
  3286. QianDaoMode[QianDaoMode["start"] = 0] = "start";
  3287. QianDaoMode[QianDaoMode["none"] = 1] = "none";
  3288. QianDaoMode[QianDaoMode["end"] = 2] = "end";
  3289. })(QianDaoMode || (QianDaoMode = {}));
  3290. class reward {
  3291. constructor(_rewradid, _rewradnum) {
  3292. this.rewardid = _rewradid;
  3293. this.rewardnum = _rewradnum;
  3294. }
  3295. }
  3296. class SignItem {
  3297. get GetRewardData() {
  3298. var data = this.rewardids.split(";");
  3299. if (data.length > 1) {
  3300. return new reward(Number(6000), Number(1));
  3301. }
  3302. else {
  3303. return new reward(Number(this.rewardids), Number(this.rewardnum));
  3304. }
  3305. }
  3306. }
  3307. class SignView extends ui.SignViewUI {
  3308. constructor() {
  3309. super();
  3310. this.SignDatas = [];
  3311. this.rewardsdic = {};
  3312. SignView.ins = this;
  3313. }
  3314. static get Instance() {
  3315. if (SignView.ins) {
  3316. return SignView.ins;
  3317. }
  3318. else {
  3319. return new SignView();
  3320. }
  3321. }
  3322. Show() {
  3323. this.SignDatas = this.GainSignDatas();
  3324. this.RefreshDatas();
  3325. this.SignBtn.visible = SignView.CanSign;
  3326. this.SignBtn.clickHandler = Laya.Handler.create(this, this.OnNormalSign);
  3327. this.CloseBtn.clickHandler = Laya.Handler.create(this, this.ClickClose);
  3328. this.height = Laya.stage.height;
  3329. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  3330. this.height = Laya.stage.height;
  3331. });
  3332. }
  3333. Close() {
  3334. }
  3335. ClickClose() {
  3336. ViewManager.Instance.ShowView(ViewType.MainView);
  3337. }
  3338. RefreshDatas() {
  3339. for (var i = 0; i < this.ItemList.numChildren; i++) {
  3340. var sign = this.ItemList.getChildAt(i);
  3341. var data = this.SignDatas[i];
  3342. var rewardid = data.GetRewardData.rewardid;
  3343. var icon = sign.getChildByName("icon");
  3344. var num = sign.getChildByName("icon").getChildByName("num");
  3345. num.text = "X" + data.GetRewardData.rewardnum.toString();
  3346. var roleicon = AccountManager.Instance.curplayerData.GainShiTi(rewardid.toString(), "icon");
  3347. icon.skin = "Game/res/Skin/" + roleicon + ".png";
  3348. var cansign = data.mold;
  3349. if (cansign == QianDaoMode.end) {
  3350. var complete = sign.getChildByName("complete");
  3351. complete.visible = true;
  3352. }
  3353. else if (cansign == QianDaoMode.start) {
  3354. var btn = sign.getChildByName("btn");
  3355. btn.clickHandler = Laya.Handler.create(this, this.OnDoubleSign, null, false);
  3356. }
  3357. }
  3358. }
  3359. OnSign() {
  3360. var curgold = Number(AccountManager.Instance.curplayerData.GainAccount("money"));
  3361. let param = [{ "video": "0" }];
  3362. ServerManager.Instance.SendHttp(BlastToMerge.QianDao, param, Laya.Handler.create(this, function (e) {
  3363. var reward = e["rewards"];
  3364. SignView.Instance.SignDatas = SignView.Instance.GainSignDatas();
  3365. SignView.Instance.SignBtn.visible = false;
  3366. SignView.Instance.RefreshDatas();
  3367. if (reward["1000"]) {
  3368. var gg = Number(AccountManager.Instance.curplayerData.GainAccount("money")) - curgold;
  3369. GameTools.GetMoney(gg, null, Laya.Handler.create(this, () => {
  3370. ViewManager.Instance.ShowView(ViewType.MainView);
  3371. }));
  3372. }
  3373. else {
  3374. GameTools.TweenText(new faafssfafsa("道具 + 1", new Laya.Vector2(Laya.stage.width / 2, Laya.stage.height * 0.35), new Laya.Vector2(250, 80), 30), 150, Laya.Handler.create(this, () => {
  3375. ViewManager.Instance.ShowView(ViewType.MainView);
  3376. }));
  3377. }
  3378. }), Laya.Handler.create(this, this.OnSignError), true);
  3379. }
  3380. OnNormalSign() {
  3381. this.OnSign();
  3382. }
  3383. OnDoubleSign() {
  3384. GuangGao.KaiShiPin((flag) => {
  3385. if (flag) {
  3386. let param = [{ "video": "1" }];
  3387. ServerManager.Instance.SendHttp(BlastToMerge.QianDao, param, Laya.Handler.create(this, function (e) {
  3388. var reward = e["rewards"];
  3389. SignView.Instance.SignDatas = SignView.Instance.GainSignDatas();
  3390. SignView.Instance.SignBtn.visible = false;
  3391. SignView.Instance.RefreshDatas();
  3392. GameTools.TweenText(new faafssfafsa("道具 + 1", new Laya.Vector2(Laya.stage.width / 2, Laya.stage.height * 0.35), new Laya.Vector2(250, 80), 30), 150, Laya.Handler.create(this, () => {
  3393. ViewManager.Instance.ShowView(ViewType.MainView);
  3394. }));
  3395. }), Laya.Handler.create(this, this.OnSignError), true);
  3396. }
  3397. });
  3398. }
  3399. OnSignError(e) {
  3400. console.log(e);
  3401. }
  3402. GainSignDatas() {
  3403. var signdatas = [];
  3404. var config = AccountManager.Instance.curplayerData.GainCollocation("sign");
  3405. var signday = Number(AccountManager.Instance.curplayerData.GainQinDao("sign_days"));
  3406. var once = signday < 7;
  3407. var indes = once ? 0 : 7;
  3408. for (var i = indes; i < indes + 7; i++) {
  3409. this.rewardsdic[config[i].id] = config[i].rewards;
  3410. }
  3411. for (var key in this.rewardsdic) {
  3412. var rewardid = this.rewardsdic[key];
  3413. var reward = AccountManager.Instance.curplayerData.GainJiangLi(rewardid);
  3414. var item = new SignItem();
  3415. item.desc = reward.group_name;
  3416. item.icon = reward.icon;
  3417. item.signday = Number(reward.id);
  3418. item.rewardids = reward.reward_item;
  3419. item.rewardnum = reward.reward_num;
  3420. item.weight = reward.reward_weight;
  3421. var num = Number(key);
  3422. if (signday > num - 1)
  3423. item.mold = QianDaoMode.end;
  3424. if (signday < num - 1)
  3425. item.mold = QianDaoMode.none;
  3426. if (signday == num - 1 && SignView.CanSign) {
  3427. item.mold = QianDaoMode.start;
  3428. }
  3429. signdatas.push(item);
  3430. }
  3431. return signdatas;
  3432. }
  3433. static get CanSign() {
  3434. let SSS = new Date(AccountManager.Instance.ServerTime * 1000);
  3435. SSS.setHours(0, 0, 0, 0);
  3436. var AAA = SSS.valueOf();
  3437. var SignTime = Number(AccountManager.Instance.curplayerData.GainQinDao("sign_time"));
  3438. var DDD = SignTime * 1000;
  3439. var TTT = DDD < AAA ? true : false;
  3440. return TTT;
  3441. }
  3442. }
  3443. class LotteryView extends ui.LotteryViewUI {
  3444. constructor() {
  3445. super();
  3446. this.circleNum = 5;
  3447. }
  3448. static get Instance() {
  3449. if (LotteryView.ins) {
  3450. return LotteryView.ins;
  3451. }
  3452. else {
  3453. return new LotteryView();
  3454. }
  3455. }
  3456. Show() {
  3457. this.CloseBtn.clickHandler = Laya.Handler.create(this, this.ClickClose);
  3458. this.LotteryBtn.clickHandler = Laya.Handler.create(this, this.OnVedio);
  3459. this.height = Laya.stage.height;
  3460. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  3461. this.height = Laya.stage.height;
  3462. });
  3463. }
  3464. Close() {
  3465. }
  3466. ClickClose() {
  3467. ViewManager.Instance.ShowView(ViewType.MainView);
  3468. }
  3469. OnVedio() {
  3470. GuangGao.KaiShiPin((flag) => {
  3471. if (flag) {
  3472. this.LotteryBtn.visible = false;
  3473. let param = [{ "channel": "video" }, { "t": AccountManager.Instance.ServerTime.toString() }];
  3474. ServerManager.Instance.SendHttp(BlastToMerge.Lottery, param, Laya.Handler.create(this, function (e) {
  3475. this.RotationDial(e);
  3476. }), Laya.Handler.create(this, () => {
  3477. WXSDK.ShowTxt("抽奖次数已经用完!");
  3478. }), true);
  3479. }
  3480. });
  3481. }
  3482. RotationDial(e) {
  3483. var result = e.lottery_id - 1;
  3484. this.dial.rotation = 0;
  3485. let tween = Laya.Tween.to(this.dial, {
  3486. rotation: 360 * (this.circleNum) - result * 60
  3487. }, 5000, Laya.Ease.quadInOut, new Laya.Handler(null, () => {
  3488. tween.clear();
  3489. this.LotteryBtn.visible = true;
  3490. if (!LotteryView.IsCanLottery()) {
  3491. this.LotteryBtn.gray = true;
  3492. console.log("观看视频抽奖按钮已变灰");
  3493. }
  3494. var reward = e["rewards"];
  3495. GameTools.TweenText(new faafssfafsa("道具 + 1", new Laya.Vector2(Laya.stage.width / 2, Laya.stage.height * 0.35), new Laya.Vector2(250, 80), 30), 150, Laya.Handler.create(this, () => {
  3496. ViewManager.Instance.ShowView(ViewType.MainView);
  3497. }));
  3498. }));
  3499. }
  3500. static IsCanLottery() {
  3501. var _timer = Number(AccountManager.Instance.curplayerData.lottery.day_video_times);
  3502. return _timer > 0;
  3503. }
  3504. }
  3505. class FailureView extends ui.FailureViewUI {
  3506. constructor() {
  3507. super();
  3508. }
  3509. static get Instance() {
  3510. if (FailureView.ins) {
  3511. return FailureView.ins;
  3512. }
  3513. else {
  3514. return new FailureView();
  3515. }
  3516. }
  3517. Show() {
  3518. this.BackBtn.clickHandler = Laya.Handler.create(this, this.ClickBack);
  3519. this.TryBtn.clickHandler = Laya.Handler.create(this, this.ClickTry);
  3520. this.height = Laya.stage.height;
  3521. this.BG.height = Laya.stage.height;
  3522. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  3523. this.height = Laya.stage.height;
  3524. this.BG.height = Laya.stage.height;
  3525. });
  3526. }
  3527. Close() {
  3528. Laya.timer.clearAll(this);
  3529. }
  3530. ClickBack() {
  3531. var args = [{ "t": AccountManager.Instance.ServerTime.toString() }, { "play_id": GameManager.Instance.play_id }, { "win": "0" }];
  3532. ServerManager.Instance.SendHttp(BlastToMerge.JieShu, args, Laya.Handler.create(this, this.BackMain), null);
  3533. }
  3534. ClickTry() {
  3535. var args = [{ "t": AccountManager.Instance.ServerTime.toString() }, { "play_id": GameManager.Instance.play_id }, { "win": "0" }];
  3536. ServerManager.Instance.SendHttp(BlastToMerge.JieShu, args, Laya.Handler.create(this, this.Try), null);
  3537. }
  3538. BackMain() {
  3539. EventManager.StageTrigger(StageMode.Over);
  3540. EventManager.StageTrigger(StageMode.Refresh);
  3541. ViewManager.Instance.ShowView(ViewType.MainView);
  3542. }
  3543. Try() {
  3544. ViewManager.Instance.ClosePopView(ViewType.FailureView);
  3545. EventManager.StageTrigger(StageMode.Refresh);
  3546. EventManager.StageTrigger(StageMode.ReStart);
  3547. }
  3548. }
  3549. class WinView extends ui.WinViewUI {
  3550. constructor() {
  3551. super();
  3552. }
  3553. static get Instance() {
  3554. if (WinView.ins) {
  3555. return WinView.ins;
  3556. }
  3557. else {
  3558. return new WinView();
  3559. }
  3560. }
  3561. Show() {
  3562. this.BackBtn.clickHandler = Laya.Handler.create(this, this.ClickBack);
  3563. this.NextBtn.clickHandler = Laya.Handler.create(this, this.ClickNextLevel);
  3564. this.height = Laya.stage.height;
  3565. this.BG.height = Laya.stage.height;
  3566. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  3567. this.height = Laya.stage.height;
  3568. this.BG.height = Laya.stage.height;
  3569. });
  3570. }
  3571. Close() {
  3572. Laya.timer.clearAll(this);
  3573. }
  3574. ClickBack() {
  3575. var args = [{ "t": AccountManager.Instance.ServerTime.toString() }, { "play_id": GameManager.Instance.play_id }, { "win": "1" }];
  3576. ServerManager.Instance.SendHttp(BlastToMerge.JieShu, args, Laya.Handler.create(this, this.BackMain), null);
  3577. }
  3578. ClickNextLevel() {
  3579. var args = [{ "t": AccountManager.Instance.ServerTime.toString() }, { "play_id": GameManager.Instance.play_id }, { "win": "1" }];
  3580. ServerManager.Instance.SendHttp(BlastToMerge.JieShu, args, Laya.Handler.create(this, this.NextLevel), null);
  3581. }
  3582. BackMain() {
  3583. EventManager.StageTrigger(StageMode.Over);
  3584. EventManager.StageTrigger(StageMode.Refresh);
  3585. ViewManager.Instance.ShowView(ViewType.MainView);
  3586. let level = DropRule.Instance.STAGE;
  3587. WXSDK.UpdateScore(level);
  3588. }
  3589. NextLevel() {
  3590. var agrs = [{ "t": AccountManager.Instance.ServerTime.toString() }];
  3591. ServerManager.Instance.SendHttp(BlastToMerge.KaiShi, agrs, Laya.Handler.create(this, this.StartNextLevel), null);
  3592. }
  3593. StartNextLevel(_data) {
  3594. ViewManager.Instance.ClosePopView(ViewType.WinView);
  3595. let stage = AccountManager.Instance.curplayerData.GainAccount("stage");
  3596. GameManager.Instance.play_id = _data.play_id;
  3597. DropRule.Instance.STAGE = Number(AccountManager.Instance.curplayerData.GainAccount("stage"));
  3598. EventManager.StageTrigger(StageMode.Refresh, [true]);
  3599. EventManager.StageTrigger(StageMode.ReStart, [true]);
  3600. let level = DropRule.Instance.STAGE;
  3601. WXSDK.UpdateScore(level);
  3602. }
  3603. }
  3604. class ReviveView extends ui.ReviveViewUI {
  3605. constructor() {
  3606. super();
  3607. this.time = 9;
  3608. this.count = false;
  3609. this.fuhuo = false;
  3610. }
  3611. static get Instance() {
  3612. if (ReviveView.ins) {
  3613. return ReviveView.ins;
  3614. }
  3615. else {
  3616. return new ReviveView();
  3617. }
  3618. }
  3619. Show() {
  3620. this.VideoBtn.clickHandler = Laya.Handler.create(this, this.VideoRevive);
  3621. this.NoBtn.visible = false;
  3622. Laya.timer.once(1000, this, () => {
  3623. this.NoBtn.visible = true;
  3624. this.NoBtn.clickHandler = Laya.Handler.create(this, this.DontRevive, null, false);
  3625. });
  3626. this.count = true;
  3627. Laya.timer.loop(1000, this, this.CountTime);
  3628. this.height = Laya.stage.height;
  3629. this.BG.height = Laya.stage.height;
  3630. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  3631. this.height = Laya.stage.height;
  3632. this.BG.height = Laya.stage.height;
  3633. });
  3634. }
  3635. CountTime() {
  3636. if (this.count && this.time > 0) {
  3637. this.time -= 1;
  3638. this.Time.text = this.time.toString();
  3639. if (this.time < 1) {
  3640. Laya.timer.clear(this, this.CountTime);
  3641. this.DontRevive();
  3642. }
  3643. }
  3644. }
  3645. DontRevive() {
  3646. Laya.timer.clear(this, this.CountTime);
  3647. this.count = false;
  3648. ViewManager.Instance.ClosePopView(ViewType.ReviveView);
  3649. ViewManager.Instance.OpenPopView(ViewType.FailureView);
  3650. }
  3651. VideoRevive() {
  3652. Laya.timer.clear(this, this.CountTime);
  3653. this.count = false;
  3654. EventManager.StageTrigger(StageMode.Revive);
  3655. ViewManager.Instance.ClearPopViews();
  3656. }
  3657. Close() {
  3658. Laya.timer.clearAll(this);
  3659. }
  3660. }
  3661. class SetView$1 extends ui.GetRewardViewUI {
  3662. constructor() {
  3663. super();
  3664. this.index = 0;
  3665. this.num = 0;
  3666. }
  3667. static get Instance() {
  3668. if (SetView$1.ins) {
  3669. return SetView$1.ins;
  3670. }
  3671. else {
  3672. return new SetView$1();
  3673. }
  3674. }
  3675. Show(data) {
  3676. this.index = data[0];
  3677. this.num = data[1];
  3678. this.FreshDescribe(this.index);
  3679. this.VideoGetBtn.visible = false;
  3680. this.GetBtn.clickHandler = Laya.Handler.create(this, this.GetReward);
  3681. this.height = Laya.stage.height;
  3682. Laya.stage.on(Laya.Event.RESIZE, this, () => {
  3683. this.height = Laya.stage.height;
  3684. });
  3685. }
  3686. Close() {
  3687. }
  3688. FreshDescribe(data) {
  3689. let func = AccountManager.Instance.curplayerData.GainCollocation("function");
  3690. let arr = [];
  3691. for (var item in func) {
  3692. let items = func[item];
  3693. arr.push(items);
  3694. }
  3695. this.des1.text = arr[data - 1].des1;
  3696. this.des2.text = arr[data - 1].des2;
  3697. this.skillicon.skin = "Game/res/Skin/func" + arr[data - 1].id + ".png";
  3698. }
  3699. GetReward() {
  3700. var agrs = [{ "reward_item": ("1000" + this.index.toString()) }, { "reward_num": this.num.toString() }, { "t": AccountManager.Instance.ServerTime.toString() }, { "channel": "video:game" }];
  3701. ServerManager.Instance.SendHttp(BlastToMerge.vd, agrs, Laya.Handler.create(this, this.Complete), null);
  3702. }
  3703. VideoGetReward() {
  3704. var agrs = [{ "reward_item": ("1000" + this.index.toString()) }, { "reward_num": (this.num * 2).toString() }, { "t": AccountManager.Instance.ServerTime.toString() }, { "channel": "video:game" }];
  3705. ServerManager.Instance.SendHttp(BlastToMerge.vd, agrs, Laya.Handler.create(this, this.Complete), null);
  3706. }
  3707. Complete() {
  3708. InGameView.Instance.SkillNumRefresh();
  3709. ViewManager.Instance.ClosePopView(ViewType.GetRewardView);
  3710. }
  3711. }
  3712. var ViewType;
  3713. (function (ViewType) {
  3714. ViewType[ViewType["MainView"] = 0] = "MainView";
  3715. ViewType[ViewType["SignView"] = 1] = "SignView";
  3716. ViewType[ViewType["SetView"] = 2] = "SetView";
  3717. ViewType[ViewType["LotteryView"] = 3] = "LotteryView";
  3718. ViewType[ViewType["InGameView"] = 4] = "InGameView";
  3719. ViewType[ViewType["RankView"] = 5] = "RankView";
  3720. ViewType[ViewType["WinView"] = 6] = "WinView";
  3721. ViewType[ViewType["FailureView"] = 7] = "FailureView";
  3722. ViewType[ViewType["ReviveView"] = 8] = "ReviveView";
  3723. ViewType[ViewType["GetRewardView"] = 9] = "GetRewardView";
  3724. })(ViewType || (ViewType = {}));
  3725. class ViewManager {
  3726. constructor() {
  3727. this.ViewDic = [];
  3728. this.OtherViewDic = [];
  3729. this.ViewSprite = new Laya.Sprite;
  3730. this.OtherViewSprite = new Laya.Sprite;
  3731. ViewManager.ins = this;
  3732. this.Init();
  3733. }
  3734. static get Instance() {
  3735. if (ViewManager.ins) {
  3736. return ViewManager.ins;
  3737. }
  3738. else {
  3739. return new ViewManager();
  3740. }
  3741. }
  3742. Init() {
  3743. this.ViewDic[ViewType.MainView] = MainView;
  3744. this.ViewDic[ViewType.SignView] = SignView;
  3745. this.ViewDic[ViewType.SetView] = SetView;
  3746. this.ViewDic[ViewType.LotteryView] = LotteryView;
  3747. this.ViewDic[ViewType.InGameView] = InGameView;
  3748. this.ViewDic[ViewType.RankView] = RankView;
  3749. this.ViewDic[ViewType.WinView] = WinView;
  3750. this.ViewDic[ViewType.FailureView] = FailureView;
  3751. this.ViewDic[ViewType.ReviveView] = ReviveView;
  3752. Laya.stage.addChild(this.ViewSprite);
  3753. Laya.stage.addChild(this.OtherViewSprite);
  3754. }
  3755. ShowView(_viewtype, data = null) {
  3756. if (this.curView != null) {
  3757. this.curView.Close();
  3758. this.curView.destroy();
  3759. this.curView.removeSelf();
  3760. }
  3761. this.ClearPopViews();
  3762. this.curView = this.CreateView(_viewtype);
  3763. this.curView.name = ViewType[_viewtype];
  3764. this.ViewSprite.addChild(this.curView);
  3765. this.curView.Show(data);
  3766. }
  3767. CloseView() {
  3768. if (this.curView != null) {
  3769. this.curView.Close();
  3770. this.curView.destroy();
  3771. this.curView.removeSelf();
  3772. }
  3773. }
  3774. OpenPopView(viewType, data = null) {
  3775. GuangGao.Clear();
  3776. var popView;
  3777. if (this.OtherViewDic[viewType]) {
  3778. popView = this.OtherViewDic[viewType];
  3779. this.OtherViewSprite.setChildIndex(popView, this.OtherViewSprite.numChildren - 1);
  3780. popView.visible = true;
  3781. }
  3782. else {
  3783. popView = this.CreateView(viewType);
  3784. this.OtherViewSprite.addChild(popView);
  3785. this.OtherViewDic[viewType] = popView;
  3786. }
  3787. popView.Show(data);
  3788. }
  3789. ClosePopView(viewType) {
  3790. var popView = this.OtherViewDic[viewType];
  3791. if (popView == null) {
  3792. return;
  3793. }
  3794. GuangGao.Clear();
  3795. popView.Close();
  3796. popView.visible = false;
  3797. }
  3798. ClearPopViews() {
  3799. GuangGao.Clear();
  3800. this.ClosePopView(ViewType.WinView);
  3801. this.ClosePopView(ViewType.FailureView);
  3802. this.ClosePopView(ViewType.ReviveView);
  3803. }
  3804. CreateView(_viewtype) {
  3805. switch (_viewtype) {
  3806. case ViewType.MainView:
  3807. return new MainView();
  3808. case ViewType.InGameView:
  3809. return new InGameView();
  3810. case ViewType.SetView:
  3811. return new SetView();
  3812. case ViewType.RankView:
  3813. return new RankView();
  3814. case ViewType.SignView:
  3815. return new SignView();
  3816. case ViewType.LotteryView:
  3817. return new LotteryView();
  3818. case ViewType.FailureView:
  3819. return new FailureView();
  3820. case ViewType.WinView:
  3821. return new WinView();
  3822. case ViewType.ReviveView:
  3823. return new ReviveView();
  3824. case ViewType.GetRewardView:
  3825. return new SetView$1();
  3826. }
  3827. return null;
  3828. }
  3829. }
  3830. class GameControl {
  3831. constructor() {
  3832. GameControl.ins = this;
  3833. this.Init();
  3834. }
  3835. static get Instance() {
  3836. if (GameControl.ins) {
  3837. return GameControl.ins;
  3838. }
  3839. else {
  3840. return new GameControl();
  3841. }
  3842. }
  3843. Init() {
  3844. EventManager.StageOn(StageMode.Start, this, this.GameStart);
  3845. EventManager.StageOn(StageMode.Lose, this, this.GameLose);
  3846. EventManager.StageOn(StageMode.Win, this, this.GameWin);
  3847. }
  3848. GameStart() {
  3849. ViewManager.Instance.ShowView(ViewType.InGameView);
  3850. if (DropRule.Instance.STAGE == 1) {
  3851. DropRule.Instance.GuideFallDown();
  3852. return;
  3853. }
  3854. if (DropRule.Instance.progress.length > 1 && GameManager.Instance.First) {
  3855. DropRule.Instance.RecoverScene();
  3856. GameManager.Instance.First = false;
  3857. }
  3858. else {
  3859. DropRule.Instance.FallDown(DropRule.Instance.StartNum);
  3860. }
  3861. }
  3862. GameLose() {
  3863. if (GameManager.Instance.ReviveNum > 0) {
  3864. ViewManager.Instance.OpenPopView(ViewType.ReviveView);
  3865. GameManager.Instance.ReviveNum--;
  3866. }
  3867. else {
  3868. ViewManager.Instance.OpenPopView(ViewType.FailureView);
  3869. }
  3870. }
  3871. GameWin() {
  3872. ViewManager.Instance.OpenPopView(ViewType.WinView);
  3873. }
  3874. }
  3875. class LoadView {
  3876. constructor() {
  3877. this.Login();
  3878. new GameControl();
  3879. new GameManager();
  3880. }
  3881. static get Instance() {
  3882. if (LoadView.ins) {
  3883. return LoadView.ins;
  3884. }
  3885. else {
  3886. return new LoadView();
  3887. }
  3888. }
  3889. Login() {
  3890. if (Laya.Browser.onWeiXin) {
  3891. this.WXLogin();
  3892. }
  3893. else {
  3894. this.LocalLogin();
  3895. }
  3896. }
  3897. WXLogin() {
  3898. if (Laya.Browser.onWeiXin) {
  3899. WXSDK.DengLu((res) => {
  3900. if (res != "error") {
  3901. console.log("1微信登录成功:" + res);
  3902. this.LocalLogin();
  3903. }
  3904. else {
  3905. this.WXLogin();
  3906. }
  3907. });
  3908. }
  3909. else {
  3910. this.LocalLogin();
  3911. ServerManager.Instance.Login(null, Laya.Handler.create(this, this.LoginComplete), Laya.Handler.create(this, this.LoginFail));
  3912. }
  3913. }
  3914. LocalLogin() {
  3915. ServerManager.Instance.Login(null, Laya.Handler.create(this, this.LoginComplete), Laya.Handler.create(this, this.LoginFail));
  3916. }
  3917. LoginComplete() {
  3918. console.log("本地服务器登陆成功");
  3919. this.LoadSubPackage();
  3920. }
  3921. LoginFail(e) {
  3922. console.log("本地服务器登陆失败");
  3923. console.log(e);
  3924. }
  3925. LoadSubPackage() {
  3926. WXSDK.LoadSubPackage("Game", callback => {
  3927. if (callback) {
  3928. new DropRule();
  3929. ViewManager.Instance.ShowView(ViewType.MainView);
  3930. }
  3931. });
  3932. }
  3933. }
  3934. class Main$1 {
  3935. constructor() {
  3936. if (CheckMain.Creat)
  3937. return;
  3938. CheckMain.Creat = true;
  3939. if (window["Laya3D"])
  3940. Laya3D.init(GameConfig.width, GameConfig.height);
  3941. else
  3942. Laya.init(GameConfig.width, GameConfig.height, Laya["WebGL"]);
  3943. Laya["Physics"] && Laya["Physics"].enable();
  3944. Laya["DebugPanel"] && Laya["DebugPanel"].enable();
  3945. Laya.stage.scaleMode = GameConfig.scaleMode;
  3946. Laya.stage.screenMode = GameConfig.screenMode;
  3947. Laya.stage.alignV = GameConfig.alignV;
  3948. Laya.stage.alignH = GameConfig.alignH;
  3949. Laya.URL.exportSceneToJson = GameConfig.exportSceneToJson;
  3950. if (GameConfig.debug || Laya.Utils.getQueryString("debug") == "true")
  3951. Laya.enableDebugPanel();
  3952. if (GameConfig.physicsDebug && Laya["PhysicsDebugDraw"])
  3953. Laya["PhysicsDebugDraw"].enable();
  3954. if (GameConfig.stat)
  3955. Laya.Stat.show();
  3956. Laya.alertGlobalError = true;
  3957. if (Laya.Browser.onWeiXin) {
  3958. Laya.Browser.window.wx.showShareMenu({
  3959. withShareTicket: true
  3960. });
  3961. Laya.Browser.window.wx.onShareAppMessage(function () {
  3962. return {
  3963. title: "试一下你的脑力能到第几关",
  3964. imageUrl: "Game/res/Share/fx.png",
  3965. };
  3966. });
  3967. Laya.Browser.window.wx.onShow((option) => {
  3968. var shareTicket = option.shareTicket;
  3969. var userId = option.query.userId;
  3970. var shareTitle = option.query.shareTitle;
  3971. Main$1.SceneNum = option.scene;
  3972. WXSDK.querychannel = option.query.channel;
  3973. WXSDK.shareOpenId = option.query.userId;
  3974. console.log("option---", option);
  3975. console.log("scene:", option.scene);
  3976. if (WXSDK.querychannel != null) {
  3977. console.log("onShow channel is:", WXSDK.querychannel);
  3978. }
  3979. if (option.referrerInfo) {
  3980. WXSDK.referrerInfoappId = option.referrerInfo.appId;
  3981. console.log("onShow appId is:", option.referrerInfo.appId);
  3982. }
  3983. });
  3984. const updateManager = Laya.Browser.window.wx.getUpdateManager();
  3985. updateManager.onCheckForUpdate(function (res) {
  3986. console.log("最新版本:" + res.hasUpdate);
  3987. });
  3988. updateManager.onUpdateReady(function () {
  3989. Laya.Browser.window.wx.showModal({
  3990. showCancel: false,
  3991. title: '更新提示',
  3992. content: '新版本已经准备好,是否重启应用?',
  3993. success(res) {
  3994. updateManager.applyUpdate();
  3995. },
  3996. fail(res) {
  3997. updateManager.applyUpdate();
  3998. }
  3999. });
  4000. });
  4001. }
  4002. Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION);
  4003. }
  4004. onVersionLoaded() {
  4005. Laya.AtlasInfoManager.enable("fileconfig.json", Laya.Handler.create(this, this.onConfigLoaded));
  4006. }
  4007. onConfigLoaded() {
  4008. new LoadView();
  4009. }
  4010. }
  4011. Main$1.Ver = "1.0.3";
  4012. Main$1.CFG = "123";
  4013. Main$1.SceneNum = "000";
  4014. new Main$1();
  4015. exports.Main = Main$1;
  4016. return exports;
  4017. }({}));
  4018. //# sourceMappingURL=bundle.js.map