bundle.js 192 KB

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