index.js 265 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009
  1. System.register("chunks:///_virtual/Container_Manager.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ch_util.ts', './ui.ts', './table_level.ts', './Hall.ts', './UI_Idioms.ts', './UI_Main.ts', './CreateIdiom.ts', './Cube_Infor.ts', './GameCtl.ts', './ch.ts', './table_idiom_order.ts', './table_idiom_unorder_1_3.ts', './table_idiom_unorder_2_2.ts', './table_idiom_unorder_3_1.ts', './table_level_2.ts'], function (exports) {
  2. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Node, Prefab, NodePool, instantiate, Component, RigidBody, BoxCollider, Quat, tween, Vec3, ch_util, gui, table_level, Hall, UI_Idioms, UI_Main, CreateIdiom, Cube_Infor, Cube_State, GameCtl, ch, table_idiom_order, table_idiom_unorder_1_3, table_idiom_unorder_2_2, table_idiom_unorder_3_1, table_level_2;
  3. return {
  4. setters: [function (module) {
  5. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  6. _inheritsLoose = module.inheritsLoose;
  7. _initializerDefineProperty = module.initializerDefineProperty;
  8. _assertThisInitialized = module.assertThisInitialized;
  9. _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
  10. _asyncToGenerator = module.asyncToGenerator;
  11. _regeneratorRuntime = module.regeneratorRuntime;
  12. }, function (module) {
  13. cclegacy = module.cclegacy;
  14. _decorator = module._decorator;
  15. Node = module.Node;
  16. Prefab = module.Prefab;
  17. NodePool = module.NodePool;
  18. instantiate = module.instantiate;
  19. Component = module.Component;
  20. RigidBody = module.RigidBody;
  21. BoxCollider = module.BoxCollider;
  22. Quat = module.Quat;
  23. tween = module.tween;
  24. Vec3 = module.Vec3;
  25. }, function (module) {
  26. ch_util = module.default;
  27. }, function (module) {
  28. gui = module.gui;
  29. }, function (module) {
  30. table_level = module.table_level;
  31. }, function (module) {
  32. Hall = module.Hall;
  33. }, function (module) {
  34. UI_Idioms = module.UI_Idioms;
  35. }, function (module) {
  36. UI_Main = module.UI_Main;
  37. }, function (module) {
  38. CreateIdiom = module.CreateIdiom;
  39. }, function (module) {
  40. Cube_Infor = module.Cube_Infor;
  41. Cube_State = module.Cube_State;
  42. }, function (module) {
  43. GameCtl = module.GameCtl;
  44. }, function (module) {
  45. ch = module.ch;
  46. }, function (module) {
  47. table_idiom_order = module.table_idiom_order;
  48. }, function (module) {
  49. table_idiom_unorder_1_3 = module.table_idiom_unorder_1_3;
  50. }, function (module) {
  51. table_idiom_unorder_2_2 = module.table_idiom_unorder_2_2;
  52. }, function (module) {
  53. table_idiom_unorder_3_1 = module.table_idiom_unorder_3_1;
  54. }, function (module) {
  55. table_level_2 = module.table_level_2;
  56. }],
  57. execute: function () {
  58. var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
  59. cclegacy._RF.push({}, "e84de8IXbZDjZbYlbQpevuI", "Container_Manager", undefined);
  60. var ccclass = _decorator.ccclass,
  61. property = _decorator.property;
  62. var Container_Manager = exports('Container_Manager', (_dec = ccclass('Container_Manager'), _dec2 = property([Node]), _dec3 = property([Prefab]), _dec4 = property(CreateIdiom), _dec5 = property([Node]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  63. _inheritsLoose(Container_Manager, _Component);
  64. function Container_Manager() {
  65. var _this;
  66. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  67. args[_key] = arguments[_key];
  68. }
  69. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  70. _this.canTouch = false;
  71. _initializerDefineProperty(_this, "Lock_node", _descriptor, _assertThisInitialized(_this));
  72. _initializerDefineProperty(_this, "prefabs", _descriptor2, _assertThisInitialized(_this));
  73. _this.level_config = null;
  74. //关卡配置
  75. _this.level2_config = null;
  76. //第二关配置
  77. _this.config = null;
  78. //有规律的成语库
  79. _this.config_1_3 = null;
  80. //无规律1+3
  81. _this.config_2_2 = null;
  82. //无规律2+2
  83. _this.config_3_1 = null;
  84. //无规律3+1
  85. _this.idioms = [];
  86. //生成的成语
  87. _this.index = [];
  88. //生成的成语角标,避免生成重复成语
  89. _initializerDefineProperty(_this, "create_node", _descriptor3, _assertThisInitialized(_this));
  90. _initializerDefineProperty(_this, "nodes", _descriptor4, _assertThisInitialized(_this));
  91. //位置节点 用于成语放入
  92. _this.node_isIdiom = new Array(9).fill(false);
  93. _this.unlock_Num = 7;
  94. _this.is_Show_UI_Lock = false;
  95. _this.idiom_combine = new Map();
  96. _this.Cube_Pool = new NodePool();
  97. _this.nodeReferences = [];
  98. // 额外维护的节点引用数组
  99. _this.count = 0;
  100. return _this;
  101. }
  102. var _proto = Container_Manager.prototype;
  103. _proto.instantiateCube = function instantiateCube() {
  104. for (var i = 0; i < this.idioms.length * 2; i++) {
  105. var idiomIndex = Math.floor(i / 2);
  106. var isPiece1 = i % 2 === 0;
  107. var Text_Length = isPiece1 ? this.idioms[idiomIndex].piece_1_word.length : this.idioms[idiomIndex].piece_2_word.length;
  108. var newCube = instantiate(this.prefabs[Text_Length - 1]);
  109. newCube.active = true; // 初始时设置为非激活状态
  110. // 按顺序为节点赋值文字内容
  111. newCube.getComponent(Cube_Infor).Text = isPiece1 ? this.idioms[idiomIndex].piece_1_word : this.idioms[idiomIndex].piece_2_word;
  112. console.log("生成第" + i + "个节点:" + newCube.getComponent(Cube_Infor).Text);
  113. this.Cube_Pool.put(newCube);
  114. }
  115. };
  116. _proto.getCube = function getCube() {
  117. console.log(this.Cube_Pool.size());
  118. var cube = this.Cube_Pool.get();
  119. if (cube) cube.active = true;
  120. return cube;
  121. }
  122. // 将方块回收到对象池
  123. ;
  124. _proto.recycleCube = function recycleCube(cube) {
  125. cube.active = false; // 将方块设置为非激活状态
  126. this.Cube_Pool.put(cube);
  127. }
  128. //清空对象池
  129. ;
  130. _proto.clearCubePool = function clearCubePool() {
  131. this.Cube_Pool.clear();
  132. }
  133. //合成规则导入
  134. ;
  135. _proto.start = function start() {
  136. this.config = table_idiom_order.getList();
  137. this.config_1_3 = table_idiom_unorder_1_3.getList();
  138. this.config_2_2 = table_idiom_unorder_2_2.getList();
  139. this.config_3_1 = table_idiom_unorder_3_1.getList();
  140. console.log(this.config.length);
  141. console.log(this.config_1_3.length);
  142. console.log(this.config_2_2.length);
  143. console.log(this.config_3_1.length);
  144. this.level_config = table_level.getList();
  145. this.level2_config = table_level_2.getList();
  146. // if (this.level_config.length === 5) {
  147. // console.log("关卡配置导入成功");
  148. // }
  149. this.level_idioms();
  150. };
  151. _proto.update = function update(deltaTime) {};
  152. _proto.checkIdiom_Combine = function checkIdiom_Combine(matchedcube2, outMatchedCubes) {
  153. var _this2 = this;
  154. if (this.idiom_combine.size < 2) {
  155. return false; // 至少需要两个方块
  156. }
  157. var _loop = function _loop() {
  158. var cube = _step.value;
  159. // 遍历 idioms 列表,检查是否匹配成语
  160. var matchedIdiom = _this2.idioms.find(function (idiom) {
  161. return idiom.piece_1_word === cube.Text && idiom.piece_2_word === matchedcube2.Text;
  162. });
  163. if (matchedIdiom) {
  164. // 匹配成功
  165. outMatchedCubes.push(cube, matchedcube2);
  166. _this2.nodeReferences = _this2.nodeReferences.filter(function (el) {
  167. return el !== matchedcube2.node && el !== cube.node;
  168. });
  169. console.log("成功拼成成语: " + matchedIdiom.piece_1_word + matchedIdiom.piece_2_word);
  170. return {
  171. v: true
  172. };
  173. }
  174. // 再检查逆序组合是否匹配
  175. var reverseMatchedIdiom = _this2.idioms.find(function (idiom) {
  176. return idiom.piece_1_word === matchedcube2.Text && idiom.piece_2_word === cube.Text;
  177. });
  178. if (reverseMatchedIdiom) {
  179. // 匹配成功
  180. outMatchedCubes.push(matchedcube2, cube);
  181. _this2.nodeReferences = _this2.nodeReferences.filter(function (el) {
  182. return el !== matchedcube2.node && el !== cube.node;
  183. });
  184. console.log("成功拼成成语: " + reverseMatchedIdiom.piece_1_word + reverseMatchedIdiom.piece_2_word);
  185. return {
  186. v: true
  187. };
  188. }
  189. },
  190. _ret;
  191. for (var _iterator = _createForOfIteratorHelperLoose(this.idiom_combine.keys()), _step; !(_step = _iterator()).done;) {
  192. _ret = _loop();
  193. if (_ret) return _ret.v;
  194. }
  195. return false; // 没有匹配到成语
  196. };
  197. _proto.level_idioms = /*#__PURE__*/function () {
  198. var _level_idioms = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  199. var _this3 = this;
  200. var level, str2, idiom_type_2, selectedIdioms, rule, _this$idioms, _loop2, i, _loop3, _i, str1, idiom_type_1, _str, _idiom_type_, count, _selectedIdioms, _rule, _this$idioms2, filteredIdioms, _i4, rand, selectedIdiom, _filteredIdioms, _i5, _rand, _selectedIdiom, _filteredIdioms2, _i6, _rand2, _selectedIdiom2, _filteredIdioms3, _i7, _rand3, _selectedIdiom3, _filteredIdioms4, _i8, _rand4, _selectedIdiom4, _filteredIdioms5, _i9, _rand5, _selectedIdiom5;
  201. return _regeneratorRuntime().wrap(function _callee$(_context3) {
  202. while (1) switch (_context3.prev = _context3.next) {
  203. case 0:
  204. this.Lock_node.forEach(function (node) {
  205. node.active = true;
  206. });
  207. this.unlock_Num = 7;
  208. this.is_Show_UI_Lock = false;
  209. this.canTouch = false;
  210. level = Hall.getInstance().player.get_max_floor();
  211. this.clearCubePool();
  212. if (!(level === 0)) {
  213. _context3.next = 16;
  214. break;
  215. }
  216. str2 = this.level_config[level].idiom_type_2;
  217. idiom_type_2 = str2.split("_");
  218. console.log("idiom_type_2:", idiom_type_2);
  219. selectedIdioms = {};
  220. [].concat(idiom_type_2).forEach(function (rule) {
  221. var filteredIdioms = _this3.config.filter(function (item) {
  222. return item.piece_2_word === rule;
  223. });
  224. if (filteredIdioms.length === 0) {
  225. filteredIdioms = _this3.config_2_2.filter(function (item) {
  226. return item.piece_2_word === rule;
  227. });
  228. }
  229. console.log("\u7B5B\u90092 " + rule + " \u540E\u7684\u6210\u8BED\uFF1A", filteredIdioms);
  230. selectedIdioms[rule] = filteredIdioms;
  231. });
  232. for (rule in selectedIdioms) {
  233. if (selectedIdioms.hasOwnProperty(rule)) {
  234. (_this$idioms = this.idioms).push.apply(_this$idioms, selectedIdioms[rule]);
  235. }
  236. }
  237. console.log("最终选中的成语:", this.idioms);
  238. _context3.next = 51;
  239. break;
  240. case 16:
  241. if (!(level === 1)) {
  242. _context3.next = 33;
  243. break;
  244. }
  245. _loop2 = /*#__PURE__*/_regeneratorRuntime().mark(function _loop2(i) {
  246. var _this3$idioms;
  247. var filteredIdiom;
  248. return _regeneratorRuntime().wrap(function _loop2$(_context) {
  249. while (1) switch (_context.prev = _context.next) {
  250. case 0:
  251. filteredIdiom = _this3.config.filter(function (item) {
  252. return item.idiom == _this3.level2_config[i].idiom;
  253. });
  254. (_this3$idioms = _this3.idioms).push.apply(_this3$idioms, filteredIdiom);
  255. case 2:
  256. case "end":
  257. return _context.stop();
  258. }
  259. }, _loop2);
  260. });
  261. i = 0;
  262. case 19:
  263. if (!(i < 30)) {
  264. _context3.next = 24;
  265. break;
  266. }
  267. return _context3.delegateYield(_loop2(i), "t0", 21);
  268. case 21:
  269. i++;
  270. _context3.next = 19;
  271. break;
  272. case 24:
  273. _loop3 = /*#__PURE__*/_regeneratorRuntime().mark(function _loop3(_i) {
  274. var _this3$idioms2;
  275. var filteredIdiom;
  276. return _regeneratorRuntime().wrap(function _loop3$(_context2) {
  277. while (1) switch (_context2.prev = _context2.next) {
  278. case 0:
  279. filteredIdiom = _this3.config_2_2.filter(function (item) {
  280. return item.idiom == _this3.level2_config[_i].idiom;
  281. });
  282. (_this3$idioms2 = _this3.idioms).push.apply(_this3$idioms2, filteredIdiom);
  283. case 2:
  284. case "end":
  285. return _context2.stop();
  286. }
  287. }, _loop3);
  288. });
  289. _i = 30;
  290. case 26:
  291. if (!(_i < 40)) {
  292. _context3.next = 31;
  293. break;
  294. }
  295. return _context3.delegateYield(_loop3(_i), "t1", 28);
  296. case 28:
  297. _i++;
  298. _context3.next = 26;
  299. break;
  300. case 31:
  301. _context3.next = 51;
  302. break;
  303. case 33:
  304. // 获取当前层级的筛选条件
  305. str1 = this.level_config[level].idiom_type_1;
  306. idiom_type_1 = str1.split("_"); // 分割成数组
  307. console.log("idiom_type_1:", idiom_type_1);
  308. _str = this.level_config[level].idiom_type_2;
  309. _idiom_type_ = _str.split("_"); // 分割成数组
  310. console.log("idiom_type_2:", _idiom_type_);
  311. count = this.level_config[level].count / (idiom_type_1.length + _idiom_type_.length); // 初始化保存结果的数组
  312. _selectedIdioms = {}; // 遍历 idiom_type_1的每个规律
  313. [].concat(idiom_type_1).forEach(function (rule) {
  314. // 从 config 中筛选符合当前规律的成语
  315. var filteredIdioms = _this3.config.filter(function (item) {
  316. return item.piece_1_word === rule;
  317. });
  318. console.log("\u7B5B\u9009 " + rule + " \u540E\u7684\u6210\u8BED\uFF1A", filteredIdioms);
  319. if (filteredIdioms.length < count) {
  320. console.error("\u89C4\u5F8B " + rule + " \u7684\u6210\u8BED\u6570\u91CF\u4E0D\u8DB3\uFF0C\u4EC5\u6709 " + filteredIdioms.length + " \u4E2A");
  321. } else {
  322. console.log("\u89C4\u5F8B " + rule + " \u7684\u6210\u8BED\u6570\u91CF\uFF1A" + filteredIdioms.length);
  323. var selected = [];
  324. // 随机选择不重复的成语
  325. for (var _i2 = 0; _i2 < count;) {
  326. var rand = ch_util.getRandomInt(0, filteredIdioms.length - 1); // 确保 rand 在有效范围内
  327. var selectedIdiom = filteredIdioms[rand];
  328. // 从数组中移除已选成语,避免再次选择
  329. filteredIdioms.splice(rand, 1);
  330. // 添加到已选数组中
  331. selected.push(selectedIdiom);
  332. console.log("\u9009\u4E2D\u7684\u6210\u8BED\uFF1A" + selectedIdiom.idiom);
  333. _i2++;
  334. }
  335. _selectedIdioms[rule] = selected;
  336. }
  337. });
  338. // 遍历idiom_type_2 的每个规律
  339. [].concat(_idiom_type_).forEach(function (rule) {
  340. // 从 config 中筛选符合当前规律的成语
  341. var filteredIdioms = _this3.config.filter(function (item) {
  342. return item.piece_2_word === rule;
  343. });
  344. console.log("\u7B5B\u90092 " + rule + " \u540E\u7684\u6210\u8BED\uFF1A", filteredIdioms);
  345. if (filteredIdioms.length < count) {
  346. console.error("\u89C4\u5F8B2 " + rule + " \u7684\u6210\u8BED\u6570\u91CF\u4E0D\u8DB3\uFF0C\u4EC5\u6709 " + filteredIdioms.length + " \u4E2A");
  347. } else {
  348. console.log("\u89C4\u5F8B2 " + rule + " \u7684\u6210\u8BED\u6570\u91CF\uFF1A" + filteredIdioms.length);
  349. var selected = [];
  350. // 随机选择不重复的成语
  351. for (var _i3 = 0; _i3 < count;) {
  352. var rand = ch_util.getRandomInt(0, filteredIdioms.length - 1); // 确保 rand 在有效范围内
  353. var selectedIdiom = filteredIdioms[rand];
  354. // 从数组中移除已选成语,避免再次选择
  355. filteredIdioms.splice(rand, 1);
  356. // 添加到已选数组中
  357. selected.push(selectedIdiom);
  358. console.log("\u9009\u4E2D\u7684\u6210\u8BED\uFF1A" + selectedIdiom.idiom);
  359. _i3++;
  360. }
  361. _selectedIdioms[rule] = selected;
  362. }
  363. });
  364. // 将所有选中的成语合并到 idioms 数组
  365. for (_rule in _selectedIdioms) {
  366. if (_selectedIdioms.hasOwnProperty(_rule)) {
  367. (_this$idioms2 = this.idioms).push.apply(_this$idioms2, _selectedIdioms[_rule]); // 使用扩展运算符合并成语
  368. }
  369. }
  370. //
  371. if (this.level_config[level].easy_1_3 > 0) {
  372. filteredIdioms = this.config_1_3.filter(function (item) {
  373. return item.difficulty === "easy";
  374. });
  375. for (_i4 = 0; _i4 < this.level_config[level].easy_1_3; _i4++) {
  376. rand = ch_util.getRandomInt(0, filteredIdioms.length - 1);
  377. selectedIdiom = filteredIdioms[rand];
  378. filteredIdioms.splice(rand, 1);
  379. this.idioms.push(selectedIdiom);
  380. }
  381. }
  382. if (this.level_config[level].hard_1_3 > 0) {
  383. _filteredIdioms = this.config_1_3.filter(function (item) {
  384. return item.difficulty === "hard";
  385. });
  386. for (_i5 = 0; _i5 < this.level_config[level].hard_1_3; _i5++) {
  387. _rand = ch_util.getRandomInt(0, _filteredIdioms.length - 1);
  388. _selectedIdiom = _filteredIdioms[_rand];
  389. _filteredIdioms.splice(_rand, 1);
  390. this.idioms.push(_selectedIdiom);
  391. }
  392. }
  393. if (this.level_config[level].easy_2_2 > 0) {
  394. _filteredIdioms2 = this.config_2_2.filter(function (item) {
  395. return item.difficulty === "easy";
  396. });
  397. for (_i6 = 0; _i6 < this.level_config[level].easy_2_2; _i6++) {
  398. _rand2 = ch_util.getRandomInt(0, _filteredIdioms2.length - 1);
  399. _selectedIdiom2 = _filteredIdioms2[_rand2];
  400. _filteredIdioms2.splice(_rand2, 1);
  401. this.idioms.push(_selectedIdiom2);
  402. }
  403. }
  404. if (this.level_config[level].hard_2_2 > 0) {
  405. _filteredIdioms3 = this.config_2_2.filter(function (item) {
  406. return item.difficulty === "hard";
  407. });
  408. for (_i7 = 0; _i7 < this.level_config[level].hard_2_2; _i7++) {
  409. _rand3 = ch_util.getRandomInt(0, _filteredIdioms3.length - 1);
  410. _selectedIdiom3 = _filteredIdioms3[_rand3];
  411. _filteredIdioms3.splice(_rand3, 1);
  412. this.idioms.push(_selectedIdiom3);
  413. }
  414. }
  415. if (this.level_config[level].easy_3_1 > 0) {
  416. _filteredIdioms4 = this.config_3_1.filter(function (item) {
  417. return item.difficulty === "easy";
  418. });
  419. for (_i8 = 0; _i8 < this.level_config[level].easy_3_1; _i8++) {
  420. _rand4 = ch_util.getRandomInt(0, _filteredIdioms4.length - 1);
  421. _selectedIdiom4 = _filteredIdioms4[_rand4];
  422. _filteredIdioms4.splice(_rand4, 1);
  423. this.idioms.push(_selectedIdiom4);
  424. }
  425. }
  426. if (this.level_config[level].hard_1_3 > 0) {
  427. _filteredIdioms5 = this.config_1_3.filter(function (item) {
  428. return item.difficulty === "hard";
  429. });
  430. for (_i9 = 0; _i9 < this.level_config[level].hard_1_3; _i9++) {
  431. _rand5 = ch_util.getRandomInt(0, _filteredIdioms5.length - 1);
  432. _selectedIdiom5 = _filteredIdioms5[_rand5];
  433. _filteredIdioms5.splice(_rand5, 1);
  434. this.idioms.push(_selectedIdiom5);
  435. }
  436. }
  437. console.log("最终选中的成语:", this.idioms);
  438. // 打印最终的成语数组
  439. case 51:
  440. this.count = this.level_config[level].total;
  441. _context3.next = 54;
  442. return this.instantiateCube();
  443. case 54:
  444. _context3.next = 56;
  445. return gui.show(UI_Idioms);
  446. case 56:
  447. _context3.next = 58;
  448. return this.create_node.nodeMoving();
  449. case 58:
  450. gui.show(UI_Main);
  451. case 59:
  452. case "end":
  453. return _context3.stop();
  454. }
  455. }, _callee, this);
  456. }));
  457. function level_idioms() {
  458. return _level_idioms.apply(this, arguments);
  459. }
  460. return level_idioms;
  461. }() //消除一组
  462. ;
  463. _proto.eliminate = function eliminate() {
  464. var _this4 = this;
  465. //先判断槽内是否有方块,如果有,匹配槽内最前面一个与散落方块中的
  466. var cube;
  467. for (var _iterator2 = _createForOfIteratorHelperLoose(this.idiom_combine), _step2; !(_step2 = _iterator2()).done;) {
  468. var _step2$value = _step2.value,
  469. key = _step2$value[0],
  470. value = _step2$value[1];
  471. if (value === 0) {
  472. cube = key;
  473. break;
  474. }
  475. }
  476. //槽中有方块
  477. if (cube) {
  478. var originalReferences = [].concat(this.nodeReferences);
  479. var _loop4 = function _loop4() {
  480. var element = _step3.value;
  481. if (_this4.idioms.find(function (c) {
  482. return c.idiom == element.getComponent(Cube_Infor).Text + cube.Text;
  483. }) && element.getComponent(Cube_Infor) !== cube) {
  484. console.log(element.getComponent(Cube_Infor).Text);
  485. element.getComponent(Cube_Infor).state = Cube_State.wait;
  486. element.getComponent(Cube_Infor).rigidbody.type = RigidBody.Type.STATIC;
  487. element.getComponent(BoxCollider).enabled = false;
  488. var targetRotation = new Quat();
  489. Quat.fromEuler(targetRotation, -90, 0, 0);
  490. element.rotation = targetRotation;
  491. // 使用filter过滤掉当前元素
  492. GameCtl.instance.combine_ani(element.getComponent(Cube_Infor), cube);
  493. _this4.nodeReferences = _this4.nodeReferences.filter(function (el) {
  494. return el !== element && el !== cube.node;
  495. });
  496. return 0; // break
  497. } else if (_this4.idioms.find(function (c) {
  498. return c.idiom == cube.Text + element.getComponent(Cube_Infor).Text;
  499. }) && element.getComponent(Cube_Infor) !== cube) {
  500. console.log(element.getComponent(Cube_Infor).Text);
  501. element.getComponent(Cube_Infor).state = Cube_State.wait;
  502. element.getComponent(Cube_Infor).rigidbody.type = RigidBody.Type.STATIC;
  503. element.getComponent(BoxCollider).enabled = false;
  504. var _targetRotation = new Quat();
  505. Quat.fromEuler(_targetRotation, -90, 0, 0);
  506. element.rotation = _targetRotation;
  507. GameCtl.instance.combine_ani(cube, element.getComponent(Cube_Infor));
  508. _this4.nodeReferences = _this4.nodeReferences.filter(function (el) {
  509. return el !== element && el !== cube.node;
  510. });
  511. return 0; // break
  512. }
  513. },
  514. _ret2;
  515. for (var _iterator3 = _createForOfIteratorHelperLoose(originalReferences), _step3; !(_step3 = _iterator3()).done;) {
  516. _ret2 = _loop4();
  517. if (_ret2 === 0) break;
  518. }
  519. }
  520. //槽中没有方块
  521. else {
  522. var flag = false;
  523. var originalReferences1 = [].concat(this.nodeReferences);
  524. var originalReferences2 = [].concat(this.nodeReferences);
  525. var _loop5 = function _loop5() {
  526. var element1 = _step4.value;
  527. var _loop6 = function _loop6() {
  528. var element2 = _step5.value;
  529. if (_this4.idioms.find(function (c) {
  530. return c.idiom == element1.getComponent(Cube_Infor).Text + element2.getComponent(Cube_Infor).Text;
  531. })) {
  532. element1.getComponent(Cube_Infor).state = Cube_State.wait;
  533. element1.getComponent(Cube_Infor).rigidbody.type = RigidBody.Type.STATIC;
  534. var targetRotation = new Quat();
  535. Quat.fromEuler(targetRotation, -90, 0, 0);
  536. element1.rotation = targetRotation;
  537. element2.getComponent(Cube_Infor).state = Cube_State.wait;
  538. element2.getComponent(Cube_Infor).rigidbody.type = RigidBody.Type.STATIC;
  539. element2.getComponent(BoxCollider).enabled = false;
  540. element2.rotation = targetRotation;
  541. // 使用filter过滤掉当前元素
  542. GameCtl.instance.combine_ani(element1.getComponent(Cube_Infor), element2.getComponent(Cube_Infor));
  543. _this4.nodeReferences = _this4.nodeReferences.filter(function (el) {
  544. return el !== element1 && el !== element2;
  545. });
  546. flag = true;
  547. return 0; // break
  548. }
  549. if (_this4.idioms.find(function (c) {
  550. return c.idiom == element2.getComponent(Cube_Infor).Text + element1.getComponent(Cube_Infor).Text;
  551. })) {
  552. element1.getComponent(Cube_Infor).state = Cube_State.wait;
  553. element1.getComponent(Cube_Infor).rigidbody.type = RigidBody.Type.STATIC;
  554. var _targetRotation2 = new Quat();
  555. Quat.fromEuler(_targetRotation2, -90, 0, 0);
  556. element1.rotation = _targetRotation2;
  557. element2.getComponent(Cube_Infor).state = Cube_State.wait;
  558. element2.getComponent(Cube_Infor).rigidbody.type = RigidBody.Type.STATIC;
  559. element2.getComponent(BoxCollider).enabled = false;
  560. element2.rotation = _targetRotation2;
  561. // 使用filter过滤掉当前元素
  562. GameCtl.instance.combine_ani(element2.getComponent(Cube_Infor), element1.getComponent(Cube_Infor));
  563. _this4.nodeReferences = _this4.nodeReferences.filter(function (el) {
  564. return el !== element1 && el !== element2;
  565. });
  566. flag = true;
  567. return 0; // break
  568. }
  569. },
  570. _ret3;
  571. for (var _iterator5 = _createForOfIteratorHelperLoose(originalReferences2), _step5; !(_step5 = _iterator5()).done;) {
  572. _ret3 = _loop6();
  573. if (_ret3 === 0) break;
  574. }
  575. if (flag === true) {
  576. return 1; // break
  577. }
  578. };
  579. for (var _iterator4 = _createForOfIteratorHelperLoose(originalReferences1), _step4; !(_step4 = _iterator4()).done;) {
  580. if (_loop5()) break;
  581. }
  582. }
  583. };
  584. _proto.shuffle = /*#__PURE__*/function () {
  585. var _shuffle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
  586. var _this5 = this;
  587. return _regeneratorRuntime().wrap(function _callee2$(_context4) {
  588. while (1) switch (_context4.prev = _context4.next) {
  589. case 0:
  590. // 回收所有非槽内的活跃节点
  591. this.nodeReferences.forEach(function (node) {
  592. var cubeInfo = node.getComponent(Cube_Infor);
  593. if (cubeInfo.state === Cube_State.live) {
  594. var targetRotation = new Quat();
  595. Quat.fromEuler(targetRotation, -90, 0, 0);
  596. node.rotation = targetRotation;
  597. _this5.recycleCube(node); // 回收到池中
  598. }
  599. });
  600. this.shufflePool();
  601. // 等待节点移动完成后执行后续逻辑
  602. _context4.next = 4;
  603. return this.create_node.nodeMoving();
  604. case 4:
  605. case "end":
  606. return _context4.stop();
  607. }
  608. }, _callee2, this);
  609. }));
  610. function shuffle() {
  611. return _shuffle.apply(this, arguments);
  612. }
  613. return shuffle;
  614. }() //清空槽子
  615. ;
  616. _proto.Empty = function Empty() {
  617. var _this6 = this;
  618. var _loop7 = function _loop7() {
  619. var idiom = _step6.value;
  620. idiom.state = Cube_State.live;
  621. var posX = ch.util.getRandom(-3, 3);
  622. var posZ = ch.util.getRandom(-3, 3);
  623. tween(idiom.node).to(0.5, {
  624. position: new Vec3(posX, _this6.create_node.node.position.y + 5, posZ)
  625. }).call(function () {
  626. idiom.rigidbody.type = RigidBody.Type.DYNAMIC;
  627. }).start();
  628. //idiom.node.position = ;
  629. };
  630. for (var _iterator6 = _createForOfIteratorHelperLoose(this.idiom_combine.keys()), _step6; !(_step6 = _iterator6()).done;) {
  631. _loop7();
  632. }
  633. this.idiom_combine.clear();
  634. this.node_isIdiom.fill(false);
  635. gui.get(UI_Idioms).all_light_Hide();
  636. };
  637. _proto.AddTime = function AddTime() {
  638. var layout = gui.get(UI_Main).getLayout();
  639. layout.time += 3;
  640. };
  641. _proto.shufflePool = function shufflePool() {
  642. var _this7 = this;
  643. var poolSize = this.Cube_Pool.size();
  644. var tempArray = [];
  645. // 从池中取出所有节点到临时数组
  646. for (var i = 0; i < poolSize; i++) {
  647. tempArray.push(this.Cube_Pool.get());
  648. }
  649. // 只打乱部分节点(以 50% 为例,可调整比例)
  650. var shuffleCount = Math.ceil(poolSize * 0.5); // 只打乱前 50%
  651. for (var _i10 = 0; _i10 < shuffleCount; _i10++) {
  652. var randomIndex = Math.floor(Math.random() * poolSize);
  653. var _ref = [tempArray[randomIndex], tempArray[_i10]];
  654. tempArray[_i10] = _ref[0];
  655. tempArray[randomIndex] = _ref[1];
  656. }
  657. // 将打乱的节点放回池中
  658. tempArray.forEach(function (cube) {
  659. return _this7.Cube_Pool.put(cube);
  660. });
  661. };
  662. return Container_Manager;
  663. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Lock_node", [_dec2], {
  664. configurable: true,
  665. enumerable: true,
  666. writable: true,
  667. initializer: function initializer() {
  668. return [];
  669. }
  670. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "prefabs", [_dec3], {
  671. configurable: true,
  672. enumerable: true,
  673. writable: true,
  674. initializer: function initializer() {
  675. return [];
  676. }
  677. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "create_node", [_dec4], {
  678. configurable: true,
  679. enumerable: true,
  680. writable: true,
  681. initializer: function initializer() {
  682. return null;
  683. }
  684. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "nodes", [_dec5], {
  685. configurable: true,
  686. enumerable: true,
  687. writable: true,
  688. initializer: function initializer() {
  689. return [];
  690. }
  691. })), _class2)) || _class));
  692. cclegacy._RF.pop();
  693. }
  694. };
  695. });
  696. System.register("chunks:///_virtual/CreateIdiom.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Cube_Infor.ts', './Container_Manager.ts'], function (exports) {
  697. var _inheritsLoose, cclegacy, _decorator, find, Vec3, tween, director, Component, Cube_Infor, Cube_State, Container_Manager;
  698. return {
  699. setters: [function (module) {
  700. _inheritsLoose = module.inheritsLoose;
  701. }, function (module) {
  702. cclegacy = module.cclegacy;
  703. _decorator = module._decorator;
  704. find = module.find;
  705. Vec3 = module.Vec3;
  706. tween = module.tween;
  707. director = module.director;
  708. Component = module.Component;
  709. }, function (module) {
  710. Cube_Infor = module.Cube_Infor;
  711. Cube_State = module.Cube_State;
  712. }, function (module) {
  713. Container_Manager = module.Container_Manager;
  714. }],
  715. execute: function () {
  716. var _dec, _class;
  717. cclegacy._RF.push({}, "3b901oU5ZJHnp8TtJiYjZWZ", "CreateIdiom", undefined);
  718. var ccclass = _decorator.ccclass,
  719. property = _decorator.property;
  720. var CreateIdiom = exports('CreateIdiom', (_dec = ccclass('CreateIdiom'), _dec(_class = /*#__PURE__*/function (_Component) {
  721. _inheritsLoose(CreateIdiom, _Component);
  722. function CreateIdiom() {
  723. var _this;
  724. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  725. args[_key] = arguments[_key];
  726. }
  727. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  728. _this.count = 0;
  729. _this.Container = void 0;
  730. return _this;
  731. }
  732. var _proto = CreateIdiom.prototype;
  733. _proto.onLoad = function onLoad() {
  734. this.Container = find('Container').getComponent(Container_Manager);
  735. };
  736. _proto.update = function update(deltaTime) {};
  737. _proto.nodeMoving = function nodeMoving() {
  738. var _this2 = this;
  739. this.node.setPosition(new Vec3(0, 1.6, 0));
  740. var startPos = this.node.position; // 起点,抛物线开始的坐标
  741. var middlePos = new Vec3(this.node.position.x, this.node.position.y + 1, 0); // 中间控制点
  742. var destPos = new Vec3(this.node.position.x, this.node.position.y + 2, 0); // 终点,抛物线上升顶点
  743. var twoBezier = function twoBezier(t, p1, cp, p2) {
  744. // 贝塞尔曲线计算
  745. var x = (1 - t) * (1 - t) * p1.x + 2 * t * (1 - t) * cp.x + t * t * p2.x;
  746. var y = (1 - t) * (1 - t) * p1.y + 2 * t * (1 - t) * cp.y + t * t * p2.y;
  747. // 螺旋运动计算
  748. var angle = t * Math.PI * 6; // 螺旋角度变化,增加圈数
  749. var radius = 0.5 + t * 2.5; // 螺旋半径逐渐增大
  750. var xOffset = Math.cos(angle) * radius; // x 轴偏移
  751. var zOffset = Math.sin(angle) * radius; // z 轴偏移
  752. // 返回最终点,带有螺旋效果
  753. return new Vec3(x + xOffset, y, zOffset);
  754. };
  755. var tweenDuration = 2.0; // 动画时长
  756. var animationStopped = false; // 控制动画是否已经停止
  757. var moveTween = tween(this.node.position).to(tweenDuration, destPos, {
  758. onUpdate: function onUpdate(target, ratio) {
  759. // 计算新的位置,带螺旋上升效果
  760. _this2.node.position = twoBezier(ratio, startPos, middlePos, destPos);
  761. // 根据进度生成新节点
  762. var cube = _this2.Container.getCube();
  763. if (cube != null && cube.getComponent(Cube_Infor).state === Cube_State.live) {
  764. var newNode = cube;
  765. newNode.parent = director.getScene();
  766. newNode.setPosition(_this2.node.position);
  767. _this2.Container.nodeReferences.push(newNode);
  768. console.log(cube.getComponent(Cube_Infor).Text);
  769. }
  770. // 如果没有方块,设置停止标志
  771. if (cube == null && !animationStopped) {
  772. animationStopped = true; // 设置动画停止标志
  773. console.log("没有方块,停止动画");
  774. _this2.node.setPosition(_this2.node.position); // 防止继续更新位置
  775. }
  776. }
  777. }).call(function () {
  778. if (animationStopped) {
  779. _this2.Container.canTouch = true; // 确保回调被执行
  780. }
  781. }).start();
  782. };
  783. return CreateIdiom;
  784. }(Component)) || _class));
  785. cclegacy._RF.pop();
  786. }
  787. };
  788. });
  789. System.register("chunks:///_virtual/Cube_Infor.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  790. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createClass, cclegacy, _decorator, Label, RigidBody, Component;
  791. return {
  792. setters: [function (module) {
  793. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  794. _inheritsLoose = module.inheritsLoose;
  795. _initializerDefineProperty = module.initializerDefineProperty;
  796. _assertThisInitialized = module.assertThisInitialized;
  797. _createClass = module.createClass;
  798. }, function (module) {
  799. cclegacy = module.cclegacy;
  800. _decorator = module._decorator;
  801. Label = module.Label;
  802. RigidBody = module.RigidBody;
  803. Component = module.Component;
  804. }],
  805. execute: function () {
  806. var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
  807. cclegacy._RF.push({}, "0fe67dkVupFZYUR3uRu1sAy", "Cube_Infor", undefined);
  808. var ccclass = _decorator.ccclass,
  809. property = _decorator.property;
  810. var Cube_State = exports('Cube_State', /*#__PURE__*/function (Cube_State) {
  811. Cube_State[Cube_State["live"] = 0] = "live";
  812. Cube_State[Cube_State["wait"] = 1] = "wait";
  813. Cube_State[Cube_State["dead"] = 2] = "dead";
  814. return Cube_State;
  815. }({}));
  816. var Cube_Infor = exports('Cube_Infor', (_dec = ccclass('Cube_Infor'), _dec2 = property(Label), _dec3 = property(RigidBody), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  817. _inheritsLoose(Cube_Infor, _Component);
  818. function Cube_Infor() {
  819. var _this;
  820. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  821. args[_key] = arguments[_key];
  822. }
  823. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  824. _initializerDefineProperty(_this, "txt", _descriptor, _assertThisInitialized(_this));
  825. _initializerDefineProperty(_this, "rigidbody", _descriptor2, _assertThisInitialized(_this));
  826. _this.text = void 0;
  827. // lock:boolean = false;
  828. _this.state = Cube_State.live;
  829. return _this;
  830. }
  831. var _proto = Cube_Infor.prototype;
  832. _proto.start = function start() {};
  833. _proto.update = function update(deltaTime) {};
  834. _createClass(Cube_Infor, [{
  835. key: "Text",
  836. get: function get() {
  837. return this.txt.string;
  838. },
  839. set: function set(value) {
  840. this.txt.string = value;
  841. }
  842. }]);
  843. return Cube_Infor;
  844. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "txt", [_dec2], {
  845. configurable: true,
  846. enumerable: true,
  847. writable: true,
  848. initializer: null
  849. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "rigidbody", [_dec3], {
  850. configurable: true,
  851. enumerable: true,
  852. writable: true,
  853. initializer: null
  854. })), _class2)) || _class));
  855. cclegacy._RF.pop();
  856. }
  857. };
  858. });
  859. System.register("chunks:///_virtual/GameCtl.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui.ts', './UI_Idioms.ts', './UI_Main.ts', './Container_Manager.ts', './Cube_Infor.ts', './Hall.ts', './UI_LatticeFull.ts', './UI_Lock.ts'], function (exports) {
  860. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Camera, Node, find, geometry, PhysicsSystem, Vec3, RigidBody, Quat, tween, Component, gui, UI_Idioms, UI_Main, Container_Manager, Cube_Infor, Cube_State, Hall, UI_LatticeFull, UI_Lock;
  861. return {
  862. setters: [function (module) {
  863. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  864. _inheritsLoose = module.inheritsLoose;
  865. _initializerDefineProperty = module.initializerDefineProperty;
  866. _assertThisInitialized = module.assertThisInitialized;
  867. _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
  868. _asyncToGenerator = module.asyncToGenerator;
  869. _regeneratorRuntime = module.regeneratorRuntime;
  870. }, function (module) {
  871. cclegacy = module.cclegacy;
  872. _decorator = module._decorator;
  873. Camera = module.Camera;
  874. Node = module.Node;
  875. find = module.find;
  876. geometry = module.geometry;
  877. PhysicsSystem = module.PhysicsSystem;
  878. Vec3 = module.Vec3;
  879. RigidBody = module.RigidBody;
  880. Quat = module.Quat;
  881. tween = module.tween;
  882. Component = module.Component;
  883. }, function (module) {
  884. gui = module.gui;
  885. }, function (module) {
  886. UI_Idioms = module.UI_Idioms;
  887. }, function (module) {
  888. UI_Main = module.UI_Main;
  889. }, function (module) {
  890. Container_Manager = module.Container_Manager;
  891. }, function (module) {
  892. Cube_Infor = module.Cube_Infor;
  893. Cube_State = module.Cube_State;
  894. }, function (module) {
  895. Hall = module.Hall;
  896. }, function (module) {
  897. UI_LatticeFull = module.UI_LatticeFull;
  898. }, function (module) {
  899. UI_Lock = module.UI_Lock;
  900. }],
  901. execute: function () {
  902. var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2, _class3;
  903. cclegacy._RF.push({}, "5237f+4/ftIlKW+rC062l8C", "GameCtl", undefined);
  904. var ccclass = _decorator.ccclass,
  905. property = _decorator.property;
  906. var GameCtl = exports('GameCtl', (_dec = ccclass('GameCtl'), _dec2 = property(Camera), _dec3 = property([Node]), _dec(_class = (_class2 = (_class3 = /*#__PURE__*/function (_Component) {
  907. _inheritsLoose(GameCtl, _Component);
  908. function GameCtl() {
  909. var _this;
  910. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  911. args[_key] = arguments[_key];
  912. }
  913. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  914. _initializerDefineProperty(_this, "camera", _descriptor, _assertThisInitialized(_this));
  915. _initializerDefineProperty(_this, "Ani", _descriptor2, _assertThisInitialized(_this));
  916. _this.Container = void 0;
  917. return _this;
  918. }
  919. var _proto = GameCtl.prototype;
  920. _proto.onLoad = function onLoad() {
  921. GameCtl.instance = this;
  922. this.node.on(Node.EventType.TOUCH_START, this.onTouchStart, this);
  923. this.node.on(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
  924. this.node.on(Node.EventType.TOUCH_END, this.onTouchEnd, this);
  925. this.Container = find('Container').getComponent(Container_Manager);
  926. };
  927. _proto.update = function update(deltaTime) {};
  928. _proto.onTouchStart = function onTouchStart(event) {};
  929. _proto.onTouchMove = function onTouchMove(event) {};
  930. _proto.onTouchEnd = function onTouchEnd(event) {
  931. if (this.Container.canTouch) {
  932. this.shootRay(event);
  933. }
  934. }
  935. //发射射线检测判断物体是否可消除
  936. ;
  937. _proto.shootRay = function shootRay(event) {
  938. if (!this.camera) return;
  939. var ray = new geometry.Ray();
  940. this.camera.screenPointToRay(event.getLocationX(), event.getLocationY(), ray);
  941. if (PhysicsSystem.instance.raycastClosest(ray)) {
  942. var _collider$node$getCom;
  943. var raycastClosestResult = PhysicsSystem.instance.raycastClosestResult;
  944. var collider = raycastClosestResult.collider;
  945. console.log(collider.node.name);
  946. //当前其余点击无效
  947. if (((_collider$node$getCom = collider.node.getComponent(Cube_Infor)) == null ? void 0 : _collider$node$getCom.state) === Cube_State.live) {
  948. if (gui.get(UI_Main).getLayout().Hand.active == true) {
  949. gui.get(UI_Main).getLayout().Hand.active = false;
  950. }
  951. this.entryContainer(collider.node);
  952. } else if (collider.node.name == 'Lock') {
  953. //解锁槽子
  954. this.UnLock(collider.node);
  955. }
  956. }
  957. console.log('发射了射线');
  958. };
  959. _proto.entryContainer = function entryContainer(node) {
  960. var _this2 = this;
  961. // 判断容器剩余容量
  962. var startIndex = -1;
  963. var targetPos = new Vec3();
  964. var txt_length = node.getComponent(Cube_Infor).Text.length;
  965. console.log(txt_length);
  966. // 判断字长 并 判断是否还有空间可放置
  967. switch (txt_length) {
  968. case 1:
  969. for (var i = 0; i < this.Container.unlock_Num; i++) {
  970. if (this.Container.node_isIdiom[i] === false) {
  971. startIndex = i; // 找到连续的三个 false,记录起始位置
  972. break; // 找到第一个符合条件的位置后停止
  973. }
  974. }
  975. if (startIndex !== -1) {
  976. // 如果找到了一个值为 false 的元素
  977. targetPos = this.Container.nodes[startIndex].getWorldPosition().clone();
  978. this.Container.node_isIdiom[startIndex] = true;
  979. console.log(targetPos);
  980. } else {
  981. console.log("没有空间了");
  982. }
  983. break;
  984. case 2:
  985. {
  986. for (var _i = 0; _i < this.Container.unlock_Num - 1; _i++) {
  987. if (this.Container.node_isIdiom[_i] === false && this.Container.node_isIdiom[_i + 1] === false) {
  988. startIndex = _i; // 找到连续的两个 false,记录起始位置
  989. break; // 找到第一个符合条件的位置后停止
  990. }
  991. }
  992. if (startIndex !== -1) {
  993. console.log("找到连续的两个 false,起始索引是:", startIndex);
  994. // 可以在此使用 startIndex 进行后续操作,例如:
  995. var pos1 = this.Container.nodes[startIndex].getWorldPosition();
  996. var pos2 = this.Container.nodes[startIndex + 1].getWorldPosition();
  997. this.Container.node_isIdiom[startIndex] = true;
  998. this.Container.node_isIdiom[startIndex + 1] = true;
  999. targetPos.set((pos1.x + pos2.x) / 2, (pos1.y + pos2.y) / 2, (pos1.z + pos2.z) / 2);
  1000. console.log(targetPos);
  1001. }
  1002. break;
  1003. }
  1004. case 3:
  1005. {
  1006. for (var _i2 = 0; _i2 < this.Container.unlock_Num - 2; _i2++) {
  1007. if (this.Container.node_isIdiom[_i2] === false && this.Container.node_isIdiom[_i2 + 1] === false && this.Container.node_isIdiom[_i2 + 2] === false) {
  1008. startIndex = _i2; // 找到连续的三个 false,记录起始位置
  1009. break; // 找到第一个符合条件的位置后停止
  1010. }
  1011. }
  1012. if (startIndex !== -1) {
  1013. // 找到连续三个 false,startIndex 即为最前面的索引
  1014. console.log("找到连续的三个 false,起始索引是:", startIndex);
  1015. // 可以在此使用 startIndex 进行后续操作,例如:
  1016. var _pos = this.Container.nodes[startIndex].getWorldPosition();
  1017. var _pos2 = this.Container.nodes[startIndex + 1].getWorldPosition();
  1018. var pos3 = this.Container.nodes[startIndex + 2].getWorldPosition();
  1019. this.Container.node_isIdiom[startIndex] = true;
  1020. this.Container.node_isIdiom[startIndex + 1] = true;
  1021. this.Container.node_isIdiom[startIndex + 2] = true;
  1022. targetPos.set((_pos.x + _pos2.x + pos3.x) / 3, (_pos.y + _pos2.y + pos3.y) / 3, (_pos.z + _pos2.z + pos3.z) / 3);
  1023. console.log(targetPos);
  1024. } else {
  1025. console.log("没有找到连续的三个 false");
  1026. }
  1027. break;
  1028. }
  1029. default:
  1030. return;
  1031. }
  1032. if (startIndex !== -1) {
  1033. // node.getComponent(Cube_Infor).lock = true;
  1034. node.getComponent(Cube_Infor).state = Cube_State.wait;
  1035. node.getComponent(Cube_Infor).rigidbody.type = RigidBody.Type.STATIC; // 禁用重力
  1036. var targetRotation = new Quat();
  1037. Quat.fromEuler(targetRotation, -90, 0, 0);
  1038. this.Container.canTouch = false;
  1039. tween(node).to(0.5, {
  1040. position: new Vec3(targetPos.x, targetPos.y, targetPos.z + 0.4),
  1041. rotation: targetRotation
  1042. }).call(function () {
  1043. _this2.Container.idiom_combine.set(node.getComponent(Cube_Infor), startIndex);
  1044. // 执行判断成语合成逻辑
  1045. var matchedCubes = [];
  1046. var flag = _this2.Container.checkIdiom_Combine(node.getComponent(Cube_Infor), matchedCubes);
  1047. if (flag) {
  1048. // 执行合成动画
  1049. console.log("匹配的成语方块:", matchedCubes);
  1050. _this2.combine_ani(matchedCubes[0], matchedCubes[1]);
  1051. } else {
  1052. //高亮
  1053. gui.get(UI_Idioms).light_Show(node.getComponent(Cube_Infor));
  1054. //判断槽子满了吗
  1055. var count = 0;
  1056. for (var _iterator = _createForOfIteratorHelperLoose(_this2.Container.node_isIdiom), _step; !(_step = _iterator()).done;) {
  1057. var element = _step.value;
  1058. if (element == true) {
  1059. count++;
  1060. }
  1061. }
  1062. if (count == _this2.Container.unlock_Num) {
  1063. gui.show(UI_LatticeFull);
  1064. } else if (count >= _this2.Container.unlock_Num - 2 && _this2.Container.unlock_Num != 9) {
  1065. if (!_this2.Container.is_Show_UI_Lock) {
  1066. gui.show(UI_Lock);
  1067. _this2.Container.is_Show_UI_Lock = true;
  1068. }
  1069. }
  1070. _this2.Container.canTouch = true;
  1071. }
  1072. }).start();
  1073. }
  1074. }
  1075. //合成动画
  1076. ;
  1077. _proto.combine_ani = function combine_ani(cube1, cube2) {
  1078. var _this3 = this;
  1079. this.Container.canTouch = true;
  1080. for (var i = this.Container.idiom_combine.get(cube1); i < this.Container.idiom_combine.get(cube1) + cube1.Text.length; i++) {
  1081. this.Container.node_isIdiom[i] = false;
  1082. }
  1083. this.Container.idiom_combine["delete"](cube1);
  1084. for (var _i3 = this.Container.idiom_combine.get(cube2); _i3 < this.Container.idiom_combine.get(cube2) + cube2.Text.length; _i3++) {
  1085. this.Container.node_isIdiom[_i3] = false;
  1086. }
  1087. this.Container.idiom_combine["delete"](cube2);
  1088. // 取消相关字的高亮显示
  1089. gui.get(UI_Idioms).light_Hide(cube1, cube2);
  1090. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.update_remain);
  1091. this.adjustContainer();
  1092. // 检测容器中哪些字需要高亮显示
  1093. console.log(this.Container.node_isIdiom); // 在所有动画结束后执行
  1094. this.Container.idioms = this.Container.idioms.filter(function (c) {
  1095. return c.idiom !== cube1.Text + cube2.Text;
  1096. });
  1097. // 创建第一个 tween 动画
  1098. var tween1 = tween(cube1.node).to(0.1, {
  1099. position: new Vec3(this.Ani[0].position.x, this.Ani[0].position.y, this.Ani[0].position.z + 0.4)
  1100. }).call(function () {
  1101. setTimeout(function () {
  1102. cube1.state = Cube_State.dead;
  1103. _this3.Container.recycleCube(cube1.node);
  1104. }, 500.0);
  1105. });
  1106. // 创建第二个 tween 动画
  1107. var tween2 = tween(cube2.node).to(0.1, {
  1108. position: new Vec3(this.Ani[1].position.x, this.Ani[1].position.y, this.Ani[1].position.z + 0.4)
  1109. }).call(function () {
  1110. setTimeout(function () {
  1111. cube2.state = Cube_State.dead;
  1112. _this3.Container.recycleCube(cube2.node);
  1113. }, 500.0);
  1114. });
  1115. // 使用 tween 的并行组合功能
  1116. tween(cube1.node).parallel(tween1, tween2) // 并行执行 tween1 和 tween2
  1117. .call(function () {
  1118. Hall.getInstance().player.set_combine_num(1);
  1119. }).start();
  1120. };
  1121. _proto.adjustContainer = function adjustContainer() {
  1122. var container = this.Container;
  1123. // 新的 node_isIdiom 状态数组
  1124. var newNodeIsIdiom = Array(container.node_isIdiom.length).fill(false);
  1125. // 新的 idiom_combine 映射表
  1126. var newIdiomCombine = new Map();
  1127. // 遍历 idiom_combine,重新计算位置
  1128. for (var _iterator2 = _createForOfIteratorHelperLoose(container.idiom_combine.entries()), _step2; !(_step2 = _iterator2()).done;) {
  1129. var _step2$value = _step2.value,
  1130. cube = _step2$value[0],
  1131. startIndex = _step2$value[1];
  1132. var txtLength = cube.Text.length; // 获取字长
  1133. var targetIndex = -1; // 目标位置起始索引
  1134. var targetPos = new Vec3();
  1135. switch (txtLength) {
  1136. case 1:
  1137. {
  1138. // 找到一个空位
  1139. for (var i = 0; i < container.unlock_Num; i++) {
  1140. if (!newNodeIsIdiom[i]) {
  1141. targetIndex = i;
  1142. break;
  1143. }
  1144. }
  1145. if (targetIndex !== -1) {
  1146. targetPos = container.nodes[targetIndex].getWorldPosition().clone();
  1147. newNodeIsIdiom[targetIndex] = true; // 占用位置
  1148. } else {
  1149. console.log("没有空位容纳单字 Cube_Infor");
  1150. }
  1151. break;
  1152. }
  1153. case 2:
  1154. {
  1155. // 找到连续两个空位
  1156. for (var _i4 = 0; _i4 < container.unlock_Num - 1; _i4++) {
  1157. if (!newNodeIsIdiom[_i4] && !newNodeIsIdiom[_i4 + 1]) {
  1158. targetIndex = _i4;
  1159. break;
  1160. }
  1161. }
  1162. if (targetIndex !== -1) {
  1163. var pos1 = container.nodes[targetIndex].getWorldPosition();
  1164. var pos2 = container.nodes[targetIndex + 1].getWorldPosition();
  1165. targetPos.set((pos1.x + pos2.x) / 2, (pos1.y + pos2.y) / 2, (pos1.z + pos2.z) / 2);
  1166. newNodeIsIdiom[targetIndex] = true;
  1167. newNodeIsIdiom[targetIndex + 1] = true;
  1168. } else {
  1169. console.log("没有连续两个空位容纳双字 Cube_Infor");
  1170. }
  1171. break;
  1172. }
  1173. case 3:
  1174. {
  1175. // 找到连续三个空位
  1176. for (var _i5 = 0; _i5 < container.unlock_Num - 2; _i5++) {
  1177. if (!newNodeIsIdiom[_i5] && !newNodeIsIdiom[_i5 + 1] && !newNodeIsIdiom[_i5 + 2]) {
  1178. targetIndex = _i5;
  1179. break;
  1180. }
  1181. }
  1182. if (targetIndex !== -1) {
  1183. var _pos3 = container.nodes[targetIndex].getWorldPosition();
  1184. var _pos4 = container.nodes[targetIndex + 1].getWorldPosition();
  1185. var pos3 = container.nodes[targetIndex + 2].getWorldPosition();
  1186. targetPos.set((_pos3.x + _pos4.x + pos3.x) / 3, (_pos3.y + _pos4.y + pos3.y) / 3, (_pos3.z + _pos4.z + pos3.z) / 3);
  1187. newNodeIsIdiom[targetIndex] = true;
  1188. newNodeIsIdiom[targetIndex + 1] = true;
  1189. newNodeIsIdiom[targetIndex + 2] = true;
  1190. } else {
  1191. console.log("没有连续三个空位容纳三字 Cube_Infor");
  1192. }
  1193. break;
  1194. }
  1195. default:
  1196. return;
  1197. }
  1198. // 移动 Cube_Infor 到目标位置
  1199. if (targetIndex !== -1) {
  1200. tween(cube.node).to(0.3, {
  1201. position: new Vec3(targetPos.x, targetPos.y, targetPos.z + 0.4)
  1202. }).start();
  1203. newIdiomCombine.set(cube, targetIndex); // 更新新映射
  1204. }
  1205. }
  1206. // 更新 container 状态
  1207. container.node_isIdiom = newNodeIsIdiom;
  1208. container.idiom_combine = newIdiomCombine;
  1209. console.log("调整后的容器状态:", container.node_isIdiom);
  1210. console.log("更新后的 idiom_combine:", [].concat(container.idiom_combine.entries()));
  1211. };
  1212. _proto.UnLock = /*#__PURE__*/function () {
  1213. var _UnLock = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(node) {
  1214. var res;
  1215. return _regeneratorRuntime().wrap(function _callee$(_context) {
  1216. while (1) switch (_context.prev = _context.next) {
  1217. case 0:
  1218. _context.next = 2;
  1219. return chsdk.playRewardAd('解锁槽位');
  1220. case 2:
  1221. res = _context.sent;
  1222. if (res) {
  1223. node.active = false;
  1224. this.Container.unlock_Num += 1;
  1225. }
  1226. case 4:
  1227. case "end":
  1228. return _context.stop();
  1229. }
  1230. }, _callee, this);
  1231. }));
  1232. function UnLock(_x) {
  1233. return _UnLock.apply(this, arguments);
  1234. }
  1235. return UnLock;
  1236. }();
  1237. return GameCtl;
  1238. }(Component), _class3.instance = null, _class3), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "camera", [_dec2], {
  1239. configurable: true,
  1240. enumerable: true,
  1241. writable: true,
  1242. initializer: function initializer() {
  1243. return null;
  1244. }
  1245. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Ani", [_dec3], {
  1246. configurable: true,
  1247. enumerable: true,
  1248. writable: true,
  1249. initializer: function initializer() {
  1250. return [];
  1251. }
  1252. })), _class2)) || _class));
  1253. cclegacy._RF.pop();
  1254. }
  1255. };
  1256. });
  1257. System.register("chunks:///_virtual/Hall.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ch.ts', './ui.ts', './HeadIcon.ts', './PlayerData.ts', './UI_Hall.ts', './TableLoadUtil.ts', './TableUtil.ts', './ModuleDef.ts'], function (exports) {
  1258. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Component, director, ch, gui, get_new_head_icon, PlayerData, UI_Hall, TableLoadUtil, TableUtil, ModuleDef;
  1259. return {
  1260. setters: [function (module) {
  1261. _inheritsLoose = module.inheritsLoose;
  1262. _asyncToGenerator = module.asyncToGenerator;
  1263. _regeneratorRuntime = module.regeneratorRuntime;
  1264. }, function (module) {
  1265. cclegacy = module.cclegacy;
  1266. _decorator = module._decorator;
  1267. Component = module.Component;
  1268. director = module.director;
  1269. }, function (module) {
  1270. ch = module.ch;
  1271. }, function (module) {
  1272. gui = module.gui;
  1273. }, function (module) {
  1274. get_new_head_icon = module.default;
  1275. }, function (module) {
  1276. PlayerData = module.default;
  1277. }, function (module) {
  1278. UI_Hall = module.UI_Hall;
  1279. }, function (module) {
  1280. TableLoadUtil = module.default;
  1281. }, function (module) {
  1282. TableUtil = module.TableUtil;
  1283. }, function (module) {
  1284. ModuleDef = module.ModuleDef;
  1285. }],
  1286. execute: function () {
  1287. var _dec, _class, _class2;
  1288. cclegacy._RF.push({}, "7cb62YJXe5LPKnKF0hMl+Rc", "Hall", undefined);
  1289. var ccclass = _decorator.ccclass,
  1290. property = _decorator.property;
  1291. var Hall = exports('Hall', (_dec = ccclass('Hall'), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1292. _inheritsLoose(Hall, _Component);
  1293. function Hall() {
  1294. var _this;
  1295. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1296. args[_key] = arguments[_key];
  1297. }
  1298. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  1299. _this.player = void 0;
  1300. _this.head_icon = get_new_head_icon();
  1301. return _this;
  1302. }
  1303. Hall.getInstance = function getInstance() {
  1304. return Hall.instance;
  1305. };
  1306. var _proto = Hall.prototype;
  1307. _proto.start = /*#__PURE__*/function () {
  1308. var _start = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  1309. return _regeneratorRuntime().wrap(function _callee$(_context) {
  1310. while (1) switch (_context.prev = _context.next) {
  1311. case 0:
  1312. if (!Hall.instance) {
  1313. Hall.instance = this;
  1314. }
  1315. gui.show(UI_Hall);
  1316. director.addPersistRootNode(this.node);
  1317. this.init();
  1318. // if(chsdk.checkFromSidebar())
  1319. // {
  1320. // Hall.getInstance().player.add_item(2,2);
  1321. // }
  1322. case 4:
  1323. case "end":
  1324. return _context.stop();
  1325. }
  1326. }, _callee, this);
  1327. }));
  1328. function start() {
  1329. return _start.apply(this, arguments);
  1330. }
  1331. return start;
  1332. }();
  1333. _proto.init = /*#__PURE__*/function () {
  1334. var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
  1335. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  1336. while (1) switch (_context2.prev = _context2.next) {
  1337. case 0:
  1338. this.loadTable();
  1339. this.player = PlayerData.getInstance(ch.sdk.get_gid(), ch.sdk.get_uid().toString());
  1340. this.player.init_user_info();
  1341. _context2.next = 5;
  1342. return this.player.load();
  1343. case 5:
  1344. this.player.set_login_num(1);
  1345. console.log("登录次数:" + this.player.get_login_num());
  1346. case 7:
  1347. case "end":
  1348. return _context2.stop();
  1349. }
  1350. }, _callee2, this);
  1351. }));
  1352. function init() {
  1353. return _init.apply(this, arguments);
  1354. }
  1355. return init;
  1356. }();
  1357. _proto.loadTable = function loadTable() {
  1358. ch.log.log_start("加载配置初始化");
  1359. TableLoadUtil.preloadAll(ModuleDef.EXTRA, "table_json", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
  1360. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  1361. while (1) switch (_context3.prev = _context3.next) {
  1362. case 0:
  1363. case "end":
  1364. return _context3.stop();
  1365. }
  1366. }, _callee3);
  1367. })), TableUtil.set);
  1368. };
  1369. return Hall;
  1370. }(Component), _class2.instance = void 0, _class2)) || _class));
  1371. cclegacy._RF.pop();
  1372. }
  1373. };
  1374. });
  1375. System.register("chunks:///_virtual/Layout_Fail.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  1376. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, ProgressBar, Label, Button, Component;
  1377. return {
  1378. setters: [function (module) {
  1379. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  1380. _inheritsLoose = module.inheritsLoose;
  1381. _initializerDefineProperty = module.initializerDefineProperty;
  1382. _assertThisInitialized = module.assertThisInitialized;
  1383. }, function (module) {
  1384. cclegacy = module.cclegacy;
  1385. _decorator = module._decorator;
  1386. ProgressBar = module.ProgressBar;
  1387. Label = module.Label;
  1388. Button = module.Button;
  1389. Component = module.Component;
  1390. }],
  1391. execute: function () {
  1392. var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
  1393. cclegacy._RF.push({}, "03965b2YIBCA6Ocz97b2P5p", "Layout_Fail", undefined);
  1394. var ccclass = _decorator.ccclass,
  1395. property = _decorator.property;
  1396. var Layout_Fail = exports('Layout_Fail', (_dec = ccclass('Layout_Fail'), _dec2 = property(ProgressBar), _dec3 = property(Label), _dec4 = property(Button), _dec5 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1397. _inheritsLoose(Layout_Fail, _Component);
  1398. function Layout_Fail() {
  1399. var _this;
  1400. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1401. args[_key] = arguments[_key];
  1402. }
  1403. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  1404. _initializerDefineProperty(_this, "progressBar", _descriptor, _assertThisInitialized(_this));
  1405. _initializerDefineProperty(_this, "Num", _descriptor2, _assertThisInitialized(_this));
  1406. _initializerDefineProperty(_this, "Relife_Btn", _descriptor3, _assertThisInitialized(_this));
  1407. _initializerDefineProperty(_this, "ReturnHall_Btn", _descriptor4, _assertThisInitialized(_this));
  1408. _this.Container = void 0;
  1409. return _this;
  1410. }
  1411. return Layout_Fail;
  1412. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "progressBar", [_dec2], {
  1413. configurable: true,
  1414. enumerable: true,
  1415. writable: true,
  1416. initializer: null
  1417. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Num", [_dec3], {
  1418. configurable: true,
  1419. enumerable: true,
  1420. writable: true,
  1421. initializer: null
  1422. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Relife_Btn", [_dec4], {
  1423. configurable: true,
  1424. enumerable: true,
  1425. writable: true,
  1426. initializer: null
  1427. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "ReturnHall_Btn", [_dec5], {
  1428. configurable: true,
  1429. enumerable: true,
  1430. writable: true,
  1431. initializer: null
  1432. })), _class2)) || _class));
  1433. cclegacy._RF.pop();
  1434. }
  1435. };
  1436. });
  1437. System.register("chunks:///_virtual/Layout_GameRules.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  1438. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Component;
  1439. return {
  1440. setters: [function (module) {
  1441. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  1442. _inheritsLoose = module.inheritsLoose;
  1443. _initializerDefineProperty = module.initializerDefineProperty;
  1444. _assertThisInitialized = module.assertThisInitialized;
  1445. }, function (module) {
  1446. cclegacy = module.cclegacy;
  1447. _decorator = module._decorator;
  1448. Button = module.Button;
  1449. Component = module.Component;
  1450. }],
  1451. execute: function () {
  1452. var _dec, _dec2, _class, _class2, _descriptor;
  1453. cclegacy._RF.push({}, "e612co2N2pF65ZUh56KD86z", "Layout_GameRules", undefined);
  1454. var ccclass = _decorator.ccclass,
  1455. property = _decorator.property;
  1456. var Layout_GameRules = exports('Layout_GameRules', (_dec = ccclass('Layout_GameRules'), _dec2 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1457. _inheritsLoose(Layout_GameRules, _Component);
  1458. function Layout_GameRules() {
  1459. var _this;
  1460. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1461. args[_key] = arguments[_key];
  1462. }
  1463. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  1464. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  1465. return _this;
  1466. }
  1467. return Layout_GameRules;
  1468. }(Component), _descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  1469. configurable: true,
  1470. enumerable: true,
  1471. writable: true,
  1472. initializer: null
  1473. }), _class2)) || _class));
  1474. cclegacy._RF.pop();
  1475. }
  1476. };
  1477. });
  1478. System.register("chunks:///_virtual/Layout_Hall.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  1479. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Component;
  1480. return {
  1481. setters: [function (module) {
  1482. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  1483. _inheritsLoose = module.inheritsLoose;
  1484. _initializerDefineProperty = module.initializerDefineProperty;
  1485. _assertThisInitialized = module.assertThisInitialized;
  1486. }, function (module) {
  1487. cclegacy = module.cclegacy;
  1488. _decorator = module._decorator;
  1489. Button = module.Button;
  1490. Component = module.Component;
  1491. }],
  1492. execute: function () {
  1493. var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
  1494. cclegacy._RF.push({}, "13bb8NC9xhAHqVW+8McXGfV", "Layout_Hall", undefined);
  1495. var ccclass = _decorator.ccclass,
  1496. property = _decorator.property;
  1497. var Layout_Hall = exports('Layout_Hall', (_dec = ccclass('Layout_Hall'), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Button), _dec6 = property(Button), _dec7 = property(Button), _dec8 = property(Button), _dec9 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1498. _inheritsLoose(Layout_Hall, _Component);
  1499. function Layout_Hall() {
  1500. var _this;
  1501. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1502. args[_key] = arguments[_key];
  1503. }
  1504. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  1505. _initializerDefineProperty(_this, "Start_Btn", _descriptor, _assertThisInitialized(_this));
  1506. _initializerDefineProperty(_this, "Settings_Btn", _descriptor2, _assertThisInitialized(_this));
  1507. _initializerDefineProperty(_this, "Rank_Btn", _descriptor3, _assertThisInitialized(_this));
  1508. _initializerDefineProperty(_this, "Invite_Btn", _descriptor4, _assertThisInitialized(_this));
  1509. _initializerDefineProperty(_this, "Store_Btn", _descriptor5, _assertThisInitialized(_this));
  1510. _initializerDefineProperty(_this, "Sign_Btn", _descriptor6, _assertThisInitialized(_this));
  1511. _initializerDefineProperty(_this, "SideBar_Btn", _descriptor7, _assertThisInitialized(_this));
  1512. _initializerDefineProperty(_this, "Task_Btn", _descriptor8, _assertThisInitialized(_this));
  1513. return _this;
  1514. }
  1515. return Layout_Hall;
  1516. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Start_Btn", [_dec2], {
  1517. configurable: true,
  1518. enumerable: true,
  1519. writable: true,
  1520. initializer: function initializer() {
  1521. return null;
  1522. }
  1523. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Settings_Btn", [_dec3], {
  1524. configurable: true,
  1525. enumerable: true,
  1526. writable: true,
  1527. initializer: function initializer() {
  1528. return null;
  1529. }
  1530. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Rank_Btn", [_dec4], {
  1531. configurable: true,
  1532. enumerable: true,
  1533. writable: true,
  1534. initializer: function initializer() {
  1535. return null;
  1536. }
  1537. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Invite_Btn", [_dec5], {
  1538. configurable: true,
  1539. enumerable: true,
  1540. writable: true,
  1541. initializer: function initializer() {
  1542. return null;
  1543. }
  1544. }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Store_Btn", [_dec6], {
  1545. configurable: true,
  1546. enumerable: true,
  1547. writable: true,
  1548. initializer: function initializer() {
  1549. return null;
  1550. }
  1551. }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "Sign_Btn", [_dec7], {
  1552. configurable: true,
  1553. enumerable: true,
  1554. writable: true,
  1555. initializer: function initializer() {
  1556. return null;
  1557. }
  1558. }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "SideBar_Btn", [_dec8], {
  1559. configurable: true,
  1560. enumerable: true,
  1561. writable: true,
  1562. initializer: function initializer() {
  1563. return null;
  1564. }
  1565. }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "Task_Btn", [_dec9], {
  1566. configurable: true,
  1567. enumerable: true,
  1568. writable: true,
  1569. initializer: function initializer() {
  1570. return null;
  1571. }
  1572. })), _class2)) || _class));
  1573. cclegacy._RF.pop();
  1574. }
  1575. };
  1576. });
  1577. System.register("chunks:///_virtual/Layout_Idioms.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  1578. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Prefab, ScrollView, Node, Component;
  1579. return {
  1580. setters: [function (module) {
  1581. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  1582. _inheritsLoose = module.inheritsLoose;
  1583. _initializerDefineProperty = module.initializerDefineProperty;
  1584. _assertThisInitialized = module.assertThisInitialized;
  1585. }, function (module) {
  1586. cclegacy = module.cclegacy;
  1587. _decorator = module._decorator;
  1588. Prefab = module.Prefab;
  1589. ScrollView = module.ScrollView;
  1590. Node = module.Node;
  1591. Component = module.Component;
  1592. }],
  1593. execute: function () {
  1594. var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
  1595. cclegacy._RF.push({}, "42de1lm8OtGEJAf8DNtqkZ4", "Layout_Idioms", undefined);
  1596. var ccclass = _decorator.ccclass,
  1597. property = _decorator.property;
  1598. var Layout_Idioms = exports('Layout_Idioms', (_dec = ccclass('Layout_Idioms'), _dec2 = property(Prefab), _dec3 = property(ScrollView), _dec4 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1599. _inheritsLoose(Layout_Idioms, _Component);
  1600. function Layout_Idioms() {
  1601. var _this;
  1602. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1603. args[_key] = arguments[_key];
  1604. }
  1605. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  1606. _initializerDefineProperty(_this, "idiom_prefab", _descriptor, _assertThisInitialized(_this));
  1607. _initializerDefineProperty(_this, "scrollView", _descriptor2, _assertThisInitialized(_this));
  1608. _initializerDefineProperty(_this, "content", _descriptor3, _assertThisInitialized(_this));
  1609. _this.Container = void 0;
  1610. return _this;
  1611. }
  1612. return Layout_Idioms;
  1613. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "idiom_prefab", [_dec2], {
  1614. configurable: true,
  1615. enumerable: true,
  1616. writable: true,
  1617. initializer: null
  1618. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "scrollView", [_dec3], {
  1619. configurable: true,
  1620. enumerable: true,
  1621. writable: true,
  1622. initializer: null
  1623. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "content", [_dec4], {
  1624. configurable: true,
  1625. enumerable: true,
  1626. writable: true,
  1627. initializer: null
  1628. })), _class2)) || _class));
  1629. cclegacy._RF.pop();
  1630. }
  1631. };
  1632. });
  1633. System.register("chunks:///_virtual/Layout_Invite.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  1634. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, ProgressBar, Label, SpriteFrame, Sprite, Component;
  1635. return {
  1636. setters: [function (module) {
  1637. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  1638. _inheritsLoose = module.inheritsLoose;
  1639. _initializerDefineProperty = module.initializerDefineProperty;
  1640. _assertThisInitialized = module.assertThisInitialized;
  1641. }, function (module) {
  1642. cclegacy = module.cclegacy;
  1643. _decorator = module._decorator;
  1644. Button = module.Button;
  1645. ProgressBar = module.ProgressBar;
  1646. Label = module.Label;
  1647. SpriteFrame = module.SpriteFrame;
  1648. Sprite = module.Sprite;
  1649. Component = module.Component;
  1650. }],
  1651. execute: function () {
  1652. var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
  1653. cclegacy._RF.push({}, "859979HUQ9IrZ1w0hT607qb", "Layout_Invite", undefined);
  1654. var ccclass = _decorator.ccclass,
  1655. property = _decorator.property;
  1656. var Layout_Invite = exports('Layout_Invite', (_dec = ccclass('Layout_Invite'), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(ProgressBar), _dec6 = property(Label), _dec7 = property([SpriteFrame]), _dec8 = property(Sprite), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1657. _inheritsLoose(Layout_Invite, _Component);
  1658. function Layout_Invite() {
  1659. var _this;
  1660. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1661. args[_key] = arguments[_key];
  1662. }
  1663. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  1664. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  1665. _initializerDefineProperty(_this, "Invite_Friend_Btn", _descriptor2, _assertThisInitialized(_this));
  1666. _initializerDefineProperty(_this, "Refresh_Btn", _descriptor3, _assertThisInitialized(_this));
  1667. _initializerDefineProperty(_this, "progressBar", _descriptor4, _assertThisInitialized(_this));
  1668. _initializerDefineProperty(_this, "Txt", _descriptor5, _assertThisInitialized(_this));
  1669. _initializerDefineProperty(_this, "Num", _descriptor6, _assertThisInitialized(_this));
  1670. _initializerDefineProperty(_this, "Num_Sp", _descriptor7, _assertThisInitialized(_this));
  1671. _this.target_count = 3;
  1672. _this.count = 1;
  1673. return _this;
  1674. }
  1675. return Layout_Invite;
  1676. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  1677. configurable: true,
  1678. enumerable: true,
  1679. writable: true,
  1680. initializer: null
  1681. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Invite_Friend_Btn", [_dec3], {
  1682. configurable: true,
  1683. enumerable: true,
  1684. writable: true,
  1685. initializer: null
  1686. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Refresh_Btn", [_dec4], {
  1687. configurable: true,
  1688. enumerable: true,
  1689. writable: true,
  1690. initializer: null
  1691. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "progressBar", [_dec5], {
  1692. configurable: true,
  1693. enumerable: true,
  1694. writable: true,
  1695. initializer: null
  1696. }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Txt", [_dec6], {
  1697. configurable: true,
  1698. enumerable: true,
  1699. writable: true,
  1700. initializer: null
  1701. }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "Num", [_dec7], {
  1702. configurable: true,
  1703. enumerable: true,
  1704. writable: true,
  1705. initializer: function initializer() {
  1706. return [];
  1707. }
  1708. }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "Num_Sp", [_dec8], {
  1709. configurable: true,
  1710. enumerable: true,
  1711. writable: true,
  1712. initializer: null
  1713. })), _class2)) || _class));
  1714. cclegacy._RF.pop();
  1715. }
  1716. };
  1717. });
  1718. System.register("chunks:///_virtual/Layout_LatticeFull.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  1719. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Sprite, Component;
  1720. return {
  1721. setters: [function (module) {
  1722. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  1723. _inheritsLoose = module.inheritsLoose;
  1724. _initializerDefineProperty = module.initializerDefineProperty;
  1725. _assertThisInitialized = module.assertThisInitialized;
  1726. }, function (module) {
  1727. cclegacy = module.cclegacy;
  1728. _decorator = module._decorator;
  1729. Button = module.Button;
  1730. Label = module.Label;
  1731. Sprite = module.Sprite;
  1732. Component = module.Component;
  1733. }],
  1734. execute: function () {
  1735. var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
  1736. cclegacy._RF.push({}, "b79deqrTgdIk6CiExH7qvRx", "Layout_LatticeFull", undefined);
  1737. var ccclass = _decorator.ccclass,
  1738. property = _decorator.property;
  1739. var Layout_LatticeFull = exports('Layout_LatticeFull', (_dec = ccclass('Layout_LatticeFull'), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Label), _dec5 = property(Sprite), _dec6 = property(Button), _dec7 = property(Label), _dec8 = property(Sprite), _dec9 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1740. _inheritsLoose(Layout_LatticeFull, _Component);
  1741. function Layout_LatticeFull() {
  1742. var _this;
  1743. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1744. args[_key] = arguments[_key];
  1745. }
  1746. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  1747. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  1748. _initializerDefineProperty(_this, "Eliminate", _descriptor2, _assertThisInitialized(_this));
  1749. _initializerDefineProperty(_this, "Eliminate_RedPoint_num", _descriptor3, _assertThisInitialized(_this));
  1750. _initializerDefineProperty(_this, "Eliminate_Ad", _descriptor4, _assertThisInitialized(_this));
  1751. _initializerDefineProperty(_this, "Empty", _descriptor5, _assertThisInitialized(_this));
  1752. _initializerDefineProperty(_this, "Empty_RedPoint_num", _descriptor6, _assertThisInitialized(_this));
  1753. _initializerDefineProperty(_this, "Empty_Ad", _descriptor7, _assertThisInitialized(_this));
  1754. _initializerDefineProperty(_this, "Click", _descriptor8, _assertThisInitialized(_this));
  1755. return _this;
  1756. }
  1757. return Layout_LatticeFull;
  1758. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  1759. configurable: true,
  1760. enumerable: true,
  1761. writable: true,
  1762. initializer: null
  1763. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Eliminate", [_dec3], {
  1764. configurable: true,
  1765. enumerable: true,
  1766. writable: true,
  1767. initializer: null
  1768. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Eliminate_RedPoint_num", [_dec4], {
  1769. configurable: true,
  1770. enumerable: true,
  1771. writable: true,
  1772. initializer: null
  1773. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Eliminate_Ad", [_dec5], {
  1774. configurable: true,
  1775. enumerable: true,
  1776. writable: true,
  1777. initializer: null
  1778. }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Empty", [_dec6], {
  1779. configurable: true,
  1780. enumerable: true,
  1781. writable: true,
  1782. initializer: null
  1783. }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "Empty_RedPoint_num", [_dec7], {
  1784. configurable: true,
  1785. enumerable: true,
  1786. writable: true,
  1787. initializer: null
  1788. }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "Empty_Ad", [_dec8], {
  1789. configurable: true,
  1790. enumerable: true,
  1791. writable: true,
  1792. initializer: null
  1793. }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "Click", [_dec9], {
  1794. configurable: true,
  1795. enumerable: true,
  1796. writable: true,
  1797. initializer: null
  1798. })), _class2)) || _class));
  1799. cclegacy._RF.pop();
  1800. }
  1801. };
  1802. });
  1803. System.register("chunks:///_virtual/Layout_Lock.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  1804. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Component;
  1805. return {
  1806. setters: [function (module) {
  1807. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  1808. _inheritsLoose = module.inheritsLoose;
  1809. _initializerDefineProperty = module.initializerDefineProperty;
  1810. _assertThisInitialized = module.assertThisInitialized;
  1811. }, function (module) {
  1812. cclegacy = module.cclegacy;
  1813. _decorator = module._decorator;
  1814. Button = module.Button;
  1815. Component = module.Component;
  1816. }],
  1817. execute: function () {
  1818. var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
  1819. cclegacy._RF.push({}, "2fcdcBp+uZEY6m/sU2Hehcl", "Layout_Lock", undefined);
  1820. var ccclass = _decorator.ccclass,
  1821. property = _decorator.property;
  1822. var Layout_Lock = exports('Layout_Lock', (_dec = ccclass('Layout_Lock'), _dec2 = property(Button), _dec3 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1823. _inheritsLoose(Layout_Lock, _Component);
  1824. function Layout_Lock() {
  1825. var _this;
  1826. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1827. args[_key] = arguments[_key];
  1828. }
  1829. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  1830. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  1831. _initializerDefineProperty(_this, "Ensure_Btn", _descriptor2, _assertThisInitialized(_this));
  1832. return _this;
  1833. }
  1834. return Layout_Lock;
  1835. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  1836. configurable: true,
  1837. enumerable: true,
  1838. writable: true,
  1839. initializer: null
  1840. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Ensure_Btn", [_dec3], {
  1841. configurable: true,
  1842. enumerable: true,
  1843. writable: true,
  1844. initializer: null
  1845. })), _class2)) || _class));
  1846. cclegacy._RF.pop();
  1847. }
  1848. };
  1849. });
  1850. System.register("chunks:///_virtual/Layout_Main.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Container_Manager.ts'], function (exports) {
  1851. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Node, find, Component, Container_Manager;
  1852. return {
  1853. setters: [function (module) {
  1854. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  1855. _inheritsLoose = module.inheritsLoose;
  1856. _initializerDefineProperty = module.initializerDefineProperty;
  1857. _assertThisInitialized = module.assertThisInitialized;
  1858. }, function (module) {
  1859. cclegacy = module.cclegacy;
  1860. _decorator = module._decorator;
  1861. Button = module.Button;
  1862. Label = module.Label;
  1863. Node = module.Node;
  1864. find = module.find;
  1865. Component = module.Component;
  1866. }, function (module) {
  1867. Container_Manager = module.Container_Manager;
  1868. }],
  1869. execute: function () {
  1870. var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
  1871. cclegacy._RF.push({}, "e3f72nzJUVGJo/WY8fbriTs", "Layout_Main", undefined);
  1872. var ccclass = _decorator.ccclass,
  1873. property = _decorator.property;
  1874. var Layout_Main = exports('Layout_Main', (_dec = ccclass('Layout_Main'), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Label), _dec5 = property(Label), _dec6 = property(Label), _dec7 = property(Button), _dec8 = property(Button), _dec9 = property(Button), _dec10 = property(Node), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1875. _inheritsLoose(Layout_Main, _Component);
  1876. function Layout_Main() {
  1877. var _this;
  1878. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1879. args[_key] = arguments[_key];
  1880. }
  1881. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  1882. _initializerDefineProperty(_this, "Pause_Btn", _descriptor, _assertThisInitialized(_this));
  1883. _initializerDefineProperty(_this, "Rules_Btn", _descriptor2, _assertThisInitialized(_this));
  1884. _initializerDefineProperty(_this, "Level", _descriptor3, _assertThisInitialized(_this));
  1885. _initializerDefineProperty(_this, "Remain_Cube_Des", _descriptor4, _assertThisInitialized(_this));
  1886. _initializerDefineProperty(_this, "Count_Down_Des", _descriptor5, _assertThisInitialized(_this));
  1887. _initializerDefineProperty(_this, "Eliminate_Btn", _descriptor6, _assertThisInitialized(_this));
  1888. _initializerDefineProperty(_this, "Shuffle_Btn", _descriptor7, _assertThisInitialized(_this));
  1889. _initializerDefineProperty(_this, "Empty_Btn", _descriptor8, _assertThisInitialized(_this));
  1890. _initializerDefineProperty(_this, "Hand", _descriptor9, _assertThisInitialized(_this));
  1891. _this.time = void 0;
  1892. _this.Container = void 0;
  1893. return _this;
  1894. }
  1895. var _proto = Layout_Main.prototype;
  1896. _proto.start = function start() {
  1897. this.Container = find('Container').getComponent(Container_Manager);
  1898. };
  1899. return Layout_Main;
  1900. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Pause_Btn", [_dec2], {
  1901. configurable: true,
  1902. enumerable: true,
  1903. writable: true,
  1904. initializer: function initializer() {
  1905. return null;
  1906. }
  1907. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Rules_Btn", [_dec3], {
  1908. configurable: true,
  1909. enumerable: true,
  1910. writable: true,
  1911. initializer: function initializer() {
  1912. return null;
  1913. }
  1914. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Level", [_dec4], {
  1915. configurable: true,
  1916. enumerable: true,
  1917. writable: true,
  1918. initializer: function initializer() {
  1919. return null;
  1920. }
  1921. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Remain_Cube_Des", [_dec5], {
  1922. configurable: true,
  1923. enumerable: true,
  1924. writable: true,
  1925. initializer: function initializer() {
  1926. return null;
  1927. }
  1928. }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Count_Down_Des", [_dec6], {
  1929. configurable: true,
  1930. enumerable: true,
  1931. writable: true,
  1932. initializer: function initializer() {
  1933. return null;
  1934. }
  1935. }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "Eliminate_Btn", [_dec7], {
  1936. configurable: true,
  1937. enumerable: true,
  1938. writable: true,
  1939. initializer: function initializer() {
  1940. return null;
  1941. }
  1942. }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "Shuffle_Btn", [_dec8], {
  1943. configurable: true,
  1944. enumerable: true,
  1945. writable: true,
  1946. initializer: function initializer() {
  1947. return null;
  1948. }
  1949. }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "Empty_Btn", [_dec9], {
  1950. configurable: true,
  1951. enumerable: true,
  1952. writable: true,
  1953. initializer: function initializer() {
  1954. return null;
  1955. }
  1956. }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "Hand", [_dec10], {
  1957. configurable: true,
  1958. enumerable: true,
  1959. writable: true,
  1960. initializer: function initializer() {
  1961. return null;
  1962. }
  1963. })), _class2)) || _class));
  1964. cclegacy._RF.pop();
  1965. }
  1966. };
  1967. });
  1968. System.register("chunks:///_virtual/Layout_Rank.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UI_Rank_Item.ts', './List.ts'], function (exports) {
  1969. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Toggle, Component, UI_Rank_Item, List;
  1970. return {
  1971. setters: [function (module) {
  1972. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  1973. _inheritsLoose = module.inheritsLoose;
  1974. _initializerDefineProperty = module.initializerDefineProperty;
  1975. _assertThisInitialized = module.assertThisInitialized;
  1976. }, function (module) {
  1977. cclegacy = module.cclegacy;
  1978. _decorator = module._decorator;
  1979. Button = module.Button;
  1980. Toggle = module.Toggle;
  1981. Component = module.Component;
  1982. }, function (module) {
  1983. UI_Rank_Item = module.UI_Rank_Item;
  1984. }, function (module) {
  1985. List = module.default;
  1986. }],
  1987. execute: function () {
  1988. var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
  1989. cclegacy._RF.push({}, "2eda949TxVMN7XvpxY3t5gw", "Layout_Rank", undefined);
  1990. var ccclass = _decorator.ccclass,
  1991. property = _decorator.property;
  1992. var Layout_Rank = exports('Layout_Rank', (_dec = ccclass('Layout_Rank'), _dec2 = property(Button), _dec3 = property(Toggle), _dec4 = property(Toggle), _dec5 = property(List), _dec6 = property(List), _dec7 = property(UI_Rank_Item), _dec8 = property(UI_Rank_Item), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  1993. _inheritsLoose(Layout_Rank, _Component);
  1994. function Layout_Rank() {
  1995. var _this;
  1996. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1997. args[_key] = arguments[_key];
  1998. }
  1999. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  2000. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  2001. _initializerDefineProperty(_this, "Rank_Toggle_1", _descriptor2, _assertThisInitialized(_this));
  2002. _initializerDefineProperty(_this, "Rank_Toggle_2", _descriptor3, _assertThisInitialized(_this));
  2003. //列表
  2004. _initializerDefineProperty(_this, "list1", _descriptor4, _assertThisInitialized(_this));
  2005. //列表
  2006. _initializerDefineProperty(_this, "list2", _descriptor5, _assertThisInitialized(_this));
  2007. _initializerDefineProperty(_this, "own1_item", _descriptor6, _assertThisInitialized(_this));
  2008. _initializerDefineProperty(_this, "own2_item", _descriptor7, _assertThisInitialized(_this));
  2009. _this.onList1 = void 0;
  2010. _this.onList2 = void 0;
  2011. return _this;
  2012. }
  2013. var _proto = Layout_Rank.prototype;
  2014. _proto.onListRender1 = function onListRender1(item, idx) {
  2015. var _this$onList;
  2016. (_this$onList = this.onList1) == null || _this$onList.call(this, item, idx);
  2017. };
  2018. _proto.onListRender2 = function onListRender2(item, idx) {
  2019. var _this$onList2;
  2020. (_this$onList2 = this.onList2) == null || _this$onList2.call(this, item, idx);
  2021. };
  2022. _proto.onDestroy = function onDestroy() {
  2023. this.onList1 = null;
  2024. this.onList2 = null;
  2025. };
  2026. return Layout_Rank;
  2027. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  2028. configurable: true,
  2029. enumerable: true,
  2030. writable: true,
  2031. initializer: null
  2032. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Rank_Toggle_1", [_dec3], {
  2033. configurable: true,
  2034. enumerable: true,
  2035. writable: true,
  2036. initializer: null
  2037. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Rank_Toggle_2", [_dec4], {
  2038. configurable: true,
  2039. enumerable: true,
  2040. writable: true,
  2041. initializer: null
  2042. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "list1", [_dec5], {
  2043. configurable: true,
  2044. enumerable: true,
  2045. writable: true,
  2046. initializer: function initializer() {
  2047. return null;
  2048. }
  2049. }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "list2", [_dec6], {
  2050. configurable: true,
  2051. enumerable: true,
  2052. writable: true,
  2053. initializer: function initializer() {
  2054. return null;
  2055. }
  2056. }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "own1_item", [_dec7], {
  2057. configurable: true,
  2058. enumerable: true,
  2059. writable: true,
  2060. initializer: null
  2061. }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "own2_item", [_dec8], {
  2062. configurable: true,
  2063. enumerable: true,
  2064. writable: true,
  2065. initializer: null
  2066. })), _class2)) || _class));
  2067. cclegacy._RF.pop();
  2068. }
  2069. };
  2070. });
  2071. System.register("chunks:///_virtual/Layout_Settings.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  2072. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Toggle, Component;
  2073. return {
  2074. setters: [function (module) {
  2075. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  2076. _inheritsLoose = module.inheritsLoose;
  2077. _initializerDefineProperty = module.initializerDefineProperty;
  2078. _assertThisInitialized = module.assertThisInitialized;
  2079. }, function (module) {
  2080. cclegacy = module.cclegacy;
  2081. _decorator = module._decorator;
  2082. Button = module.Button;
  2083. Toggle = module.Toggle;
  2084. Component = module.Component;
  2085. }],
  2086. execute: function () {
  2087. var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
  2088. cclegacy._RF.push({}, "a23fc68/1dLFoa1EwXrpQkk", "Layout_Settings", undefined);
  2089. var ccclass = _decorator.ccclass,
  2090. property = _decorator.property;
  2091. var Layout_Settings = exports('Layout_Settings', (_dec = ccclass('Layout_Settings'), _dec2 = property(Button), _dec3 = property(Toggle), _dec4 = property(Toggle), _dec5 = property(Button), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  2092. _inheritsLoose(Layout_Settings, _Component);
  2093. function Layout_Settings() {
  2094. var _this;
  2095. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2096. args[_key] = arguments[_key];
  2097. }
  2098. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  2099. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  2100. _initializerDefineProperty(_this, "Toggle_Music", _descriptor2, _assertThisInitialized(_this));
  2101. _initializerDefineProperty(_this, "Toggle_Sound", _descriptor3, _assertThisInitialized(_this));
  2102. _initializerDefineProperty(_this, "Defeat_Btn", _descriptor4, _assertThisInitialized(_this));
  2103. return _this;
  2104. }
  2105. return Layout_Settings;
  2106. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  2107. configurable: true,
  2108. enumerable: true,
  2109. writable: true,
  2110. initializer: null
  2111. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Toggle_Music", [_dec3], {
  2112. configurable: true,
  2113. enumerable: true,
  2114. writable: true,
  2115. initializer: null
  2116. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Toggle_Sound", [_dec4], {
  2117. configurable: true,
  2118. enumerable: true,
  2119. writable: true,
  2120. initializer: null
  2121. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Defeat_Btn", [_dec5], {
  2122. configurable: true,
  2123. enumerable: true,
  2124. writable: true,
  2125. initializer: null
  2126. })), _class2)) || _class));
  2127. cclegacy._RF.pop();
  2128. }
  2129. };
  2130. });
  2131. System.register("chunks:///_virtual/Layout_SideBar.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  2132. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Sprite, SpriteFrame, Component;
  2133. return {
  2134. setters: [function (module) {
  2135. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  2136. _inheritsLoose = module.inheritsLoose;
  2137. _initializerDefineProperty = module.initializerDefineProperty;
  2138. _assertThisInitialized = module.assertThisInitialized;
  2139. }, function (module) {
  2140. cclegacy = module.cclegacy;
  2141. _decorator = module._decorator;
  2142. Button = module.Button;
  2143. Sprite = module.Sprite;
  2144. SpriteFrame = module.SpriteFrame;
  2145. Component = module.Component;
  2146. }],
  2147. execute: function () {
  2148. var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
  2149. cclegacy._RF.push({}, "71db0Dfd1dNiLKKSZRT/O0i", "Layout_SideBar", undefined);
  2150. var ccclass = _decorator.ccclass,
  2151. property = _decorator.property;
  2152. var Layout_SideBar = exports('Layout_SideBar', (_dec = ccclass('Layout_SideBar'), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Sprite), _dec5 = property([SpriteFrame]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  2153. _inheritsLoose(Layout_SideBar, _Component);
  2154. function Layout_SideBar() {
  2155. var _this;
  2156. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2157. args[_key] = arguments[_key];
  2158. }
  2159. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  2160. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  2161. _initializerDefineProperty(_this, "Go_SideBar", _descriptor2, _assertThisInitialized(_this));
  2162. _initializerDefineProperty(_this, "Logo", _descriptor3, _assertThisInitialized(_this));
  2163. _initializerDefineProperty(_this, "Logos", _descriptor4, _assertThisInitialized(_this));
  2164. return _this;
  2165. }
  2166. return Layout_SideBar;
  2167. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  2168. configurable: true,
  2169. enumerable: true,
  2170. writable: true,
  2171. initializer: null
  2172. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Go_SideBar", [_dec3], {
  2173. configurable: true,
  2174. enumerable: true,
  2175. writable: true,
  2176. initializer: null
  2177. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Logo", [_dec4], {
  2178. configurable: true,
  2179. enumerable: true,
  2180. writable: true,
  2181. initializer: null
  2182. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Logos", [_dec5], {
  2183. configurable: true,
  2184. enumerable: true,
  2185. writable: true,
  2186. initializer: function initializer() {
  2187. return [];
  2188. }
  2189. })), _class2)) || _class));
  2190. cclegacy._RF.pop();
  2191. }
  2192. };
  2193. });
  2194. System.register("chunks:///_virtual/Layout_Sign.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Sign_Reward.ts'], function (exports) {
  2195. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Toggle, Component, Sign_Reward;
  2196. return {
  2197. setters: [function (module) {
  2198. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  2199. _inheritsLoose = module.inheritsLoose;
  2200. _initializerDefineProperty = module.initializerDefineProperty;
  2201. _assertThisInitialized = module.assertThisInitialized;
  2202. }, function (module) {
  2203. cclegacy = module.cclegacy;
  2204. _decorator = module._decorator;
  2205. Button = module.Button;
  2206. Toggle = module.Toggle;
  2207. Component = module.Component;
  2208. }, function (module) {
  2209. Sign_Reward = module.Sign_Reward;
  2210. }],
  2211. execute: function () {
  2212. var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
  2213. cclegacy._RF.push({}, "f3b5dQdde1MGb2BgYEWz0N9", "Layout_Sign", undefined);
  2214. var ccclass = _decorator.ccclass,
  2215. property = _decorator.property;
  2216. var Layout_Sign = exports('Layout_Sign', (_dec = ccclass('Layout_Sign'), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property([Sign_Reward]), _dec5 = property(Toggle), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  2217. _inheritsLoose(Layout_Sign, _Component);
  2218. function Layout_Sign() {
  2219. var _this;
  2220. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2221. args[_key] = arguments[_key];
  2222. }
  2223. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  2224. _initializerDefineProperty(_this, "Return", _descriptor, _assertThisInitialized(_this));
  2225. _initializerDefineProperty(_this, "Free_Get", _descriptor2, _assertThisInitialized(_this));
  2226. _initializerDefineProperty(_this, "Sign_Reward", _descriptor3, _assertThisInitialized(_this));
  2227. _initializerDefineProperty(_this, "Toggle", _descriptor4, _assertThisInitialized(_this));
  2228. return _this;
  2229. }
  2230. return Layout_Sign;
  2231. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Return", [_dec2], {
  2232. configurable: true,
  2233. enumerable: true,
  2234. writable: true,
  2235. initializer: function initializer() {
  2236. return null;
  2237. }
  2238. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Free_Get", [_dec3], {
  2239. configurable: true,
  2240. enumerable: true,
  2241. writable: true,
  2242. initializer: function initializer() {
  2243. return null;
  2244. }
  2245. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Sign_Reward", [_dec4], {
  2246. configurable: true,
  2247. enumerable: true,
  2248. writable: true,
  2249. initializer: function initializer() {
  2250. return [];
  2251. }
  2252. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Toggle", [_dec5], {
  2253. configurable: true,
  2254. enumerable: true,
  2255. writable: true,
  2256. initializer: function initializer() {
  2257. return null;
  2258. }
  2259. })), _class2)) || _class));
  2260. cclegacy._RF.pop();
  2261. }
  2262. };
  2263. });
  2264. System.register("chunks:///_virtual/Layout_Store.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  2265. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Component;
  2266. return {
  2267. setters: [function (module) {
  2268. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  2269. _inheritsLoose = module.inheritsLoose;
  2270. _initializerDefineProperty = module.initializerDefineProperty;
  2271. _assertThisInitialized = module.assertThisInitialized;
  2272. }, function (module) {
  2273. cclegacy = module.cclegacy;
  2274. _decorator = module._decorator;
  2275. Button = module.Button;
  2276. Label = module.Label;
  2277. Component = module.Component;
  2278. }],
  2279. execute: function () {
  2280. var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
  2281. cclegacy._RF.push({}, "168251ehqRBGpKPm5es9+sr", "Layout_Store", undefined);
  2282. var ccclass = _decorator.ccclass,
  2283. property = _decorator.property;
  2284. var Layout_Store = exports('Layout_Store', (_dec = ccclass('Layout_Store'), _dec2 = property(Button), _dec3 = property(Label), _dec4 = property([Button]), _dec5 = property([Button]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  2285. _inheritsLoose(Layout_Store, _Component);
  2286. function Layout_Store() {
  2287. var _this;
  2288. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2289. args[_key] = arguments[_key];
  2290. }
  2291. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  2292. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  2293. _initializerDefineProperty(_this, "Coin_Num", _descriptor2, _assertThisInitialized(_this));
  2294. _initializerDefineProperty(_this, "Free_Gets", _descriptor3, _assertThisInitialized(_this));
  2295. _initializerDefineProperty(_this, "Coin_Gets", _descriptor4, _assertThisInitialized(_this));
  2296. return _this;
  2297. } // @property([Number])
  2298. // Type:number[]=[];
  2299. // @property([Number])
  2300. // Value:number[]=[];
  2301. return Layout_Store;
  2302. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  2303. configurable: true,
  2304. enumerable: true,
  2305. writable: true,
  2306. initializer: null
  2307. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Coin_Num", [_dec3], {
  2308. configurable: true,
  2309. enumerable: true,
  2310. writable: true,
  2311. initializer: null
  2312. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Free_Gets", [_dec4], {
  2313. configurable: true,
  2314. enumerable: true,
  2315. writable: true,
  2316. initializer: function initializer() {
  2317. return [];
  2318. }
  2319. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Coin_Gets", [_dec5], {
  2320. configurable: true,
  2321. enumerable: true,
  2322. writable: true,
  2323. initializer: function initializer() {
  2324. return [];
  2325. }
  2326. })), _class2)) || _class));
  2327. cclegacy._RF.pop();
  2328. }
  2329. };
  2330. });
  2331. System.register("chunks:///_virtual/Layout_Task.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UI_Task_Item.ts'], function (exports) {
  2332. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Component, UI_Task_Item;
  2333. return {
  2334. setters: [function (module) {
  2335. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  2336. _inheritsLoose = module.inheritsLoose;
  2337. _initializerDefineProperty = module.initializerDefineProperty;
  2338. _assertThisInitialized = module.assertThisInitialized;
  2339. }, function (module) {
  2340. cclegacy = module.cclegacy;
  2341. _decorator = module._decorator;
  2342. Button = module.Button;
  2343. Component = module.Component;
  2344. }, function (module) {
  2345. UI_Task_Item = module.UI_Task_Item;
  2346. }],
  2347. execute: function () {
  2348. var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
  2349. cclegacy._RF.push({}, "631c35AMklFxpXm9TxsykQi", "Layout_Task", undefined);
  2350. var ccclass = _decorator.ccclass,
  2351. property = _decorator.property;
  2352. var Layout_Task = exports('Layout_Task', (_dec = ccclass('Layout_Task'), _dec2 = property(Button), _dec3 = property([UI_Task_Item]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  2353. _inheritsLoose(Layout_Task, _Component);
  2354. function Layout_Task() {
  2355. var _this;
  2356. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2357. args[_key] = arguments[_key];
  2358. }
  2359. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  2360. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  2361. _initializerDefineProperty(_this, "Task_Items", _descriptor2, _assertThisInitialized(_this));
  2362. return _this;
  2363. }
  2364. return Layout_Task;
  2365. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  2366. configurable: true,
  2367. enumerable: true,
  2368. writable: true,
  2369. initializer: null
  2370. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Task_Items", [_dec3], {
  2371. configurable: true,
  2372. enumerable: true,
  2373. writable: true,
  2374. initializer: function initializer() {
  2375. return [];
  2376. }
  2377. })), _class2)) || _class));
  2378. cclegacy._RF.pop();
  2379. }
  2380. };
  2381. });
  2382. System.register("chunks:///_virtual/Layout_TimesOver.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  2383. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, ProgressBar, Label, Sprite, Component;
  2384. return {
  2385. setters: [function (module) {
  2386. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  2387. _inheritsLoose = module.inheritsLoose;
  2388. _initializerDefineProperty = module.initializerDefineProperty;
  2389. _assertThisInitialized = module.assertThisInitialized;
  2390. }, function (module) {
  2391. cclegacy = module.cclegacy;
  2392. _decorator = module._decorator;
  2393. Button = module.Button;
  2394. ProgressBar = module.ProgressBar;
  2395. Label = module.Label;
  2396. Sprite = module.Sprite;
  2397. Component = module.Component;
  2398. }],
  2399. execute: function () {
  2400. var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
  2401. cclegacy._RF.push({}, "b2d18riwBtISKbYok7OSEvq", "Layout_TimesOver", undefined);
  2402. var ccclass = _decorator.ccclass,
  2403. property = _decorator.property;
  2404. var Layout_TimesOver = exports('Layout_TimesOver', (_dec = ccclass('Layout_TimesOver'), _dec2 = property(Button), _dec3 = property(ProgressBar), _dec4 = property(Label), _dec5 = property(Button), _dec6 = property(Sprite), _dec7 = property(Label), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  2405. _inheritsLoose(Layout_TimesOver, _Component);
  2406. function Layout_TimesOver() {
  2407. var _this;
  2408. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2409. args[_key] = arguments[_key];
  2410. }
  2411. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  2412. _initializerDefineProperty(_this, "Close_Btn", _descriptor, _assertThisInitialized(_this));
  2413. _initializerDefineProperty(_this, "progressBar", _descriptor2, _assertThisInitialized(_this));
  2414. _initializerDefineProperty(_this, "progressBar_Percent", _descriptor3, _assertThisInitialized(_this));
  2415. _initializerDefineProperty(_this, "AddTime", _descriptor4, _assertThisInitialized(_this));
  2416. _initializerDefineProperty(_this, "AddTime_Ad", _descriptor5, _assertThisInitialized(_this));
  2417. _initializerDefineProperty(_this, "RedPoint_num", _descriptor6, _assertThisInitialized(_this));
  2418. return _this;
  2419. }
  2420. return Layout_TimesOver;
  2421. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Close_Btn", [_dec2], {
  2422. configurable: true,
  2423. enumerable: true,
  2424. writable: true,
  2425. initializer: null
  2426. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "progressBar", [_dec3], {
  2427. configurable: true,
  2428. enumerable: true,
  2429. writable: true,
  2430. initializer: null
  2431. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "progressBar_Percent", [_dec4], {
  2432. configurable: true,
  2433. enumerable: true,
  2434. writable: true,
  2435. initializer: null
  2436. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "AddTime", [_dec5], {
  2437. configurable: true,
  2438. enumerable: true,
  2439. writable: true,
  2440. initializer: null
  2441. }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "AddTime_Ad", [_dec6], {
  2442. configurable: true,
  2443. enumerable: true,
  2444. writable: true,
  2445. initializer: null
  2446. }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "RedPoint_num", [_dec7], {
  2447. configurable: true,
  2448. enumerable: true,
  2449. writable: true,
  2450. initializer: null
  2451. })), _class2)) || _class));
  2452. cclegacy._RF.pop();
  2453. }
  2454. };
  2455. });
  2456. System.register("chunks:///_virtual/Layout_Win.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  2457. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Button, Label, Component;
  2458. return {
  2459. setters: [function (module) {
  2460. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  2461. _inheritsLoose = module.inheritsLoose;
  2462. _initializerDefineProperty = module.initializerDefineProperty;
  2463. _assertThisInitialized = module.assertThisInitialized;
  2464. }, function (module) {
  2465. cclegacy = module.cclegacy;
  2466. _decorator = module._decorator;
  2467. Button = module.Button;
  2468. Label = module.Label;
  2469. Component = module.Component;
  2470. }],
  2471. execute: function () {
  2472. var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
  2473. cclegacy._RF.push({}, "50934s35tNAHrMqaGeR9pJX", "Layout_Win", undefined);
  2474. var ccclass = _decorator.ccclass,
  2475. property = _decorator.property;
  2476. var Layout_Win = exports('Layout_Win', (_dec = ccclass('Layout_Win'), _dec2 = property(Button), _dec3 = property(Button), _dec4 = property(Button), _dec5 = property(Label), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  2477. _inheritsLoose(Layout_Win, _Component);
  2478. function Layout_Win() {
  2479. var _this;
  2480. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2481. args[_key] = arguments[_key];
  2482. }
  2483. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  2484. _initializerDefineProperty(_this, "Three_Btn", _descriptor, _assertThisInitialized(_this));
  2485. _initializerDefineProperty(_this, "Next_Btn", _descriptor2, _assertThisInitialized(_this));
  2486. _initializerDefineProperty(_this, "ReturnHall_Btn", _descriptor3, _assertThisInitialized(_this));
  2487. _initializerDefineProperty(_this, "Txt", _descriptor4, _assertThisInitialized(_this));
  2488. _this.Container = void 0;
  2489. return _this;
  2490. }
  2491. return Layout_Win;
  2492. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Three_Btn", [_dec2], {
  2493. configurable: true,
  2494. enumerable: true,
  2495. writable: true,
  2496. initializer: null
  2497. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Next_Btn", [_dec3], {
  2498. configurable: true,
  2499. enumerable: true,
  2500. writable: true,
  2501. initializer: null
  2502. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "ReturnHall_Btn", [_dec4], {
  2503. configurable: true,
  2504. enumerable: true,
  2505. writable: true,
  2506. initializer: null
  2507. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Txt", [_dec5], {
  2508. configurable: true,
  2509. enumerable: true,
  2510. writable: true,
  2511. initializer: null
  2512. })), _class2)) || _class));
  2513. cclegacy._RF.pop();
  2514. }
  2515. };
  2516. });
  2517. System.register("chunks:///_virtual/module_game", ['./Container_Manager.ts', './CreateIdiom.ts', './Cube_Infor.ts', './GameCtl.ts', './PlayerData.ts', './Hall.ts', './UI_Head_Icon.ts', './UI_Item.ts', './Layout_Fail.ts', './UI_Fail.ts', './Layout_GameRules.ts', './UI_GameRules.ts', './Layout_Hall.ts', './UI_Hall.ts', './Layout_Idioms.ts', './UI_Idiom.ts', './UI_Idioms.ts', './Layout_Invite.ts', './UI_Invite.ts', './Layout_LatticeFull.ts', './UI_LatticeFull.ts', './Layout_Lock.ts', './UI_Lock.ts', './Layout_Main.ts', './UI_Main.ts', './Layout_Rank.ts', './UI_Rank.ts', './UI_Rank_Item.ts', './Layout_Settings.ts', './UI_Settings.ts', './Layout_SideBar.ts', './UI_SideBar.ts', './Layout_Sign.ts', './Sign_Reward.ts', './UI_Sign.ts', './Layout_Store.ts', './UI_Store.ts', './Layout_Task.ts', './UI_Task.ts', './UI_Task_Item.ts', './Layout_TimesOver.ts', './UI_TimesOver.ts', './Layout_Win.ts', './UI_Win.ts'], function () {
  2518. return {
  2519. setters: [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null],
  2520. execute: function () {}
  2521. };
  2522. });
  2523. System.register("chunks:///_virtual/PlayerData.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ch.ts', './ui.ts', './Container.ts', './GameData.ts', './Toast.ts', './UI_Main.ts'], function (exports) {
  2524. var _inheritsLoose, _createClass, _asyncToGenerator, _regeneratorRuntime, cclegacy, ch, gui, Container, GameData, Toast, UI_Main;
  2525. return {
  2526. setters: [function (module) {
  2527. _inheritsLoose = module.inheritsLoose;
  2528. _createClass = module.createClass;
  2529. _asyncToGenerator = module.asyncToGenerator;
  2530. _regeneratorRuntime = module.regeneratorRuntime;
  2531. }, function (module) {
  2532. cclegacy = module.cclegacy;
  2533. }, function (module) {
  2534. ch = module.ch;
  2535. }, function (module) {
  2536. gui = module.gui;
  2537. }, function (module) {
  2538. Container = module.Container;
  2539. }, function (module) {
  2540. GameData = module.default;
  2541. }, function (module) {
  2542. Toast = module.Toast;
  2543. }, function (module) {
  2544. UI_Main = module.UI_Main;
  2545. }],
  2546. execute: function () {
  2547. cclegacy._RF.push({}, "b500dzoF+pEaLB1EsW0vW75", "PlayerData", undefined);
  2548. //定义事件
  2549. //排行榜key
  2550. var rand_type = exports('rand_type', /*#__PURE__*/function (rand_type) {
  2551. rand_type["floor"] = "floor";
  2552. return rand_type;
  2553. }({})); //最高层数
  2554. //自定义数据
  2555. var data_type = exports('data_type', /*#__PURE__*/function (data_type) {
  2556. data_type["last_gift_sidebar"] = "last_gift_sidebar";
  2557. data_type["max_floor"] = "max_floor";
  2558. data_type["coin"] = "coin";
  2559. return data_type;
  2560. }({})); //铜币
  2561. //每日数据
  2562. var day_data_type = exports('day_data_type', /*#__PURE__*/function (day_data_type) {
  2563. day_data_type["isFavorite"] = "isFavorite";
  2564. day_data_type["pass_level"] = "pass_level";
  2565. day_data_type["combine_num"] = "combine_num";
  2566. day_data_type["login_num"] = "login_num";
  2567. day_data_type["use_item"] = "use_item";
  2568. day_data_type["watch_ad"] = "watch_ad";
  2569. day_data_type["task_reward_state"] = "task_reward_state";
  2570. day_data_type["store_state"] = "store_state";
  2571. return day_data_type;
  2572. }({})); //商店状态
  2573. //每周数据
  2574. var week_data_type = exports('week_data_type', /*#__PURE__*/function (week_data_type) {
  2575. week_data_type["sign_day"] = "sign_day";
  2576. return week_data_type;
  2577. }({})); //签到奖励
  2578. //每月数据
  2579. var month_data_type = exports('month_data_type', /*#__PURE__*/function (month_data_type) {
  2580. return month_data_type;
  2581. }({}));
  2582. var PlayerData = exports('default', /*#__PURE__*/function (_GameData) {
  2583. _inheritsLoose(PlayerData, _GameData);
  2584. function PlayerData() {
  2585. var _this;
  2586. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2587. args[_key] = arguments[_key];
  2588. }
  2589. _this = _GameData.call.apply(_GameData, [this].concat(args)) || this;
  2590. _this.event = ch.get_new_event();
  2591. //道具容器
  2592. _this.items = new Container();
  2593. _this.user_info = void 0;
  2594. return _this;
  2595. }
  2596. PlayerData.getInstance = function getInstance(gid, uid) {
  2597. if (!this._instance) {
  2598. this._instance = new PlayerData(gid, uid, "PlayerData", new Map([[data_type.max_floor, {
  2599. min: 0
  2600. }], [data_type.coin, {
  2601. min: 0
  2602. }]]), new Map([[day_data_type.isFavorite, {
  2603. min: 0
  2604. }], [day_data_type.pass_level, {
  2605. min: 0,
  2606. max: 5
  2607. }], [day_data_type.combine_num, {
  2608. min: 0,
  2609. max: 100
  2610. }], [day_data_type.login_num, {
  2611. min: 0,
  2612. max: 1
  2613. }], [day_data_type.use_item, {
  2614. min: 0,
  2615. max: 3
  2616. }], [day_data_type.watch_ad, {
  2617. min: 0,
  2618. max: 8
  2619. }]]), new Map([[week_data_type.sign_day, {
  2620. min: 0,
  2621. max: 7
  2622. }]]));
  2623. }
  2624. return this._instance;
  2625. }
  2626. //数据初始化
  2627. ;
  2628. var _proto = PlayerData.prototype;
  2629. _proto.on_init = function on_init() {
  2630. ch.sign.init(2, null, 7);
  2631. this.items.addItem({
  2632. type: 1,
  2633. count: 1
  2634. });
  2635. this.items.addItem({
  2636. type: 2,
  2637. count: 1
  2638. });
  2639. this.items.addItem({
  2640. type: 3,
  2641. count: 1
  2642. });
  2643. this.items.addItem({
  2644. type: 5,
  2645. count: 0
  2646. });
  2647. //道具初始化
  2648. ch.log.log("道具初始化", this);
  2649. }
  2650. //序列化加入自定义数据
  2651. ;
  2652. _proto.on_serialize = function on_serialize(data) {
  2653. data.sign = ch.sign.getSignData();
  2654. data.items = this.items.serialize();
  2655. }
  2656. //反序列化加入自定义数据
  2657. ;
  2658. _proto.on_unserialize = function on_unserialize(data) {
  2659. this.items.unserialize(data.items);
  2660. ch.sign.init(2, data.sign, 7);
  2661. }
  2662. //是否使用远程数据
  2663. ;
  2664. _proto.on_check = function on_check(local, remote) {
  2665. return true;
  2666. }
  2667. /**使用道具*/;
  2668. _proto.use_item = /*#__PURE__*/
  2669. function () {
  2670. var _use_item = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(type, count) {
  2671. var layout, ret;
  2672. return _regeneratorRuntime().wrap(function _callee$(_context) {
  2673. while (1) switch (_context.prev = _context.next) {
  2674. case 0:
  2675. if (count === void 0) {
  2676. count = 1;
  2677. }
  2678. // if (GameLink.getInst().state != GameState.wait) return;
  2679. layout = gui.get(UI_Main).getLayout();
  2680. ret = this.items.useCount(type, count);
  2681. if (ret) {
  2682. if (type == 1) {
  2683. layout.Container.eliminate();
  2684. } else if (type == 2) {
  2685. layout.Container.shuffle();
  2686. } else if (type == 3) {
  2687. layout.Container.Empty();
  2688. } else if (type == 5) {
  2689. layout.Container.AddTime();
  2690. }
  2691. this.set_use_item_num(1);
  2692. this.event.emit(this.event.key.item_count, ret.type, ret.count);
  2693. this.setDirty();
  2694. }
  2695. case 4:
  2696. case "end":
  2697. return _context.stop();
  2698. }
  2699. }, _callee, this);
  2700. }));
  2701. function use_item(_x, _x2) {
  2702. return _use_item.apply(this, arguments);
  2703. }
  2704. return use_item;
  2705. }() /**增加道具*/;
  2706. _proto.add_item = function add_item(type, count) {
  2707. if (count === void 0) {
  2708. count = 1;
  2709. }
  2710. var ret = this.items.addCount(type, count);
  2711. if (ret) {
  2712. this.event.emit(this.event.key.item_count, ret.type, ret.count);
  2713. this.setDirty();
  2714. }
  2715. };
  2716. _proto.set_item = function set_item(type, count) {
  2717. if (count === void 0) {
  2718. count = -1;
  2719. }
  2720. var c = this.get_item(type);
  2721. if (type < count) {
  2722. this.add_item(type, count - c);
  2723. }
  2724. };
  2725. _proto.get_item = function get_item(type) {
  2726. return this.items.getCount(type);
  2727. }
  2728. //获取签到天数
  2729. ;
  2730. _proto.get_sign = function get_sign() {
  2731. return this.week_data.get(week_data_type.sign_day);
  2732. }
  2733. //设置签到天数
  2734. ;
  2735. _proto.set_sign = function set_sign(count) {
  2736. this.week_data.set(week_data_type.sign_day, count);
  2737. }
  2738. //获取是否当日首次通过收藏进入
  2739. ;
  2740. _proto.get_is_favorite = function get_is_favorite() {
  2741. return this.day_data.get(day_data_type.isFavorite);
  2742. }
  2743. //设置已从收藏进入
  2744. ;
  2745. _proto.set_is_favorite = function set_is_favorite() {
  2746. this.day_data.set(day_data_type.isFavorite, 1);
  2747. this.setDirty();
  2748. }
  2749. //获取关卡数
  2750. ;
  2751. _proto.get_max_floor = function get_max_floor() {
  2752. return this.data.get(data_type.max_floor);
  2753. }
  2754. //设置关卡数
  2755. ;
  2756. _proto.set_max_floor = function set_max_floor(floor) {
  2757. this.data.set(data_type.max_floor, floor);
  2758. }
  2759. //获取铜币数量
  2760. ;
  2761. _proto.get_coin = function get_coin() {
  2762. return this.data.get(data_type.coin);
  2763. }
  2764. //设置铜币数量
  2765. ;
  2766. _proto.set_coin = function set_coin(coin) {
  2767. this.data.set(data_type.coin, coin);
  2768. this.setDirty();
  2769. }
  2770. //获取今日通关数
  2771. ;
  2772. _proto.get_pass_level = function get_pass_level() {
  2773. return this.day_data.get(day_data_type.pass_level);
  2774. }
  2775. //设置今日通关数
  2776. ;
  2777. _proto.set_pass_level = function set_pass_level(level) {
  2778. this.day_data.add(day_data_type.pass_level, level);
  2779. }
  2780. //获取匹配成语数量
  2781. ;
  2782. _proto.get_combine_num = function get_combine_num() {
  2783. return this.day_data.get(day_data_type.combine_num);
  2784. }
  2785. //设置匹配成语数量
  2786. ;
  2787. _proto.set_combine_num = function set_combine_num(num) {
  2788. this.day_data.add(day_data_type.combine_num, num);
  2789. this.setDirty();
  2790. }
  2791. //获取登录次数
  2792. ;
  2793. _proto.get_login_num = function get_login_num() {
  2794. return this.day_data.get(day_data_type.login_num);
  2795. }
  2796. //设置登录次数
  2797. ;
  2798. _proto.set_login_num = function set_login_num(num) {
  2799. this.day_data.add(day_data_type.login_num, num);
  2800. this.setDirty();
  2801. }
  2802. //获取今日使用道具数量
  2803. ;
  2804. _proto.get_use_item_num = function get_use_item_num() {
  2805. return this.day_data.get(day_data_type.use_item);
  2806. }
  2807. //设置今日使用道具数量
  2808. ;
  2809. _proto.set_use_item_num = function set_use_item_num(num) {
  2810. this.day_data.add(day_data_type.use_item, num);
  2811. }
  2812. //获取今日广告观看数量
  2813. ;
  2814. _proto.get_watch_ad_num = function get_watch_ad_num() {
  2815. return this.day_data.get(day_data_type.watch_ad);
  2816. }
  2817. //设置今日广告观看数量
  2818. ;
  2819. _proto.set_watch_ad_num = function set_watch_ad_num(num) {
  2820. this.day_data.add(day_data_type.watch_ad, num);
  2821. this.setDirty();
  2822. }
  2823. //获取任务奖励状态
  2824. ;
  2825. _proto.get_task_state = function get_task_state() {
  2826. return this.day_data.get_Array(day_data_type.task_reward_state);
  2827. }
  2828. //设置任务奖励状态
  2829. ;
  2830. _proto.set_task_state = function set_task_state(task_state) {
  2831. this.day_data.set_Array(day_data_type.task_reward_state, task_state);
  2832. this.setDirty();
  2833. }
  2834. //获取商店免费领取状态
  2835. ;
  2836. _proto.get_store_state = function get_store_state() {
  2837. return this.day_data.get_Array(day_data_type.store_state);
  2838. }
  2839. //设置商店免费领取状态
  2840. ;
  2841. _proto.set_store_state = function set_store_state(shop_state) {
  2842. this.day_data.set_Array(day_data_type.store_state, shop_state);
  2843. this.setDirty();
  2844. }
  2845. //////////////////////////////////////////////////////////////////////////////////////////
  2846. ;
  2847. _proto.load_data = /*#__PURE__*/
  2848. function () {
  2849. var _load_data = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
  2850. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  2851. while (1) switch (_context2.prev = _context2.next) {
  2852. case 0:
  2853. return _context2.abrupt("return", _GameData.prototype.load_data.call(this));
  2854. case 1:
  2855. case "end":
  2856. return _context2.stop();
  2857. }
  2858. }, _callee2, this);
  2859. }));
  2860. function load_data() {
  2861. return _load_data.apply(this, arguments);
  2862. }
  2863. return load_data;
  2864. }();
  2865. _proto.init_user_info = /*#__PURE__*/function () {
  2866. var _init_user_info = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
  2867. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  2868. while (1) switch (_context3.prev = _context3.next) {
  2869. case 0:
  2870. this.user_info = {
  2871. uid: this.uid,
  2872. nickName: ch.sdk.get_player_info().nickName,
  2873. avatar: ch.sdk.get_player_info().avatarUrl,
  2874. province: ch.sdk.get_player_info().province
  2875. };
  2876. case 1:
  2877. case "end":
  2878. return _context3.stop();
  2879. }
  2880. }, _callee3, this);
  2881. }));
  2882. function init_user_info() {
  2883. return _init_user_info.apply(this, arguments);
  2884. }
  2885. return init_user_info;
  2886. }();
  2887. _proto.save_data = /*#__PURE__*/function () {
  2888. var _save_data2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_save_data) {
  2889. return _regeneratorRuntime().wrap(function _callee4$(_context4) {
  2890. while (1) switch (_context4.prev = _context4.next) {
  2891. case 0:
  2892. return _context4.abrupt("return", _GameData.prototype.save_data.call(this, _save_data));
  2893. case 1:
  2894. case "end":
  2895. return _context4.stop();
  2896. }
  2897. }, _callee4, this);
  2898. }));
  2899. function save_data(_x3) {
  2900. return _save_data2.apply(this, arguments);
  2901. }
  2902. return save_data;
  2903. }();
  2904. _proto.save_rank_floor = /*#__PURE__*/function () {
  2905. var _save_rank_floor = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
  2906. var floor;
  2907. return _regeneratorRuntime().wrap(function _callee5$(_context5) {
  2908. while (1) switch (_context5.prev = _context5.next) {
  2909. case 0:
  2910. floor = this.data.get(data_type.max_floor);
  2911. ch.sdk.saveRankData(rand_type.floor, floor, ch.sdk.updateType.none, 0, {
  2912. province: this.user_info.province
  2913. });
  2914. case 2:
  2915. case "end":
  2916. return _context5.stop();
  2917. }
  2918. }, _callee5, this);
  2919. }));
  2920. function save_rank_floor() {
  2921. return _save_rank_floor.apply(this, arguments);
  2922. }
  2923. return save_rank_floor;
  2924. }();
  2925. _proto.get_rank_floor = /*#__PURE__*/function () {
  2926. var _get_rank_floor = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
  2927. var index, d, i;
  2928. return _regeneratorRuntime().wrap(function _callee6$(_context6) {
  2929. while (1) switch (_context6.prev = _context6.next) {
  2930. case 0:
  2931. index = 0;
  2932. _context6.next = 3;
  2933. return ch.sdk.loadRankData(rand_type.floor, ch.sdk.updateType.none, 100, true, false);
  2934. case 3:
  2935. d = _context6.sent;
  2936. console.log("排行榜", d);
  2937. if (d.data.own) {
  2938. for (i = 0; i < d.data.list.length; i++) {
  2939. if (d.data.own.userId === d.data.list[i].userId) {
  2940. index = i + 1;
  2941. }
  2942. }
  2943. } else {
  2944. index = 101;
  2945. }
  2946. return _context6.abrupt("return", {
  2947. list: d.data.list,
  2948. owner: d.data.own,
  2949. index: index
  2950. });
  2951. case 7:
  2952. case "end":
  2953. return _context6.stop();
  2954. }
  2955. }, _callee6);
  2956. }));
  2957. function get_rank_floor() {
  2958. return _get_rank_floor.apply(this, arguments);
  2959. }
  2960. return get_rank_floor;
  2961. }();
  2962. _proto.loadPfInfo = /*#__PURE__*/function () {
  2963. var _loadPfInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
  2964. return _regeneratorRuntime().wrap(function _callee8$(_context8) {
  2965. while (1) switch (_context8.prev = _context8.next) {
  2966. case 0:
  2967. return _context8.abrupt("return", new Promise( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(resolve) {
  2968. var k;
  2969. return _regeneratorRuntime().wrap(function _callee7$(_context7) {
  2970. while (1) switch (_context7.prev = _context7.next) {
  2971. case 0:
  2972. _context7.next = 2;
  2973. return ch.sdk.getUserInfo();
  2974. case 2:
  2975. k = _context7.sent;
  2976. if (k) {
  2977. resolve(true);
  2978. } else {
  2979. Toast.makeText(gui.getLayerNode(5), '需要授权').show();
  2980. resolve(false);
  2981. }
  2982. case 4:
  2983. case "end":
  2984. return _context7.stop();
  2985. }
  2986. }, _callee7);
  2987. }))));
  2988. case 1:
  2989. case "end":
  2990. return _context8.stop();
  2991. }
  2992. }, _callee8);
  2993. }));
  2994. function loadPfInfo() {
  2995. return _loadPfInfo.apply(this, arguments);
  2996. }
  2997. return loadPfInfo;
  2998. }();
  2999. _createClass(PlayerData, [{
  3000. key: "nickName",
  3001. get: function get() {
  3002. return this.user_info.nickName;
  3003. }
  3004. }, {
  3005. key: "avatarUrl",
  3006. get: function get() {
  3007. return this.user_info.avatar;
  3008. }
  3009. }]);
  3010. return PlayerData;
  3011. }(GameData));
  3012. PlayerData._instance = void 0;
  3013. cclegacy._RF.pop();
  3014. }
  3015. };
  3016. });
  3017. System.register("chunks:///_virtual/Sign_Reward.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './sign.ts', './Hall.ts', './ui.ts', './Toast.ts'], function (exports) {
  3018. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Node, Component, ch_sign, Hall, gui, Toast;
  3019. return {
  3020. setters: [function (module) {
  3021. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  3022. _inheritsLoose = module.inheritsLoose;
  3023. _initializerDefineProperty = module.initializerDefineProperty;
  3024. _assertThisInitialized = module.assertThisInitialized;
  3025. _asyncToGenerator = module.asyncToGenerator;
  3026. _regeneratorRuntime = module.regeneratorRuntime;
  3027. }, function (module) {
  3028. cclegacy = module.cclegacy;
  3029. _decorator = module._decorator;
  3030. Node = module.Node;
  3031. Component = module.Component;
  3032. }, function (module) {
  3033. ch_sign = module.default;
  3034. }, function (module) {
  3035. Hall = module.Hall;
  3036. }, function (module) {
  3037. gui = module.gui;
  3038. }, function (module) {
  3039. Toast = module.Toast;
  3040. }],
  3041. execute: function () {
  3042. var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3;
  3043. cclegacy._RF.push({}, "e331ep7JMdAb5V2APr+1Lco", "Sign_Reward", undefined);
  3044. var ccclass = _decorator.ccclass,
  3045. property = _decorator.property;
  3046. var Sign_Reward = exports('Sign_Reward', (_dec = ccclass('Sign_Reward'), _dec2 = property(Node), _dec3 = property([Number]), _dec4 = property([Number]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  3047. _inheritsLoose(Sign_Reward, _Component);
  3048. function Sign_Reward() {
  3049. var _this;
  3050. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3051. args[_key] = arguments[_key];
  3052. }
  3053. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  3054. _initializerDefineProperty(_this, "Mask", _descriptor, _assertThisInitialized(_this));
  3055. _initializerDefineProperty(_this, "type", _descriptor2, _assertThisInitialized(_this));
  3056. _initializerDefineProperty(_this, "num", _descriptor3, _assertThisInitialized(_this));
  3057. return _this;
  3058. }
  3059. var _proto = Sign_Reward.prototype;
  3060. _proto.start = function start() {};
  3061. _proto.show = /*#__PURE__*/function () {
  3062. var _show = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(day) {
  3063. var state;
  3064. return _regeneratorRuntime().wrap(function _callee$(_context) {
  3065. while (1) switch (_context.prev = _context.next) {
  3066. case 0:
  3067. _context.next = 2;
  3068. return ch_sign.getInstance().checkSigineState(day);
  3069. case 2:
  3070. state = _context.sent;
  3071. console.log(day + ':' + state);
  3072. this.Mask.active = state == 1;
  3073. case 5:
  3074. case "end":
  3075. return _context.stop();
  3076. }
  3077. }, _callee, this);
  3078. }));
  3079. function show(_x) {
  3080. return _show.apply(this, arguments);
  3081. }
  3082. return show;
  3083. }();
  3084. _proto.add_Item = function add_Item(flag) {
  3085. for (var i = 0; i < this.type.length; i++) {
  3086. var Num = flag ? (this.num[i] * 2).toString() : this.num[i].toString();
  3087. switch (this.type[i]) {
  3088. case 1:
  3089. Toast.makeText(gui.getLayerNode(5), '获得消除印章' + 'X' + Num).show();
  3090. break;
  3091. case 2:
  3092. Toast.makeText(gui.getLayerNode(5), '获得洗牌卡' + 'X' + Num).show();
  3093. break;
  3094. case 3:
  3095. Toast.makeText(gui.getLayerNode(5), '获得清空' + 'X' + Num).show();
  3096. break;
  3097. }
  3098. Hall.getInstance().player.add_item(this.type[i], flag ? this.num[i] * 2 : this.num[i]);
  3099. }
  3100. };
  3101. return Sign_Reward;
  3102. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Mask", [_dec2], {
  3103. configurable: true,
  3104. enumerable: true,
  3105. writable: true,
  3106. initializer: function initializer() {
  3107. return null;
  3108. }
  3109. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "type", [_dec3], {
  3110. configurable: true,
  3111. enumerable: true,
  3112. writable: true,
  3113. initializer: function initializer() {
  3114. return [];
  3115. }
  3116. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "num", [_dec4], {
  3117. configurable: true,
  3118. enumerable: true,
  3119. writable: true,
  3120. initializer: function initializer() {
  3121. return [];
  3122. }
  3123. })), _class2)) || _class));
  3124. cclegacy._RF.pop();
  3125. }
  3126. };
  3127. });
  3128. System.register("chunks:///_virtual/UI_Fail.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_Fail.ts', './UI_Hall.ts', './ui.ts', './ui_base.ts', './ResUtil.ts', './ModuleDef.ts', './SceneDef.ts', './Container_Manager.ts', './UI_Main.ts'], function (exports) {
  3129. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, find, Layout_Fail, UI_Hall, GameUILayers, gui, ui_base, ResUtil, ModuleDef, SceneDef, Container_Manager, ani_ui;
  3130. return {
  3131. setters: [function (module) {
  3132. _inheritsLoose = module.inheritsLoose;
  3133. _asyncToGenerator = module.asyncToGenerator;
  3134. _regeneratorRuntime = module.regeneratorRuntime;
  3135. }, function (module) {
  3136. cclegacy = module.cclegacy;
  3137. _decorator = module._decorator;
  3138. find = module.find;
  3139. }, function (module) {
  3140. Layout_Fail = module.Layout_Fail;
  3141. }, function (module) {
  3142. UI_Hall = module.UI_Hall;
  3143. }, function (module) {
  3144. GameUILayers = module.GameUILayers;
  3145. gui = module.gui;
  3146. }, function (module) {
  3147. ui_base = module.default;
  3148. }, function (module) {
  3149. ResUtil = module.ResUtil;
  3150. }, function (module) {
  3151. ModuleDef = module.ModuleDef;
  3152. }, function (module) {
  3153. SceneDef = module.SceneDef;
  3154. }, function (module) {
  3155. Container_Manager = module.Container_Manager;
  3156. }, function (module) {
  3157. ani_ui = module.ani_ui;
  3158. }],
  3159. execute: function () {
  3160. var _dec, _class;
  3161. cclegacy._RF.push({}, "25964t1RBhKUp6zTIOnu2R5", "UI_Fail", undefined);
  3162. var ccclass = _decorator.ccclass,
  3163. property = _decorator.property;
  3164. var UI_Fail = exports('UI_Fail', (_dec = ccclass('UI_Fail'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  3165. _inheritsLoose(UI_Fail, _ui_base);
  3166. function UI_Fail() {
  3167. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Fail/Fail', GameUILayers.HUD, Layout_Fail) || this;
  3168. }
  3169. var _proto = UI_Fail.prototype;
  3170. _proto.onCreated = /*#__PURE__*/function () {
  3171. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
  3172. var layout;
  3173. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  3174. while (1) switch (_context3.prev = _context3.next) {
  3175. case 0:
  3176. layout = this.getLayout();
  3177. layout.Container = find('Container').getComponent(Container_Manager);
  3178. ani_ui(layout.Relife_Btn.node.parent.parent);
  3179. this.onButtonEvent(layout.Relife_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(button) {
  3180. return _regeneratorRuntime().wrap(function _callee$(_context) {
  3181. while (1) switch (_context.prev = _context.next) {
  3182. case 0:
  3183. case "end":
  3184. return _context.stop();
  3185. }
  3186. }, _callee);
  3187. })), this);
  3188. this.onButtonEvent(layout.ReturnHall_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(button) {
  3189. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  3190. while (1) switch (_context2.prev = _context2.next) {
  3191. case 0:
  3192. _context2.next = 2;
  3193. return gui.closeAll();
  3194. case 2:
  3195. gui.show(UI_Hall);
  3196. ResUtil.loadScene(SceneDef.Hall, ModuleDef.GAME, true);
  3197. case 4:
  3198. case "end":
  3199. return _context2.stop();
  3200. }
  3201. }, _callee2);
  3202. })), this);
  3203. layout.progressBar.progress = (layout.Container.count - layout.Container.idioms.length) / layout.Container.count;
  3204. layout.Num.string = Math.floor(layout.progressBar.progress * 100) + '%';
  3205. case 7:
  3206. case "end":
  3207. return _context3.stop();
  3208. }
  3209. }, _callee3, this);
  3210. }));
  3211. function onCreated() {
  3212. return _onCreated.apply(this, arguments);
  3213. }
  3214. return onCreated;
  3215. }();
  3216. return UI_Fail;
  3217. }(ui_base)) || _class));
  3218. cclegacy._RF.pop();
  3219. }
  3220. };
  3221. });
  3222. System.register("chunks:///_virtual/UI_GameRules.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui.ts', './ui_base.ts', './ModuleDef.ts', './UI_Main.ts', './Layout_GameRules.ts'], function (exports) {
  3223. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, GameUILayers, gui, ui_base, ModuleDef, ani_ui, Layout_GameRules;
  3224. return {
  3225. setters: [function (module) {
  3226. _inheritsLoose = module.inheritsLoose;
  3227. _asyncToGenerator = module.asyncToGenerator;
  3228. _regeneratorRuntime = module.regeneratorRuntime;
  3229. }, function (module) {
  3230. cclegacy = module.cclegacy;
  3231. _decorator = module._decorator;
  3232. }, function (module) {
  3233. GameUILayers = module.GameUILayers;
  3234. gui = module.gui;
  3235. }, function (module) {
  3236. ui_base = module.default;
  3237. }, function (module) {
  3238. ModuleDef = module.ModuleDef;
  3239. }, function (module) {
  3240. ani_ui = module.ani_ui;
  3241. }, function (module) {
  3242. Layout_GameRules = module.Layout_GameRules;
  3243. }],
  3244. execute: function () {
  3245. var _dec, _class;
  3246. cclegacy._RF.push({}, "72b78F4T+RLAZp35Z72nowc", "UI_GameRules", undefined);
  3247. var ccclass = _decorator.ccclass,
  3248. property = _decorator.property;
  3249. var UI_GameRules = exports('UI_GameRules', (_dec = ccclass('UI_GameRules'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  3250. _inheritsLoose(UI_GameRules, _ui_base);
  3251. function UI_GameRules() {
  3252. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_GameRules/GameRules', GameUILayers.HUD, Layout_GameRules) || this;
  3253. }
  3254. var _proto = UI_GameRules.prototype;
  3255. _proto.onCreated = /*#__PURE__*/function () {
  3256. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
  3257. var layout;
  3258. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  3259. while (1) switch (_context2.prev = _context2.next) {
  3260. case 0:
  3261. layout = this.getLayout();
  3262. ani_ui(layout.Close_Btn.node.parent);
  3263. this.onButtonEvent(layout.Close_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(button) {
  3264. return _regeneratorRuntime().wrap(function _callee$(_context) {
  3265. while (1) switch (_context.prev = _context.next) {
  3266. case 0:
  3267. //关闭设置界面
  3268. gui.close(UI_GameRules);
  3269. case 1:
  3270. case "end":
  3271. return _context.stop();
  3272. }
  3273. }, _callee);
  3274. })), this);
  3275. case 3:
  3276. case "end":
  3277. return _context2.stop();
  3278. }
  3279. }, _callee2, this);
  3280. }));
  3281. function onCreated() {
  3282. return _onCreated.apply(this, arguments);
  3283. }
  3284. return onCreated;
  3285. }();
  3286. return UI_GameRules;
  3287. }(ui_base)) || _class));
  3288. cclegacy._RF.pop();
  3289. }
  3290. };
  3291. });
  3292. System.register("chunks:///_virtual/UI_Hall.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_Hall.ts', './UI_Rank.ts', './UI_Settings.ts', './UI_Sign.ts', './UI_Invite.ts', './ui.ts', './ui_base.ts', './ResUtil.ts', './ModuleDef.ts', './SceneDef.ts', './UI_Store.ts', './UI_SideBar.ts', './UI_Task.ts'], function (exports) {
  3293. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Layout_Hall, UI_Rank, UI_Settings, UI_Sign, UI_Invite, GameUILayers, gui, ui_base, ResUtil, ModuleDef, SceneDef, UI_Store, UI_SideBar, UI_Task;
  3294. return {
  3295. setters: [function (module) {
  3296. _inheritsLoose = module.inheritsLoose;
  3297. _asyncToGenerator = module.asyncToGenerator;
  3298. _regeneratorRuntime = module.regeneratorRuntime;
  3299. }, function (module) {
  3300. cclegacy = module.cclegacy;
  3301. _decorator = module._decorator;
  3302. }, function (module) {
  3303. Layout_Hall = module.Layout_Hall;
  3304. }, function (module) {
  3305. UI_Rank = module.UI_Rank;
  3306. }, function (module) {
  3307. UI_Settings = module.UI_Settings;
  3308. }, function (module) {
  3309. UI_Sign = module.UI_Sign;
  3310. }, function (module) {
  3311. UI_Invite = module.UI_Invite;
  3312. }, function (module) {
  3313. GameUILayers = module.GameUILayers;
  3314. gui = module.gui;
  3315. }, function (module) {
  3316. ui_base = module.default;
  3317. }, function (module) {
  3318. ResUtil = module.ResUtil;
  3319. }, function (module) {
  3320. ModuleDef = module.ModuleDef;
  3321. }, function (module) {
  3322. SceneDef = module.SceneDef;
  3323. }, function (module) {
  3324. UI_Store = module.UI_Store;
  3325. }, function (module) {
  3326. UI_SideBar = module.UI_SideBar;
  3327. }, function (module) {
  3328. UI_Task = module.UI_Task;
  3329. }],
  3330. execute: function () {
  3331. var _dec, _class;
  3332. cclegacy._RF.push({}, "e5a30zX/fVMaZSMsA9kifAa", "UI_Hall", undefined);
  3333. var ccclass = _decorator.ccclass,
  3334. property = _decorator.property;
  3335. var UI_Hall = exports('UI_Hall', (_dec = ccclass('UI_Hall'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  3336. _inheritsLoose(UI_Hall, _ui_base);
  3337. function UI_Hall() {
  3338. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Hall/Hall', GameUILayers.GAME, Layout_Hall) || this;
  3339. }
  3340. var _proto = UI_Hall.prototype;
  3341. _proto.onCreated = /*#__PURE__*/function () {
  3342. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  3343. var layout;
  3344. return _regeneratorRuntime().wrap(function _callee$(_context) {
  3345. while (1) switch (_context.prev = _context.next) {
  3346. case 0:
  3347. layout = this.getLayout();
  3348. this.onButtonEvent(layout.Start_Btn, function () {
  3349. gui.close(UI_Hall);
  3350. ResUtil.loadScene(SceneDef.GAME, ModuleDef.GAME, true);
  3351. });
  3352. this.onButtonEvent(layout.Settings_Btn, function () {
  3353. gui.show(UI_Settings);
  3354. });
  3355. this.onButtonEvent(layout.Rank_Btn, function () {
  3356. gui.show(UI_Rank);
  3357. });
  3358. this.onButtonEvent(layout.Sign_Btn, function () {
  3359. gui.show(UI_Sign);
  3360. });
  3361. this.onButtonEvent(layout.Invite_Btn, function () {
  3362. gui.show(UI_Invite);
  3363. });
  3364. this.onButtonEvent(layout.Store_Btn, function () {
  3365. gui.show(UI_Store);
  3366. });
  3367. this.onButtonEvent(layout.Task_Btn, function () {
  3368. gui.show(UI_Task);
  3369. });
  3370. if (chsdk.checkHasSidebar()) {
  3371. layout.SideBar_Btn.node.active = true;
  3372. this.onButtonEvent(layout.SideBar_Btn, function () {
  3373. gui.show(UI_SideBar);
  3374. });
  3375. } else {
  3376. layout.SideBar_Btn.node.active = false;
  3377. }
  3378. case 9:
  3379. case "end":
  3380. return _context.stop();
  3381. }
  3382. }, _callee, this);
  3383. }));
  3384. function onCreated() {
  3385. return _onCreated.apply(this, arguments);
  3386. }
  3387. return onCreated;
  3388. }();
  3389. _proto.update = function update(deltaTime) {};
  3390. return UI_Hall;
  3391. }(ui_base)) || _class));
  3392. cclegacy._RF.pop();
  3393. }
  3394. };
  3395. });
  3396. System.register("chunks:///_virtual/UI_Head_Icon.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Hall.ts', './ch.ts'], function (exports) {
  3397. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, SpriteFrame, Component, Hall, ch;
  3398. return {
  3399. setters: [function (module) {
  3400. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  3401. _inheritsLoose = module.inheritsLoose;
  3402. _initializerDefineProperty = module.initializerDefineProperty;
  3403. _assertThisInitialized = module.assertThisInitialized;
  3404. }, function (module) {
  3405. cclegacy = module.cclegacy;
  3406. _decorator = module._decorator;
  3407. Sprite = module.Sprite;
  3408. SpriteFrame = module.SpriteFrame;
  3409. Component = module.Component;
  3410. }, function (module) {
  3411. Hall = module.Hall;
  3412. }, function (module) {
  3413. ch = module.ch;
  3414. }],
  3415. execute: function () {
  3416. var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
  3417. cclegacy._RF.push({}, "32da00Ug65PLLJF/VDL1/LR", "UI_Head_Icon", undefined);
  3418. var ccclass = _decorator.ccclass,
  3419. property = _decorator.property;
  3420. var UI_Head_Icon = exports('UI_Head_Icon', (_dec = ccclass('UI_Head_Icon'), _dec2 = property(Sprite), _dec3 = property([SpriteFrame]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  3421. _inheritsLoose(UI_Head_Icon, _Component);
  3422. function UI_Head_Icon() {
  3423. var _this;
  3424. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3425. args[_key] = arguments[_key];
  3426. }
  3427. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  3428. _initializerDefineProperty(_this, "head", _descriptor, _assertThisInitialized(_this));
  3429. _initializerDefineProperty(_this, "default_head", _descriptor2, _assertThisInitialized(_this));
  3430. return _this;
  3431. }
  3432. var _proto = UI_Head_Icon.prototype;
  3433. _proto.start = function start() {};
  3434. _proto.update = function update(deltaTime) {};
  3435. _proto.show = function show(uid, head) {
  3436. var rc = this.default_head[ch.util.getRandomInt(0, this.default_head.length - 1)];
  3437. Hall.getInstance().head_icon.showIcon(uid, head, this.head, rc);
  3438. };
  3439. return UI_Head_Icon;
  3440. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "head", [_dec2], {
  3441. configurable: true,
  3442. enumerable: true,
  3443. writable: true,
  3444. initializer: null
  3445. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "default_head", [_dec3], {
  3446. configurable: true,
  3447. enumerable: true,
  3448. writable: true,
  3449. initializer: function initializer() {
  3450. return [];
  3451. }
  3452. })), _class2)) || _class));
  3453. cclegacy._RF.pop();
  3454. }
  3455. };
  3456. });
  3457. System.register("chunks:///_virtual/UI_Idiom.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc'], function (exports) {
  3458. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, Label, Component;
  3459. return {
  3460. setters: [function (module) {
  3461. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  3462. _inheritsLoose = module.inheritsLoose;
  3463. _initializerDefineProperty = module.initializerDefineProperty;
  3464. _assertThisInitialized = module.assertThisInitialized;
  3465. }, function (module) {
  3466. cclegacy = module.cclegacy;
  3467. _decorator = module._decorator;
  3468. Sprite = module.Sprite;
  3469. Label = module.Label;
  3470. Component = module.Component;
  3471. }],
  3472. execute: function () {
  3473. var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
  3474. cclegacy._RF.push({}, "823150wmWhJ5rmcjzauSE9B", "UI_Idiom", undefined);
  3475. var ccclass = _decorator.ccclass,
  3476. property = _decorator.property;
  3477. var UI_Idiom = exports('UI_Idiom', (_dec = ccclass('UI_Idiom'), _dec2 = property(Sprite), _dec3 = property(Label), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  3478. _inheritsLoose(UI_Idiom, _Component);
  3479. function UI_Idiom() {
  3480. var _this;
  3481. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3482. args[_key] = arguments[_key];
  3483. }
  3484. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  3485. _initializerDefineProperty(_this, "hud_sp", _descriptor, _assertThisInitialized(_this));
  3486. _initializerDefineProperty(_this, "txt", _descriptor2, _assertThisInitialized(_this));
  3487. _this.piece_1_word = void 0;
  3488. _this.piece_2_word = void 0;
  3489. return _this;
  3490. }
  3491. var _proto = UI_Idiom.prototype;
  3492. _proto.start = function start() {};
  3493. _proto.update = function update(deltaTime) {};
  3494. return UI_Idiom;
  3495. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "hud_sp", [_dec2], {
  3496. configurable: true,
  3497. enumerable: true,
  3498. writable: true,
  3499. initializer: function initializer() {
  3500. return null;
  3501. }
  3502. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "txt", [_dec3], {
  3503. configurable: true,
  3504. enumerable: true,
  3505. writable: true,
  3506. initializer: function initializer() {
  3507. return null;
  3508. }
  3509. })), _class2)) || _class));
  3510. cclegacy._RF.pop();
  3511. }
  3512. };
  3513. });
  3514. System.register("chunks:///_virtual/UI_Idioms.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UI_Idiom.ts', './Layout_Idioms.ts', './ui.ts', './ui_base.ts', './ModuleDef.ts', './Container_Manager.ts'], function (exports) {
  3515. var _inheritsLoose, _createForOfIteratorHelperLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, instantiate, UITransform, Size, Vec3, Vec2, find, UI_Idiom, Layout_Idioms, GameUILayers, ui_base, ModuleDef, Container_Manager;
  3516. return {
  3517. setters: [function (module) {
  3518. _inheritsLoose = module.inheritsLoose;
  3519. _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
  3520. _asyncToGenerator = module.asyncToGenerator;
  3521. _regeneratorRuntime = module.regeneratorRuntime;
  3522. }, function (module) {
  3523. cclegacy = module.cclegacy;
  3524. _decorator = module._decorator;
  3525. instantiate = module.instantiate;
  3526. UITransform = module.UITransform;
  3527. Size = module.Size;
  3528. Vec3 = module.Vec3;
  3529. Vec2 = module.Vec2;
  3530. find = module.find;
  3531. }, function (module) {
  3532. UI_Idiom = module.UI_Idiom;
  3533. }, function (module) {
  3534. Layout_Idioms = module.Layout_Idioms;
  3535. }, function (module) {
  3536. GameUILayers = module.GameUILayers;
  3537. }, function (module) {
  3538. ui_base = module.default;
  3539. }, function (module) {
  3540. ModuleDef = module.ModuleDef;
  3541. }, function (module) {
  3542. Container_Manager = module.Container_Manager;
  3543. }],
  3544. execute: function () {
  3545. var _dec, _class;
  3546. cclegacy._RF.push({}, "efc87WIo/pPjbu6aYJ5woDB", "UI_Idioms", undefined);
  3547. var ccclass = _decorator.ccclass,
  3548. property = _decorator.property;
  3549. var UI_Idioms = exports('UI_Idioms', (_dec = ccclass('UI_Idioms'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  3550. _inheritsLoose(UI_Idioms, _ui_base);
  3551. function UI_Idioms() {
  3552. var _this;
  3553. _this = _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Idioms/ScrollView', GameUILayers.HUD, Layout_Idioms) || this;
  3554. _this.idioms = [];
  3555. return _this;
  3556. }
  3557. var _proto = UI_Idioms.prototype;
  3558. _proto.onCreated = /*#__PURE__*/function () {
  3559. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  3560. var layout;
  3561. return _regeneratorRuntime().wrap(function _callee$(_context) {
  3562. while (1) switch (_context.prev = _context.next) {
  3563. case 0:
  3564. layout = this.getLayout();
  3565. layout.Container = find('Container').getComponent(Container_Manager);
  3566. this.init();
  3567. case 3:
  3568. case "end":
  3569. return _context.stop();
  3570. }
  3571. }, _callee, this);
  3572. }));
  3573. function onCreated() {
  3574. return _onCreated.apply(this, arguments);
  3575. }
  3576. return onCreated;
  3577. }();
  3578. _proto.init = function init() {
  3579. var layout = this.getLayout();
  3580. console.log("init");
  3581. for (var i = 0; i < layout.Container.idioms.length; i++) {
  3582. var node = instantiate(layout.idiom_prefab);
  3583. node.parent = layout.content;
  3584. console.log("label" + layout.Container.idioms[i].idiom);
  3585. node.getComponent(UI_Idiom).txt.string = layout.Container.idioms[i].idiom;
  3586. node.getComponent(UI_Idiom).piece_1_word = layout.Container.idioms[i].piece_1_word;
  3587. node.getComponent(UI_Idiom).piece_2_word = layout.Container.idioms[i].piece_2_word;
  3588. this.idioms.push(node.getComponent(UI_Idiom));
  3589. }
  3590. }
  3591. //高亮显示
  3592. ;
  3593. _proto.light_Show = function light_Show(cube_infor) {
  3594. var layout = this.getLayout();
  3595. var txt_length = cube_infor.Text.length;
  3596. for (var i = 0; i < this.idioms.length; i++) {
  3597. if (this.idioms[i].piece_1_word === cube_infor.Text) {
  3598. this.idioms[i].hud_sp.node.active = true;
  3599. this.idioms[i].hud_sp.node.getComponent(UITransform).contentSize = new Size(30 * txt_length, 30);
  3600. var target = 0;
  3601. this.idioms[i].hud_sp.node.position = new Vec3(11 + target * 30, -11.5, 0);
  3602. this.scrollToTarget(i);
  3603. } else if (this.idioms[i].piece_2_word === cube_infor.Text) {
  3604. this.idioms[i].hud_sp.node.active = true;
  3605. this.idioms[i].hud_sp.node.getComponent(UITransform).contentSize = new Size(30 * txt_length, 30);
  3606. var _target = 4 - txt_length;
  3607. this.idioms[i].hud_sp.node.position = new Vec3(11 + _target * 30, -11.5, 0);
  3608. this.scrollToTarget(i);
  3609. }
  3610. }
  3611. }
  3612. //取消高亮
  3613. ;
  3614. _proto.light_Hide = function light_Hide(cube1, cube2) {
  3615. var layout = this.getLayout();
  3616. this.idioms = this.idioms.filter(function (element) {
  3617. var shouldRemove = false;
  3618. var hasMatch = false;
  3619. // 检查与 cube1 相关的成语
  3620. if (cube1.Text === element.piece_1_word) {
  3621. for (var _iterator = _createForOfIteratorHelperLoose(layout.Container.idiom_combine.keys()), _step; !(_step = _iterator()).done;) {
  3622. var cubeInfor = _step.value;
  3623. if (cubeInfor.txt.string === cube1.Text) {
  3624. hasMatch = true;
  3625. break;
  3626. }
  3627. }
  3628. // 只有当前字没有参与成语时才移除提示
  3629. if (!hasMatch) {
  3630. element.hud_sp.node.active = false; // 销毁UI中的成语提示
  3631. }
  3632. }
  3633. // 检查与 cube2 相关的成语
  3634. if (cube2.Text === element.piece_2_word) {
  3635. for (var _iterator2 = _createForOfIteratorHelperLoose(layout.Container.idiom_combine.keys()), _step2; !(_step2 = _iterator2()).done;) {
  3636. var _cubeInfor = _step2.value;
  3637. if (_cubeInfor.txt.string === cube2.Text) {
  3638. hasMatch = true;
  3639. break;
  3640. }
  3641. }
  3642. // 只有当前字没有参与成语时才移除提示
  3643. if (!hasMatch) {
  3644. element.hud_sp.node.active = false; // 销毁UI中的成语提示
  3645. }
  3646. }
  3647. // 检查是否能组合成一个成语
  3648. if (cube1.Text + cube2.Text === element.txt.string) {
  3649. element.node.destroy(); // 销毁节点
  3650. shouldRemove = true; // 如果已组合,移除该成语
  3651. }
  3652. // 保留未被组合的元素
  3653. return !shouldRemove;
  3654. });
  3655. // 监测所有字是否仍然需要高亮显示
  3656. this.idioms.forEach(function (element) {
  3657. // 检查每个字是否仍然在任何成语组合中
  3658. var shouldDisplay = false;
  3659. // 遍历容器中的所有成语组合,看看当前字是否仍然参与任何组合
  3660. for (var _iterator3 = _createForOfIteratorHelperLoose(layout.Container.idiom_combine.keys()), _step3; !(_step3 = _iterator3()).done;) {
  3661. var cubeInfor = _step3.value;
  3662. if (cubeInfor.txt.string === element.piece_1_word || cubeInfor.txt.string === element.piece_2_word) {
  3663. shouldDisplay = true;
  3664. break;
  3665. }
  3666. }
  3667. // 如果该字还参与成语,则保持其提示显示
  3668. if (shouldDisplay) {
  3669. element.hud_sp.node.active = true;
  3670. }
  3671. });
  3672. };
  3673. _proto.scrollToTarget = function scrollToTarget(index) {
  3674. var layout = this.getLayout();
  3675. var row = Math.trunc(index / 5);
  3676. if (row == 0) {
  3677. layout.scrollView.scrollTo(new Vec2(0, 1), 0.2, false);
  3678. } else if (row == this.idioms.length / 5) {
  3679. layout.scrollView.scrollTo(new Vec2(0, 0), 0.2, false);
  3680. } else {
  3681. var res = Math.trunc(row / (Math.trunc(this.idioms.length / 5) - 2) * 10) / 10;
  3682. layout.scrollView.scrollTo(new Vec2(0, 1 - res), 0.2, false);
  3683. console.log("weizhi:" + (1 - res));
  3684. }
  3685. };
  3686. _proto.all_light_Hide = function all_light_Hide() {
  3687. this.idioms.forEach(function (element) {
  3688. element.hud_sp.node.active = false;
  3689. });
  3690. };
  3691. return UI_Idioms;
  3692. }(ui_base)) || _class));
  3693. cclegacy._RF.pop();
  3694. }
  3695. };
  3696. });
  3697. System.register("chunks:///_virtual/UI_Invite.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui.ts', './ui_base.ts', './ModuleDef.ts', './UI_Main.ts', './Layout_Invite.ts'], function (exports) {
  3698. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, GameUILayers, gui, ui_base, ModuleDef, ani_ui, Layout_Invite;
  3699. return {
  3700. setters: [function (module) {
  3701. _inheritsLoose = module.inheritsLoose;
  3702. _asyncToGenerator = module.asyncToGenerator;
  3703. _regeneratorRuntime = module.regeneratorRuntime;
  3704. }, function (module) {
  3705. cclegacy = module.cclegacy;
  3706. _decorator = module._decorator;
  3707. }, function (module) {
  3708. GameUILayers = module.GameUILayers;
  3709. gui = module.gui;
  3710. }, function (module) {
  3711. ui_base = module.default;
  3712. }, function (module) {
  3713. ModuleDef = module.ModuleDef;
  3714. }, function (module) {
  3715. ani_ui = module.ani_ui;
  3716. }, function (module) {
  3717. Layout_Invite = module.Layout_Invite;
  3718. }],
  3719. execute: function () {
  3720. var _dec, _class;
  3721. cclegacy._RF.push({}, "35c7bpukylD/JOB9LOmKr4x", "UI_Invite", undefined);
  3722. var ccclass = _decorator.ccclass,
  3723. property = _decorator.property;
  3724. var UI_Invite = exports('UI_Invite', (_dec = ccclass('UI_Invite'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  3725. _inheritsLoose(UI_Invite, _ui_base);
  3726. function UI_Invite() {
  3727. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Invite/Invite', GameUILayers.HUD, Layout_Invite) || this;
  3728. }
  3729. var _proto = UI_Invite.prototype;
  3730. _proto.onCreated = /*#__PURE__*/function () {
  3731. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  3732. var _this = this;
  3733. var layout;
  3734. return _regeneratorRuntime().wrap(function _callee$(_context) {
  3735. while (1) switch (_context.prev = _context.next) {
  3736. case 0:
  3737. // 拉取通过邀请进入该游戏的好友数量
  3738. this.get_Count();
  3739. this.show();
  3740. layout = this.getLayout();
  3741. ani_ui(layout.Close_Btn.node.parent);
  3742. this.onButtonEvent(layout.Close_Btn, function () {
  3743. gui.close(UI_Invite);
  3744. });
  3745. this.onButtonEvent(layout.Invite_Friend_Btn, function () {
  3746. //分享给好友
  3747. chsdk.shareAppMessage();
  3748. });
  3749. this.onButtonEvent(layout.Refresh_Btn, function () {
  3750. //刷新好友列表
  3751. _this.get_Count();
  3752. _this.show();
  3753. });
  3754. case 7:
  3755. case "end":
  3756. return _context.stop();
  3757. }
  3758. }, _callee, this);
  3759. }));
  3760. function onCreated() {
  3761. return _onCreated.apply(this, arguments);
  3762. }
  3763. return onCreated;
  3764. }();
  3765. _proto.get_Count = function get_Count() {
  3766. var layout = this.getLayout();
  3767. chsdk.getShareList().then(function (res) {
  3768. if (res.code === 0 && res.data) {
  3769. // 确保数据有效
  3770. var friendCount = res.data.length; // 计算人数
  3771. layout.Txt.string = friendCount + '/' + layout.target_count;
  3772. layout.progressBar.progress = friendCount / layout.target_count;
  3773. var remain = layout.target_count - friendCount;
  3774. layout.Num_Sp.spriteFrame = layout.Num[remain - 1];
  3775. } else {
  3776. // 错误处理
  3777. console.error("\u83B7\u53D6\u5206\u4EAB\u5217\u8868\u5931\u8D25: " + (res.err || "未知错误"));
  3778. }
  3779. })["catch"](function (err) {
  3780. // 捕获 promise 的异常
  3781. console.error("\u8BF7\u6C42\u5931\u8D25: " + err.message);
  3782. });
  3783. };
  3784. _proto.show = function show() {
  3785. var layout = this.getLayout();
  3786. layout.progressBar.progress = layout.count / layout.target_count;
  3787. layout.Txt.string = layout.count + '/' + layout.target_count;
  3788. };
  3789. return UI_Invite;
  3790. }(ui_base)) || _class));
  3791. cclegacy._RF.pop();
  3792. }
  3793. };
  3794. });
  3795. System.register("chunks:///_virtual/UI_Item.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ch.ts', './ui.ts', './UI_Main.ts', './Hall.ts', './Toast.ts'], function (exports) {
  3796. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, _asyncToGenerator, _regeneratorRuntime, _createForOfIteratorHelperLoose, cclegacy, _decorator, Sprite, Label, Button, Node, tween, v3, Component, ch, gui, UI_Main, Hall, Toast;
  3797. return {
  3798. setters: [function (module) {
  3799. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  3800. _inheritsLoose = module.inheritsLoose;
  3801. _initializerDefineProperty = module.initializerDefineProperty;
  3802. _assertThisInitialized = module.assertThisInitialized;
  3803. _asyncToGenerator = module.asyncToGenerator;
  3804. _regeneratorRuntime = module.regeneratorRuntime;
  3805. _createForOfIteratorHelperLoose = module.createForOfIteratorHelperLoose;
  3806. }, function (module) {
  3807. cclegacy = module.cclegacy;
  3808. _decorator = module._decorator;
  3809. Sprite = module.Sprite;
  3810. Label = module.Label;
  3811. Button = module.Button;
  3812. Node = module.Node;
  3813. tween = module.tween;
  3814. v3 = module.v3;
  3815. Component = module.Component;
  3816. }, function (module) {
  3817. ch = module.ch;
  3818. }, function (module) {
  3819. gui = module.gui;
  3820. }, function (module) {
  3821. UI_Main = module.UI_Main;
  3822. }, function (module) {
  3823. Hall = module.Hall;
  3824. }, function (module) {
  3825. Toast = module.Toast;
  3826. }],
  3827. execute: function () {
  3828. var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2, _descriptor3;
  3829. cclegacy._RF.push({}, "12c662bVNFDxoVeaMUS/AvG", "UI_Item", undefined);
  3830. var ccclass = _decorator.ccclass,
  3831. property = _decorator.property;
  3832. var UI_Item = exports('UI_Item', (_dec = ccclass('UI_Item'), _dec2 = property(Sprite), _dec3 = property(Label), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  3833. _inheritsLoose(UI_Item, _Component);
  3834. function UI_Item() {
  3835. var _this;
  3836. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3837. args[_key] = arguments[_key];
  3838. }
  3839. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  3840. _initializerDefineProperty(_this, "type", _descriptor, _assertThisInitialized(_this));
  3841. _initializerDefineProperty(_this, "Ad", _descriptor2, _assertThisInitialized(_this));
  3842. _initializerDefineProperty(_this, "count", _descriptor3, _assertThisInitialized(_this));
  3843. _this._c = 0;
  3844. return _this;
  3845. }
  3846. var _proto = UI_Item.prototype;
  3847. _proto.start = function start() {
  3848. if (this.type == 0) return;
  3849. this.show(this.type, Hall.getInstance().player.get_item(this.type));
  3850. if (this.node.getComponent(Button)) {
  3851. this.node.on(Node.EventType.TOUCH_END, this.onClick, this);
  3852. }
  3853. Hall.getInstance().player.event.on(Hall.getInstance().player.event.key.item_count, this.show, this);
  3854. };
  3855. _proto.onDestroy = function onDestroy() {
  3856. Hall.getInstance().player.event.off(Hall.getInstance().player.event.key.item_count, this.show, this);
  3857. };
  3858. _proto.show = function show(type, count) {
  3859. if (type != this.type) return;
  3860. if (this._c != count) {
  3861. tween(this.node).to(0.05, {
  3862. scale: v3(1.2, 1.2, 1)
  3863. }).to(0.1, {
  3864. scale: v3(1, 1, 1)
  3865. }).start();
  3866. if (count < this._c) ;
  3867. }
  3868. this._c = count;
  3869. if (count != 0) {
  3870. this.Ad.node.active = false;
  3871. this.count.node.parent.active = true;
  3872. this.count.string = count.toString();
  3873. } else {
  3874. this.Ad.node.active = true;
  3875. this.count.node.parent.active = false;
  3876. }
  3877. //this.ad.active = count <= 0;
  3878. }
  3879. //
  3880. ;
  3881. _proto.onClick = /*#__PURE__*/
  3882. function () {
  3883. var _onClick = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(evt) {
  3884. var flag, _iterator, _step, element, ret, _flag, _iterator2, _step2, _element;
  3885. return _regeneratorRuntime().wrap(function _callee$(_context) {
  3886. while (1) switch (_context.prev = _context.next) {
  3887. case 0:
  3888. if (!(this._c <= 0)) {
  3889. _context.next = 21;
  3890. break;
  3891. }
  3892. if (!(this.type == 3)) {
  3893. _context.next = 15;
  3894. break;
  3895. }
  3896. flag = false;
  3897. _iterator = _createForOfIteratorHelperLoose(gui.get(UI_Main).getLayout().Container.node_isIdiom);
  3898. case 4:
  3899. if ((_step = _iterator()).done) {
  3900. _context.next = 12;
  3901. break;
  3902. }
  3903. element = _step.value;
  3904. console.log(element);
  3905. if (!(element == true)) {
  3906. _context.next = 10;
  3907. break;
  3908. }
  3909. flag = true;
  3910. return _context.abrupt("break", 12);
  3911. case 10:
  3912. _context.next = 4;
  3913. break;
  3914. case 12:
  3915. if (flag) {
  3916. _context.next = 15;
  3917. break;
  3918. }
  3919. Toast.makeText(gui.getLayerNode(5), "槽中无可清除的方块").show();
  3920. return _context.abrupt("return");
  3921. case 15:
  3922. _context.next = 17;
  3923. return chsdk.playRewardAd('获得道具' + this.type);
  3924. case 17:
  3925. ret = _context.sent;
  3926. if (ret) {
  3927. // ch.audio.playOneShot('sounds/sfx_add_item');
  3928. Hall.getInstance().player.add_item(this.type, 1);
  3929. Hall.getInstance().player.set_watch_ad_num(1);
  3930. ch.audio.resume();
  3931. }
  3932. // gui.show(UI_ad_get, this.type);
  3933. _context.next = 37;
  3934. break;
  3935. case 21:
  3936. if (!(this.type == 3)) {
  3937. _context.next = 36;
  3938. break;
  3939. }
  3940. _flag = false;
  3941. _iterator2 = _createForOfIteratorHelperLoose(gui.get(UI_Main).getLayout().Container.node_isIdiom);
  3942. case 24:
  3943. if ((_step2 = _iterator2()).done) {
  3944. _context.next = 33;
  3945. break;
  3946. }
  3947. _element = _step2.value;
  3948. console.log(_element);
  3949. if (!(_element == true)) {
  3950. _context.next = 31;
  3951. break;
  3952. }
  3953. Hall.getInstance().player.use_item(this.type);
  3954. _flag = true;
  3955. return _context.abrupt("break", 33);
  3956. case 31:
  3957. _context.next = 24;
  3958. break;
  3959. case 33:
  3960. if (!_flag) Toast.makeText(gui.getLayerNode(5), "槽中无可清除的方块").show();
  3961. //UINotify.show('槽中无可清除的方块');
  3962. _context.next = 37;
  3963. break;
  3964. case 36:
  3965. Hall.getInstance().player.use_item(this.type);
  3966. case 37:
  3967. case "end":
  3968. return _context.stop();
  3969. }
  3970. }, _callee, this);
  3971. }));
  3972. function onClick(_x) {
  3973. return _onClick.apply(this, arguments);
  3974. }
  3975. return onClick;
  3976. }();
  3977. return UI_Item;
  3978. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "type", [property], {
  3979. configurable: true,
  3980. enumerable: true,
  3981. writable: true,
  3982. initializer: function initializer() {
  3983. return 0;
  3984. }
  3985. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Ad", [_dec2], {
  3986. configurable: true,
  3987. enumerable: true,
  3988. writable: true,
  3989. initializer: null
  3990. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "count", [_dec3], {
  3991. configurable: true,
  3992. enumerable: true,
  3993. writable: true,
  3994. initializer: null
  3995. })), _class2)) || _class));
  3996. cclegacy._RF.pop();
  3997. }
  3998. };
  3999. });
  4000. System.register("chunks:///_virtual/UI_LatticeFull.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui_base.ts', './Layout_LatticeFull.ts', './ui.ts', './ModuleDef.ts', './Hall.ts', './UI_Fail.ts', './UI_Main.ts'], function (exports) {
  4001. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, ui_base, Layout_LatticeFull, GameUILayers, gui, ModuleDef, Hall, UI_Fail, ani_ui, UI_Main;
  4002. return {
  4003. setters: [function (module) {
  4004. _inheritsLoose = module.inheritsLoose;
  4005. _asyncToGenerator = module.asyncToGenerator;
  4006. _regeneratorRuntime = module.regeneratorRuntime;
  4007. }, function (module) {
  4008. cclegacy = module.cclegacy;
  4009. _decorator = module._decorator;
  4010. }, function (module) {
  4011. ui_base = module.default;
  4012. }, function (module) {
  4013. Layout_LatticeFull = module.Layout_LatticeFull;
  4014. }, function (module) {
  4015. GameUILayers = module.GameUILayers;
  4016. gui = module.gui;
  4017. }, function (module) {
  4018. ModuleDef = module.ModuleDef;
  4019. }, function (module) {
  4020. Hall = module.Hall;
  4021. }, function (module) {
  4022. UI_Fail = module.UI_Fail;
  4023. }, function (module) {
  4024. ani_ui = module.ani_ui;
  4025. UI_Main = module.UI_Main;
  4026. }],
  4027. execute: function () {
  4028. var _dec, _class;
  4029. cclegacy._RF.push({}, "eca24N6WDJOCKuYRcooOJCy", "UI_LatticeFull", undefined);
  4030. var ccclass = _decorator.ccclass,
  4031. property = _decorator.property;
  4032. var UI_LatticeFull = exports('UI_LatticeFull', (_dec = ccclass('UI_LatticeFull'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  4033. _inheritsLoose(UI_LatticeFull, _ui_base);
  4034. function UI_LatticeFull() {
  4035. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_LatticeFull/LatticeFull', GameUILayers.HUD, Layout_LatticeFull) || this;
  4036. }
  4037. var _proto = UI_LatticeFull.prototype;
  4038. _proto.onCreated = /*#__PURE__*/function () {
  4039. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
  4040. var layout, num1, num2;
  4041. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  4042. while (1) switch (_context3.prev = _context3.next) {
  4043. case 0:
  4044. layout = this.getLayout();
  4045. ani_ui(layout.Close_Btn.node.parent);
  4046. num1 = Hall.getInstance().player.get_item(1);
  4047. if (num1 > 0) {
  4048. layout.Empty_Ad.node.active = false;
  4049. layout.Empty_RedPoint_num.node.parent.active = true;
  4050. layout.Empty_RedPoint_num.string = num1.toString();
  4051. } else {
  4052. layout.Empty_Ad.node.active = true;
  4053. layout.Empty_RedPoint_num.node.parent.active = false;
  4054. }
  4055. num2 = Hall.getInstance().player.get_item(3);
  4056. if (num2 > 0) {
  4057. layout.Eliminate_Ad.node.active = false;
  4058. layout.Eliminate_RedPoint_num.node.parent.active = true;
  4059. layout.Eliminate_RedPoint_num.string = num2.toString();
  4060. } else {
  4061. layout.Eliminate_Ad.node.active = true;
  4062. layout.Eliminate_RedPoint_num.node.parent.active = false;
  4063. }
  4064. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.pause);
  4065. this.onButtonEvent(layout.Close_Btn, function () {
  4066. gui.close(UI_LatticeFull);
  4067. gui.show(UI_Fail);
  4068. });
  4069. this.onButtonEvent(layout.Eliminate, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  4070. var ret;
  4071. return _regeneratorRuntime().wrap(function _callee$(_context) {
  4072. while (1) switch (_context.prev = _context.next) {
  4073. case 0:
  4074. if (!(num1 <= 0)) {
  4075. _context.next = 7;
  4076. break;
  4077. }
  4078. _context.next = 3;
  4079. return chsdk.playRewardAd('获得道具' + 1);
  4080. case 3:
  4081. ret = _context.sent;
  4082. if (ret) {
  4083. Hall.getInstance().player.add_item(1, 1);
  4084. Hall.getInstance().player.use_item(1);
  4085. gui.close(UI_LatticeFull);
  4086. //直接使用道具
  4087. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.resume);
  4088. }
  4089. _context.next = 10;
  4090. break;
  4091. case 7:
  4092. Hall.getInstance().player.use_item(1);
  4093. gui.close(UI_LatticeFull);
  4094. //直接使用道具
  4095. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.resume);
  4096. case 10:
  4097. case "end":
  4098. return _context.stop();
  4099. }
  4100. }, _callee);
  4101. })));
  4102. this.onButtonEvent(layout.Empty, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
  4103. var ret;
  4104. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  4105. while (1) switch (_context2.prev = _context2.next) {
  4106. case 0:
  4107. if (!(num2 <= 0)) {
  4108. _context2.next = 7;
  4109. break;
  4110. }
  4111. _context2.next = 3;
  4112. return chsdk.playRewardAd('获得道具' + 3);
  4113. case 3:
  4114. ret = _context2.sent;
  4115. if (ret) {
  4116. Hall.getInstance().player.add_item(3, 1);
  4117. Hall.getInstance().player.use_item(3);
  4118. gui.close(UI_LatticeFull);
  4119. //直接使用道具
  4120. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.resume);
  4121. }
  4122. _context2.next = 10;
  4123. break;
  4124. case 7:
  4125. Hall.getInstance().player.use_item(3);
  4126. gui.close(UI_LatticeFull);
  4127. //直接使用道具
  4128. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.resume);
  4129. case 10:
  4130. case "end":
  4131. return _context2.stop();
  4132. }
  4133. }, _callee2);
  4134. })));
  4135. this.onButtonEvent(layout.Click, function () {
  4136. gui.close(UI_LatticeFull);
  4137. //放弃此局,跳至结算界面
  4138. gui.show(UI_Fail);
  4139. });
  4140. case 11:
  4141. case "end":
  4142. return _context3.stop();
  4143. }
  4144. }, _callee3, this);
  4145. }));
  4146. function onCreated() {
  4147. return _onCreated.apply(this, arguments);
  4148. }
  4149. return onCreated;
  4150. }();
  4151. return UI_LatticeFull;
  4152. }(ui_base)) || _class));
  4153. cclegacy._RF.pop();
  4154. }
  4155. };
  4156. });
  4157. System.register("chunks:///_virtual/UI_Lock.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui_base.ts', './ui.ts', './ModuleDef.ts', './Layout_Lock.ts', './UI_Main.ts'], function (exports) {
  4158. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, ui_base, GameUILayers, gui, ModuleDef, Layout_Lock, ani_ui, UI_Main;
  4159. return {
  4160. setters: [function (module) {
  4161. _inheritsLoose = module.inheritsLoose;
  4162. _asyncToGenerator = module.asyncToGenerator;
  4163. _regeneratorRuntime = module.regeneratorRuntime;
  4164. }, function (module) {
  4165. cclegacy = module.cclegacy;
  4166. _decorator = module._decorator;
  4167. }, function (module) {
  4168. ui_base = module.default;
  4169. }, function (module) {
  4170. GameUILayers = module.GameUILayers;
  4171. gui = module.gui;
  4172. }, function (module) {
  4173. ModuleDef = module.ModuleDef;
  4174. }, function (module) {
  4175. Layout_Lock = module.Layout_Lock;
  4176. }, function (module) {
  4177. ani_ui = module.ani_ui;
  4178. UI_Main = module.UI_Main;
  4179. }],
  4180. execute: function () {
  4181. var _dec, _class;
  4182. cclegacy._RF.push({}, "8fb82Ol44hAxperkef41f5v", "UI_Lock", undefined);
  4183. var ccclass = _decorator.ccclass,
  4184. property = _decorator.property;
  4185. var UI_Lock = exports('UI_Lock', (_dec = ccclass('UI_Lock'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  4186. _inheritsLoose(UI_Lock, _ui_base);
  4187. function UI_Lock() {
  4188. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Lock/Lock', GameUILayers.HUD, Layout_Lock) || this;
  4189. }
  4190. var _proto = UI_Lock.prototype;
  4191. _proto.onCreated = /*#__PURE__*/function () {
  4192. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
  4193. var layout, main_layout;
  4194. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  4195. while (1) switch (_context2.prev = _context2.next) {
  4196. case 0:
  4197. layout = this.getLayout();
  4198. ani_ui(layout.Close_Btn.node.parent);
  4199. main_layout = gui.get(UI_Main).getLayout();
  4200. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.pause);
  4201. this.onButtonEvent(layout.Close_Btn, function () {
  4202. //关闭设置界面
  4203. gui.close(UI_Lock);
  4204. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.resume);
  4205. }, this);
  4206. this.onButtonEvent(layout.Ensure_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  4207. var ret, i;
  4208. return _regeneratorRuntime().wrap(function _callee$(_context) {
  4209. while (1) switch (_context.prev = _context.next) {
  4210. case 0:
  4211. _context.next = 2;
  4212. return chsdk.playRewardAd('解锁槽位');
  4213. case 2:
  4214. ret = _context.sent;
  4215. if (!ret) {
  4216. _context.next = 15;
  4217. break;
  4218. }
  4219. i = 0;
  4220. case 5:
  4221. if (!(i < 2)) {
  4222. _context.next = 15;
  4223. break;
  4224. }
  4225. if (!main_layout.Container.Lock_node[i].active) {
  4226. _context.next = 12;
  4227. break;
  4228. }
  4229. main_layout.Container.Lock_node[i].active = false;
  4230. main_layout.Container.unlock_Num += 1;
  4231. gui.close(UI_Lock);
  4232. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.resume);
  4233. return _context.abrupt("return");
  4234. case 12:
  4235. i++;
  4236. _context.next = 5;
  4237. break;
  4238. case 15:
  4239. case "end":
  4240. return _context.stop();
  4241. }
  4242. }, _callee);
  4243. })), this);
  4244. case 6:
  4245. case "end":
  4246. return _context2.stop();
  4247. }
  4248. }, _callee2, this);
  4249. }));
  4250. function onCreated() {
  4251. return _onCreated.apply(this, arguments);
  4252. }
  4253. return onCreated;
  4254. }();
  4255. return UI_Lock;
  4256. }(ui_base)) || _class));
  4257. cclegacy._RF.pop();
  4258. }
  4259. };
  4260. });
  4261. System.register("chunks:///_virtual/UI_Main.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ch.ts', './ui.ts', './ui_base.ts', './ModuleDef.ts', './UI_GameRules.ts', './UI_Idioms.ts', './UI_Settings.ts', './UI_Win.ts', './Layout_Main.ts', './Container_Manager.ts', './Hall.ts', './UI_TimesOver.ts'], function (exports) {
  4262. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, find, ch, gui, GameUILayers, ui_base, ModuleDef, UI_GameRules, UI_Idioms, UI_Settings, UI_Win, Layout_Main, Container_Manager, Hall, UI_TimesOver;
  4263. return {
  4264. setters: [function (module) {
  4265. _inheritsLoose = module.inheritsLoose;
  4266. _asyncToGenerator = module.asyncToGenerator;
  4267. _regeneratorRuntime = module.regeneratorRuntime;
  4268. }, function (module) {
  4269. cclegacy = module.cclegacy;
  4270. _decorator = module._decorator;
  4271. find = module.find;
  4272. }, function (module) {
  4273. ch = module.ch;
  4274. }, function (module) {
  4275. gui = module.gui;
  4276. GameUILayers = module.GameUILayers;
  4277. }, function (module) {
  4278. ui_base = module.default;
  4279. }, function (module) {
  4280. ModuleDef = module.ModuleDef;
  4281. }, function (module) {
  4282. UI_GameRules = module.UI_GameRules;
  4283. }, function (module) {
  4284. UI_Idioms = module.UI_Idioms;
  4285. }, function (module) {
  4286. UI_Settings = module.UI_Settings;
  4287. }, function (module) {
  4288. UI_Win = module.UI_Win;
  4289. }, function (module) {
  4290. Layout_Main = module.Layout_Main;
  4291. }, function (module) {
  4292. Container_Manager = module.Container_Manager;
  4293. }, function (module) {
  4294. Hall = module.Hall;
  4295. }, function (module) {
  4296. UI_TimesOver = module.UI_TimesOver;
  4297. }],
  4298. execute: function () {
  4299. exports('ani_ui', ani_ui);
  4300. var _dec, _class;
  4301. cclegacy._RF.push({}, "31872b9CC5Fd6kJNVMdC0MF", "UI_Main", undefined);
  4302. var ccclass = _decorator.ccclass,
  4303. property = _decorator.property;
  4304. var UI_Main = exports('UI_Main', (_dec = ccclass('UI_Main'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  4305. _inheritsLoose(UI_Main, _ui_base);
  4306. function UI_Main() {
  4307. var _this;
  4308. _this = _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Main/Main', GameUILayers.GAME, Layout_Main) || this;
  4309. _this.evt = ch.get_new_event();
  4310. _this.running = true;
  4311. return _this;
  4312. }
  4313. var _proto = UI_Main.prototype;
  4314. _proto.onCreated = /*#__PURE__*/function () {
  4315. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
  4316. var _this2 = this;
  4317. var layout;
  4318. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  4319. while (1) switch (_context3.prev = _context3.next) {
  4320. case 0:
  4321. layout = this.getLayout();
  4322. layout.Container = find('Container').getComponent(Container_Manager);
  4323. this.onButtonEvent(layout.Pause_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(button) {
  4324. return _regeneratorRuntime().wrap(function _callee$(_context) {
  4325. while (1) switch (_context.prev = _context.next) {
  4326. case 0:
  4327. //打开设置界面
  4328. gui.show(UI_Settings);
  4329. _this2.pause();
  4330. case 2:
  4331. case "end":
  4332. return _context.stop();
  4333. }
  4334. }, _callee);
  4335. })), this);
  4336. this.onButtonEvent(layout.Rules_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(button) {
  4337. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  4338. while (1) switch (_context2.prev = _context2.next) {
  4339. case 0:
  4340. //打开游戏说明
  4341. gui.show(UI_GameRules);
  4342. case 1:
  4343. case "end":
  4344. return _context2.stop();
  4345. }
  4346. }, _callee2);
  4347. })), this);
  4348. //显示关卡数
  4349. layout.Level.string = '第' + (Hall.getInstance().player.get_max_floor() + 1) + '关';
  4350. //显示剩余方块
  4351. layout.Remain_Cube_Des.string = '剩余:' + gui.get(UI_Idioms).idioms.length * 2;
  4352. //开始倒计时
  4353. this.new_level();
  4354. Hall.getInstance().player.get_max_floor();
  4355. layout.schedule(function () {
  4356. if (_this2.running) {
  4357. if (layout.time != 0) {
  4358. layout.time -= 1;
  4359. var minute = Math.floor(layout.time / 60);
  4360. var second = layout.time % 60;
  4361. layout.Count_Down_Des.string = (minute >= 10 ? minute : '0' + minute) + ':' + (second >= 10 ? second : '0' + second);
  4362. } else {
  4363. if (layout.Container.idioms.length > 0) {
  4364. gui.show(UI_TimesOver);
  4365. _this2.running = false;
  4366. }
  4367. }
  4368. if (layout.Container.idioms.length <= 0) {
  4369. console.log('恭喜你,通关成功');
  4370. Hall.getInstance().player.set_pass_level(1);
  4371. Hall.getInstance().player.set_max_floor(Hall.getInstance().player.get_max_floor() + 1);
  4372. Hall.getInstance().player.setDirty();
  4373. Hall.getInstance().player.save_rank_floor();
  4374. Hall.getInstance().player.save();
  4375. gui.show(UI_Win);
  4376. _this2.running = false;
  4377. }
  4378. }
  4379. }, 1.0);
  4380. this.evt.on(this.evt.key.pause, this.pause, this);
  4381. this.evt.on(this.evt.key.resume, this.resume, this);
  4382. this.evt.on(this.evt.key.next_level, this.new_level, this);
  4383. this.evt.on(this.evt.key.update_remain, this.remain, this);
  4384. this.evt.on(this.evt.key.update_ui_idioms, this.ui_idioms, this);
  4385. case 14:
  4386. case "end":
  4387. return _context3.stop();
  4388. }
  4389. }, _callee3, this);
  4390. }));
  4391. function onCreated() {
  4392. return _onCreated.apply(this, arguments);
  4393. }
  4394. return onCreated;
  4395. }();
  4396. _proto.new_level = function new_level() {
  4397. var level = Hall.getInstance().player.get_max_floor();
  4398. var layout = this.getLayout();
  4399. layout.time = layout.Container.level_config[level].time;
  4400. var minute = Math.floor(layout.Container.level_config[level].time / 60);
  4401. var second = layout.Container.level_config[level].time % 60;
  4402. layout.Count_Down_Des.string = (minute >= 10 ? minute : '0' + minute) + ':' + (second >= 10 ? second : '0' + second);
  4403. layout.Remain_Cube_Des.string = '剩余:' + gui.get(UI_Idioms).idioms.length * 2;
  4404. layout.Level.string = '第' + (Hall.getInstance().player.get_max_floor() + 1) + '关';
  4405. if (level == 0) {
  4406. layout.Hand.active = true;
  4407. } else {
  4408. layout.Hand.active = false;
  4409. }
  4410. this.running = true;
  4411. };
  4412. _proto.remain = function remain() {
  4413. var layout = this.getLayout();
  4414. layout.Remain_Cube_Des.string = '剩余:' + gui.get(UI_Idioms).idioms.length * 2;
  4415. };
  4416. _proto.ui_idioms = function ui_idioms() {
  4417. gui.get(UI_Idioms).init();
  4418. };
  4419. _proto.pause = function pause() {
  4420. this.running = false;
  4421. };
  4422. _proto.resume = function resume() {
  4423. this.running = true;
  4424. };
  4425. _proto.onDispose = function onDispose() {
  4426. var layout = this.getLayout();
  4427. layout.unscheduleAllCallbacks();
  4428. };
  4429. return UI_Main;
  4430. }(ui_base)) || _class));
  4431. function ani_ui(node, end) {
  4432. if (end === void 0) {
  4433. end = 1.0;
  4434. }
  4435. gui.scale_elasticOut_anim(node, 1.2, 0.5, end);
  4436. }
  4437. cclegacy._RF.pop();
  4438. }
  4439. };
  4440. });
  4441. System.register("chunks:///_virtual/UI_Rank_Item.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './UI_Head_Icon.ts', './ch.ts'], function (exports) {
  4442. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, Sprite, SpriteFrame, Label, Component, UI_Head_Icon, ch;
  4443. return {
  4444. setters: [function (module) {
  4445. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  4446. _inheritsLoose = module.inheritsLoose;
  4447. _initializerDefineProperty = module.initializerDefineProperty;
  4448. _assertThisInitialized = module.assertThisInitialized;
  4449. }, function (module) {
  4450. cclegacy = module.cclegacy;
  4451. _decorator = module._decorator;
  4452. Sprite = module.Sprite;
  4453. SpriteFrame = module.SpriteFrame;
  4454. Label = module.Label;
  4455. Component = module.Component;
  4456. }, function (module) {
  4457. UI_Head_Icon = module.UI_Head_Icon;
  4458. }, function (module) {
  4459. ch = module.ch;
  4460. }],
  4461. execute: function () {
  4462. var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
  4463. cclegacy._RF.push({}, "ac170vYiRpERZJoeSznhVhO", "UI_Rank_Item", undefined);
  4464. var ccclass = _decorator.ccclass,
  4465. property = _decorator.property;
  4466. var UI_Rank_Item = exports('UI_Rank_Item', (_dec = ccclass('UI_Rank_Item'), _dec2 = property(Sprite), _dec3 = property([SpriteFrame]), _dec4 = property(Sprite), _dec5 = property([SpriteFrame]), _dec6 = property(Label), _dec7 = property(UI_Head_Icon), _dec8 = property(Label), _dec9 = property(Label), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  4467. _inheritsLoose(UI_Rank_Item, _Component);
  4468. function UI_Rank_Item() {
  4469. var _this;
  4470. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  4471. args[_key] = arguments[_key];
  4472. }
  4473. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  4474. _initializerDefineProperty(_this, "Bg", _descriptor, _assertThisInitialized(_this));
  4475. _initializerDefineProperty(_this, "Bgs", _descriptor2, _assertThisInitialized(_this));
  4476. _initializerDefineProperty(_this, "Medal", _descriptor3, _assertThisInitialized(_this));
  4477. _initializerDefineProperty(_this, "Medals", _descriptor4, _assertThisInitialized(_this));
  4478. _initializerDefineProperty(_this, "Num", _descriptor5, _assertThisInitialized(_this));
  4479. _initializerDefineProperty(_this, "Head_Icon", _descriptor6, _assertThisInitialized(_this));
  4480. _initializerDefineProperty(_this, "Name", _descriptor7, _assertThisInitialized(_this));
  4481. _initializerDefineProperty(_this, "Level", _descriptor8, _assertThisInitialized(_this));
  4482. return _this;
  4483. }
  4484. var _proto = UI_Rank_Item.prototype;
  4485. _proto.showInfo = function showInfo(index, type, data, me) {
  4486. var _data$score;
  4487. if (!data) {
  4488. this.node.active = false;
  4489. return;
  4490. }
  4491. this.node.active = true;
  4492. if (me) {
  4493. this.Bg.spriteFrame = this.Bgs[4];
  4494. index <= 3 ? this.Medal.spriteFrame = this.Medals[index - 1] : this.Medal.spriteFrame = this.Medals[3];
  4495. } else {
  4496. index <= 3 ? this.Bg.spriteFrame = this.Bgs[index - 1] : this.Bg.spriteFrame = this.Bgs[3];
  4497. index <= 3 ? this.Medal.spriteFrame = this.Medals[index - 1] : this.Medal.spriteFrame = this.Medals[3];
  4498. }
  4499. if (index > 3) {
  4500. this.Medal.node.active = false;
  4501. } else {
  4502. this.Medal.node.active = true;
  4503. }
  4504. this.Num.string = index == 101 ? "未上榜" : index <= 3 ? '' : index.toString();
  4505. this.Name.string = ch.sdk.getDefNickName(data);
  4506. this.Level.string = ((_data$score = data.score) != null ? _data$score : 0) + "\u5173";
  4507. console.log(data);
  4508. this.Head_Icon.show(data.userId.toString(), data.head);
  4509. };
  4510. return UI_Rank_Item;
  4511. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Bg", [_dec2], {
  4512. configurable: true,
  4513. enumerable: true,
  4514. writable: true,
  4515. initializer: function initializer() {
  4516. return null;
  4517. }
  4518. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Bgs", [_dec3], {
  4519. configurable: true,
  4520. enumerable: true,
  4521. writable: true,
  4522. initializer: function initializer() {
  4523. return [];
  4524. }
  4525. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Medal", [_dec4], {
  4526. configurable: true,
  4527. enumerable: true,
  4528. writable: true,
  4529. initializer: function initializer() {
  4530. return null;
  4531. }
  4532. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Medals", [_dec5], {
  4533. configurable: true,
  4534. enumerable: true,
  4535. writable: true,
  4536. initializer: function initializer() {
  4537. return [];
  4538. }
  4539. }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Num", [_dec6], {
  4540. configurable: true,
  4541. enumerable: true,
  4542. writable: true,
  4543. initializer: function initializer() {
  4544. return null;
  4545. }
  4546. }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "Head_Icon", [_dec7], {
  4547. configurable: true,
  4548. enumerable: true,
  4549. writable: true,
  4550. initializer: function initializer() {
  4551. return null;
  4552. }
  4553. }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "Name", [_dec8], {
  4554. configurable: true,
  4555. enumerable: true,
  4556. writable: true,
  4557. initializer: function initializer() {
  4558. return null;
  4559. }
  4560. }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "Level", [_dec9], {
  4561. configurable: true,
  4562. enumerable: true,
  4563. writable: true,
  4564. initializer: function initializer() {
  4565. return null;
  4566. }
  4567. })), _class2)) || _class));
  4568. cclegacy._RF.pop();
  4569. }
  4570. };
  4571. });
  4572. System.register("chunks:///_virtual/UI_Rank.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui.ts', './ui_base.ts', './UIWaiting.ts', './ModuleDef.ts', './Layout_Rank.ts', './UI_Rank_Item.ts', './UI_Main.ts', './Hall.ts'], function (exports) {
  4573. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, GameUILayers, gui, ui_base, UIWaiting, ModuleDef, Layout_Rank, UI_Rank_Item, ani_ui, Hall;
  4574. return {
  4575. setters: [function (module) {
  4576. _inheritsLoose = module.inheritsLoose;
  4577. _asyncToGenerator = module.asyncToGenerator;
  4578. _regeneratorRuntime = module.regeneratorRuntime;
  4579. }, function (module) {
  4580. cclegacy = module.cclegacy;
  4581. _decorator = module._decorator;
  4582. }, function (module) {
  4583. GameUILayers = module.GameUILayers;
  4584. gui = module.gui;
  4585. }, function (module) {
  4586. ui_base = module.default;
  4587. }, function (module) {
  4588. UIWaiting = module.UIWaiting;
  4589. }, function (module) {
  4590. ModuleDef = module.ModuleDef;
  4591. }, function (module) {
  4592. Layout_Rank = module.Layout_Rank;
  4593. }, function (module) {
  4594. UI_Rank_Item = module.UI_Rank_Item;
  4595. }, function (module) {
  4596. ani_ui = module.ani_ui;
  4597. }, function (module) {
  4598. Hall = module.Hall;
  4599. }],
  4600. execute: function () {
  4601. var _dec, _class;
  4602. cclegacy._RF.push({}, "25b8cJMNUNOA77jdI7BF1kA", "UI_Rank", undefined);
  4603. var ccclass = _decorator.ccclass,
  4604. property = _decorator.property;
  4605. //1总榜2好友榜
  4606. var type = 1;
  4607. var UI_Rank = exports('UI_Rank', (_dec = ccclass('UI_Rank'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  4608. _inheritsLoose(UI_Rank, _ui_base);
  4609. function UI_Rank() {
  4610. var _this;
  4611. _this = _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Rank/Rank', GameUILayers.HUD, Layout_Rank) || this;
  4612. _this._owner = void 0;
  4613. _this._data = void 0;
  4614. _this._openContext = void 0;
  4615. return _this;
  4616. }
  4617. var _proto = UI_Rank.prototype;
  4618. _proto.onCreated = /*#__PURE__*/function () {
  4619. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
  4620. var _this2 = this;
  4621. var layout;
  4622. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  4623. while (1) switch (_context2.prev = _context2.next) {
  4624. case 0:
  4625. layout = this.getLayout();
  4626. ani_ui(layout.Close_Btn.node.parent);
  4627. this.onButtonEvent(layout.Close_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(button) {
  4628. return _regeneratorRuntime().wrap(function _callee$(_context) {
  4629. while (1) switch (_context.prev = _context.next) {
  4630. case 0:
  4631. //关闭设置界面
  4632. gui.close(UI_Rank);
  4633. case 1:
  4634. case "end":
  4635. return _context.stop();
  4636. }
  4637. }, _callee);
  4638. })), this);
  4639. layout.onList1 = function (item, index) {
  4640. item.getComponent(UI_Rank_Item).showInfo(index + 1, type, _this2._data[index], false);
  4641. };
  4642. layout.onList2 = function (item, index) {
  4643. // item.getComponent(ui_skin_block).showInfo(index + 1, this._data2[index]);
  4644. };
  4645. layout.Rank_Toggle_1.isChecked = type == 1;
  4646. layout.Rank_Toggle_2.isChecked = type == 2;
  4647. this.show();
  4648. this.onToggleEvent(layout.Rank_Toggle_1, function (tg, i) {
  4649. if (tg.isChecked) _this2.show(i);
  4650. }, this, 1);
  4651. this.onToggleEvent(layout.Rank_Toggle_2, function (tg, i) {
  4652. if (tg.isChecked) _this2.show(i);
  4653. }, this, 2);
  4654. case 10:
  4655. case "end":
  4656. return _context2.stop();
  4657. }
  4658. }, _callee2, this);
  4659. }));
  4660. function onCreated() {
  4661. return _onCreated.apply(this, arguments);
  4662. }
  4663. return onCreated;
  4664. }();
  4665. _proto.show = /*#__PURE__*/function () {
  4666. var _show = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(t) {
  4667. var layout, d, index, _d, _index;
  4668. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  4669. while (1) switch (_context3.prev = _context3.next) {
  4670. case 0:
  4671. layout = this.getLayout();
  4672. if (!(t != null)) {
  4673. _context3.next = 5;
  4674. break;
  4675. }
  4676. if (!(t == type)) {
  4677. _context3.next = 4;
  4678. break;
  4679. }
  4680. return _context3.abrupt("return");
  4681. case 4:
  4682. type = t;
  4683. // button_sound();
  4684. case 5:
  4685. layout.Rank_Toggle_1.isChecked = type == 1;
  4686. layout.Rank_Toggle_2.isChecked = type == 2;
  4687. if (!(type == 1 || t == null)) {
  4688. _context3.next = 23;
  4689. break;
  4690. }
  4691. _context3.next = 10;
  4692. return gui.show(UIWaiting);
  4693. case 10:
  4694. layout.list1.node.active = true;
  4695. layout.list2.node.active = false;
  4696. layout.list1.numItems = 0;
  4697. _context3.next = 15;
  4698. return Hall.getInstance().player.get_rank_floor();
  4699. case 15:
  4700. d = _context3.sent;
  4701. this._data = d.list;
  4702. this._owner = d.owner;
  4703. index = d.index;
  4704. layout.list1.numItems = this._data.length;
  4705. if (!this._owner) {
  4706. this._owner = {
  4707. head: Hall.getInstance().player.avatarUrl,
  4708. nickName: Hall.getInstance().player.nickName,
  4709. score: 0,
  4710. userId: 0,
  4711. province: Hall.getInstance().player.user_info.province
  4712. };
  4713. }
  4714. layout.own1_item.showInfo(index, type, this._owner, true);
  4715. gui.close(UIWaiting);
  4716. case 23:
  4717. if (!(type == 2)) {
  4718. _context3.next = 39;
  4719. break;
  4720. }
  4721. _context3.next = 26;
  4722. return gui.show(UIWaiting);
  4723. case 26:
  4724. layout.list2.node.active = true;
  4725. layout.list1.node.active = false;
  4726. layout.list2.numItems = 0;
  4727. _context3.next = 31;
  4728. return Hall.getInstance().player.get_rank_floor();
  4729. case 31:
  4730. _d = _context3.sent;
  4731. this._data = _d.list;
  4732. this._owner = _d.owner;
  4733. _index = _d.index;
  4734. layout.list2.numItems = this._data.length;
  4735. if (!this._owner) {
  4736. this._owner = {
  4737. head: Hall.getInstance().player.avatarUrl,
  4738. nickName: Hall.getInstance().player.nickName,
  4739. score: 0,
  4740. userId: 0,
  4741. province: Hall.getInstance().player.user_info.province
  4742. };
  4743. }
  4744. layout.own2_item.showInfo(_index, type, this._owner, true);
  4745. gui.close(UIWaiting);
  4746. case 39:
  4747. case "end":
  4748. return _context3.stop();
  4749. }
  4750. }, _callee3, this);
  4751. }));
  4752. function show(_x2) {
  4753. return _show.apply(this, arguments);
  4754. }
  4755. return show;
  4756. }();
  4757. return UI_Rank;
  4758. }(ui_base)) || _class));
  4759. cclegacy._RF.pop();
  4760. }
  4761. };
  4762. });
  4763. System.register("chunks:///_virtual/UI_Settings.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Layout_Settings.ts', './UI_Main.ts', './UI_Hall.ts', './ch.ts', './ui.ts', './ui_base.ts', './ResUtil.ts', './ModuleDef.ts', './SceneDef.ts'], function (exports) {
  4764. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, director, Layout_Settings, ani_ui, UI_Main, UI_Hall, ch, GameUILayers, gui, ui_base, ResUtil, ModuleDef, SceneDef;
  4765. return {
  4766. setters: [function (module) {
  4767. _inheritsLoose = module.inheritsLoose;
  4768. _asyncToGenerator = module.asyncToGenerator;
  4769. _regeneratorRuntime = module.regeneratorRuntime;
  4770. }, function (module) {
  4771. cclegacy = module.cclegacy;
  4772. _decorator = module._decorator;
  4773. director = module.director;
  4774. }, function (module) {
  4775. Layout_Settings = module.Layout_Settings;
  4776. }, function (module) {
  4777. ani_ui = module.ani_ui;
  4778. UI_Main = module.UI_Main;
  4779. }, function (module) {
  4780. UI_Hall = module.UI_Hall;
  4781. }, function (module) {
  4782. ch = module.ch;
  4783. }, function (module) {
  4784. GameUILayers = module.GameUILayers;
  4785. gui = module.gui;
  4786. }, function (module) {
  4787. ui_base = module.default;
  4788. }, function (module) {
  4789. ResUtil = module.ResUtil;
  4790. }, function (module) {
  4791. ModuleDef = module.ModuleDef;
  4792. }, function (module) {
  4793. SceneDef = module.SceneDef;
  4794. }],
  4795. execute: function () {
  4796. var _dec, _class;
  4797. cclegacy._RF.push({}, "74e38zkF0dMfY6EeNgP2Gbx", "UI_Settings", undefined);
  4798. var ccclass = _decorator.ccclass,
  4799. property = _decorator.property;
  4800. var UI_Settings = exports('UI_Settings', (_dec = ccclass('UI_Settings'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  4801. _inheritsLoose(UI_Settings, _ui_base);
  4802. function UI_Settings() {
  4803. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Settings/Settings', GameUILayers.HUD, Layout_Settings) || this;
  4804. }
  4805. var _proto = UI_Settings.prototype;
  4806. _proto.onCreated = /*#__PURE__*/function () {
  4807. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
  4808. var layout;
  4809. return _regeneratorRuntime().wrap(function _callee5$(_context5) {
  4810. while (1) switch (_context5.prev = _context5.next) {
  4811. case 0:
  4812. layout = this.getLayout();
  4813. ani_ui(layout.Close_Btn.node.parent);
  4814. if (director.getScene().name == 'hall') {
  4815. layout.Defeat_Btn.node.active = false;
  4816. }
  4817. this.onButtonEvent(layout.Close_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(button) {
  4818. return _regeneratorRuntime().wrap(function _callee$(_context) {
  4819. while (1) switch (_context.prev = _context.next) {
  4820. case 0:
  4821. //关闭设置界面
  4822. gui.close(UI_Settings);
  4823. if (director.getScene().name == 'main') {
  4824. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.resume);
  4825. }
  4826. case 2:
  4827. case "end":
  4828. return _context.stop();
  4829. }
  4830. }, _callee);
  4831. })), this);
  4832. layout.Toggle_Music.isChecked = ch.audio.volumeMusic != 0;
  4833. layout.Toggle_Sound.isChecked = ch.audio.switchEffect;
  4834. this.onToggleEvent(layout.Toggle_Music, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(toggle) {
  4835. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  4836. while (1) switch (_context2.prev = _context2.next) {
  4837. case 0:
  4838. ch.audio.volumeMusic = toggle.isChecked;
  4839. ch.audio.save();
  4840. // button_sound();
  4841. case 2:
  4842. case "end":
  4843. return _context2.stop();
  4844. }
  4845. }, _callee2);
  4846. })), this);
  4847. this.onToggleEvent(layout.Toggle_Sound, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(toggle) {
  4848. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  4849. while (1) switch (_context3.prev = _context3.next) {
  4850. case 0:
  4851. ch.audio.switchEffect = toggle.isChecked;
  4852. ch.audio.save();
  4853. // button_sound();
  4854. case 2:
  4855. case "end":
  4856. return _context3.stop();
  4857. }
  4858. }, _callee3);
  4859. })), this);
  4860. this.onButtonEvent(layout.Defeat_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(button) {
  4861. return _regeneratorRuntime().wrap(function _callee4$(_context4) {
  4862. while (1) switch (_context4.prev = _context4.next) {
  4863. case 0:
  4864. _context4.next = 2;
  4865. return gui.closeAll();
  4866. case 2:
  4867. gui.show(UI_Hall);
  4868. ResUtil.loadScene(SceneDef.Hall, ModuleDef.GAME, true);
  4869. case 4:
  4870. case "end":
  4871. return _context4.stop();
  4872. }
  4873. }, _callee4);
  4874. })), this);
  4875. case 9:
  4876. case "end":
  4877. return _context5.stop();
  4878. }
  4879. }, _callee5, this);
  4880. }));
  4881. function onCreated() {
  4882. return _onCreated.apply(this, arguments);
  4883. }
  4884. return onCreated;
  4885. }();
  4886. return UI_Settings;
  4887. }(ui_base)) || _class));
  4888. cclegacy._RF.pop();
  4889. }
  4890. };
  4891. });
  4892. System.register("chunks:///_virtual/UI_SideBar.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui.ts', './ui_base.ts', './ModuleDef.ts', './Layout_SideBar.ts', './UI_Main.ts', './Start.ts'], function (exports) {
  4893. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, GameUILayers, gui, ui_base, ModuleDef, Layout_SideBar, ani_ui, Start;
  4894. return {
  4895. setters: [function (module) {
  4896. _inheritsLoose = module.inheritsLoose;
  4897. _asyncToGenerator = module.asyncToGenerator;
  4898. _regeneratorRuntime = module.regeneratorRuntime;
  4899. }, function (module) {
  4900. cclegacy = module.cclegacy;
  4901. _decorator = module._decorator;
  4902. }, function (module) {
  4903. GameUILayers = module.GameUILayers;
  4904. gui = module.gui;
  4905. }, function (module) {
  4906. ui_base = module.default;
  4907. }, function (module) {
  4908. ModuleDef = module.ModuleDef;
  4909. }, function (module) {
  4910. Layout_SideBar = module.Layout_SideBar;
  4911. }, function (module) {
  4912. ani_ui = module.ani_ui;
  4913. }, function (module) {
  4914. Start = module.Start;
  4915. }],
  4916. execute: function () {
  4917. var _dec, _class;
  4918. cclegacy._RF.push({}, "53621eOLopL4LGEoVokwFS4", "UI_SideBar", undefined);
  4919. var ccclass = _decorator.ccclass,
  4920. property = _decorator.property;
  4921. var UI_SideBar = exports('UI_SideBar', (_dec = ccclass('UI_SideBar'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  4922. _inheritsLoose(UI_SideBar, _ui_base);
  4923. function UI_SideBar() {
  4924. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_SideBar/SideBar', GameUILayers.HUD, Layout_SideBar) || this;
  4925. }
  4926. var _proto = UI_SideBar.prototype;
  4927. _proto.onCreated = /*#__PURE__*/function () {
  4928. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  4929. var layout;
  4930. return _regeneratorRuntime().wrap(function _callee$(_context) {
  4931. while (1) switch (_context.prev = _context.next) {
  4932. case 0:
  4933. layout = this.getLayout();
  4934. ani_ui(layout.Close_Btn.node.parent);
  4935. this.onButtonEvent(layout.Close_Btn, function () {
  4936. gui.close(UI_SideBar);
  4937. });
  4938. this.onButtonEvent(layout.Go_SideBar, function () {
  4939. //进入侧边栏
  4940. chsdk.goToSidebar();
  4941. });
  4942. layout.Logo.spriteFrame = layout.Logos[Start.packId];
  4943. case 5:
  4944. case "end":
  4945. return _context.stop();
  4946. }
  4947. }, _callee, this);
  4948. }));
  4949. function onCreated() {
  4950. return _onCreated.apply(this, arguments);
  4951. }
  4952. return onCreated;
  4953. }();
  4954. return UI_SideBar;
  4955. }(ui_base)) || _class));
  4956. cclegacy._RF.pop();
  4957. }
  4958. };
  4959. });
  4960. System.register("chunks:///_virtual/UI_Sign.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './sign.ts', './ui.ts', './ui_base.ts', './ModuleDef.ts', './UI_Main.ts', './Layout_Sign.ts', './Hall.ts'], function (exports) {
  4961. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Sprite, ch_sign, GameUILayers, gui, ui_base, ModuleDef, ani_ui, Layout_Sign, Hall;
  4962. return {
  4963. setters: [function (module) {
  4964. _inheritsLoose = module.inheritsLoose;
  4965. _asyncToGenerator = module.asyncToGenerator;
  4966. _regeneratorRuntime = module.regeneratorRuntime;
  4967. }, function (module) {
  4968. cclegacy = module.cclegacy;
  4969. _decorator = module._decorator;
  4970. Sprite = module.Sprite;
  4971. }, function (module) {
  4972. ch_sign = module.default;
  4973. }, function (module) {
  4974. GameUILayers = module.GameUILayers;
  4975. gui = module.gui;
  4976. }, function (module) {
  4977. ui_base = module.default;
  4978. }, function (module) {
  4979. ModuleDef = module.ModuleDef;
  4980. }, function (module) {
  4981. ani_ui = module.ani_ui;
  4982. }, function (module) {
  4983. Layout_Sign = module.Layout_Sign;
  4984. }, function (module) {
  4985. Hall = module.Hall;
  4986. }],
  4987. execute: function () {
  4988. var _dec, _class;
  4989. cclegacy._RF.push({}, "0aee2ozI6tC95ZSVqBOl1ws", "UI_Sign", undefined);
  4990. var ccclass = _decorator.ccclass,
  4991. property = _decorator.property;
  4992. var UI_Sign = exports('UI_Sign', (_dec = ccclass('UI_Sign'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  4993. _inheritsLoose(UI_Sign, _ui_base);
  4994. function UI_Sign() {
  4995. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Sign/Sign', GameUILayers.HUD, Layout_Sign) || this;
  4996. }
  4997. var _proto = UI_Sign.prototype;
  4998. _proto.onCreated = /*#__PURE__*/function () {
  4999. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
  5000. var _this = this;
  5001. var layout;
  5002. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  5003. while (1) switch (_context2.prev = _context2.next) {
  5004. case 0:
  5005. layout = this.getLayout();
  5006. ani_ui(layout.Return.node.parent.parent);
  5007. this.onButtonEvent(layout.Return, function () {
  5008. gui.close(UI_Sign);
  5009. });
  5010. this.onButtonEvent(layout.Free_Get, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  5011. return _regeneratorRuntime().wrap(function _callee$(_context) {
  5012. while (1) switch (_context.prev = _context.next) {
  5013. case 0:
  5014. if (layout.Toggle.isChecked) {
  5015. _this.Sign(true);
  5016. } else {
  5017. //不看广告
  5018. _this.Sign(false);
  5019. }
  5020. case 1:
  5021. case "end":
  5022. return _context.stop();
  5023. }
  5024. }, _callee);
  5025. })));
  5026. this.init_Sign();
  5027. case 5:
  5028. case "end":
  5029. return _context2.stop();
  5030. }
  5031. }, _callee2, this);
  5032. }));
  5033. function onCreated() {
  5034. return _onCreated.apply(this, arguments);
  5035. }
  5036. return onCreated;
  5037. }();
  5038. _proto.init_Sign = /*#__PURE__*/function () {
  5039. var _init_Sign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
  5040. var layout, i;
  5041. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  5042. while (1) switch (_context3.prev = _context3.next) {
  5043. case 0:
  5044. layout = this.getLayout();
  5045. for (i = 0; i < 7; i++) {
  5046. layout.Sign_Reward[i].show(i + 1);
  5047. }
  5048. if (!ch_sign.getInstance().checkSigin()) {
  5049. layout.Free_Get.node.getComponent(Sprite).grayscale = true;
  5050. layout.Free_Get.interactable = false;
  5051. }
  5052. case 3:
  5053. case "end":
  5054. return _context3.stop();
  5055. }
  5056. }, _callee3, this);
  5057. }));
  5058. function init_Sign() {
  5059. return _init_Sign.apply(this, arguments);
  5060. }
  5061. return init_Sign;
  5062. }();
  5063. _proto.Sign = /*#__PURE__*/function () {
  5064. var _Sign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(flag) {
  5065. var layout, day, ret;
  5066. return _regeneratorRuntime().wrap(function _callee4$(_context4) {
  5067. while (1) switch (_context4.prev = _context4.next) {
  5068. case 0:
  5069. layout = this.getLayout();
  5070. _context4.next = 3;
  5071. return ch_sign.getInstance().signIn();
  5072. case 3:
  5073. day = _context4.sent;
  5074. if (!(day == 0)) {
  5075. _context4.next = 7;
  5076. break;
  5077. }
  5078. _context4.next = 18;
  5079. break;
  5080. case 7:
  5081. if (!flag) {
  5082. _context4.next = 14;
  5083. break;
  5084. }
  5085. _context4.next = 10;
  5086. return chsdk.playRewardAd('领取双倍签到奖励');
  5087. case 10:
  5088. ret = _context4.sent;
  5089. if (ret) {
  5090. Hall.getInstance().player.set_watch_ad_num(1);
  5091. layout.Sign_Reward[day - 1].show(day);
  5092. layout.Sign_Reward[day - 1].add_Item(flag);
  5093. layout.Free_Get.node.getComponent(Sprite).grayscale = true;
  5094. layout.Free_Get.interactable = false;
  5095. }
  5096. _context4.next = 18;
  5097. break;
  5098. case 14:
  5099. layout.Sign_Reward[day - 1].show(day);
  5100. layout.Sign_Reward[day - 1].add_Item(flag);
  5101. layout.Free_Get.node.getComponent(Sprite).grayscale = true;
  5102. layout.Free_Get.interactable = false;
  5103. case 18:
  5104. case "end":
  5105. return _context4.stop();
  5106. }
  5107. }, _callee4, this);
  5108. }));
  5109. function Sign(_x) {
  5110. return _Sign.apply(this, arguments);
  5111. }
  5112. return Sign;
  5113. }();
  5114. return UI_Sign;
  5115. }(ui_base)) || _class));
  5116. cclegacy._RF.pop();
  5117. }
  5118. };
  5119. });
  5120. System.register("chunks:///_virtual/UI_Store.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui.ts', './ui_base.ts', './ModuleDef.ts', './Layout_Store.ts', './UI_Main.ts', './Hall.ts', './Toast.ts', './table_store.ts'], function (exports) {
  5121. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, Sprite, GameUILayers, gui, ui_base, ModuleDef, Layout_Store, ani_ui, Hall, Toast, table_store;
  5122. return {
  5123. setters: [function (module) {
  5124. _inheritsLoose = module.inheritsLoose;
  5125. _asyncToGenerator = module.asyncToGenerator;
  5126. _regeneratorRuntime = module.regeneratorRuntime;
  5127. }, function (module) {
  5128. cclegacy = module.cclegacy;
  5129. _decorator = module._decorator;
  5130. Sprite = module.Sprite;
  5131. }, function (module) {
  5132. GameUILayers = module.GameUILayers;
  5133. gui = module.gui;
  5134. }, function (module) {
  5135. ui_base = module.default;
  5136. }, function (module) {
  5137. ModuleDef = module.ModuleDef;
  5138. }, function (module) {
  5139. Layout_Store = module.Layout_Store;
  5140. }, function (module) {
  5141. ani_ui = module.ani_ui;
  5142. }, function (module) {
  5143. Hall = module.Hall;
  5144. }, function (module) {
  5145. Toast = module.Toast;
  5146. }, function (module) {
  5147. table_store = module.table_store;
  5148. }],
  5149. execute: function () {
  5150. var _dec, _class;
  5151. cclegacy._RF.push({}, "60b3bv9XPZJKYK+7QPAcISg", "UI_Store", undefined);
  5152. var ccclass = _decorator.ccclass,
  5153. property = _decorator.property;
  5154. var UI_Store = exports('UI_Store', (_dec = ccclass('UI_Store'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  5155. _inheritsLoose(UI_Store, _ui_base);
  5156. function UI_Store() {
  5157. var _this;
  5158. _this = _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Store/Store', GameUILayers.HUD, Layout_Store) || this;
  5159. _this.config = void 0;
  5160. return _this;
  5161. }
  5162. var _proto = UI_Store.prototype;
  5163. _proto.onCreated = /*#__PURE__*/function () {
  5164. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
  5165. var _this2 = this;
  5166. var layout, state, _loop, i, _loop2, _i;
  5167. return _regeneratorRuntime().wrap(function _callee4$(_context6) {
  5168. while (1) switch (_context6.prev = _context6.next) {
  5169. case 0:
  5170. this.config = table_store.getList();
  5171. console.log(this.config);
  5172. layout = this.getLayout();
  5173. ani_ui(layout.Close_Btn.node.parent);
  5174. state = Hall.getInstance().player.get_store_state();
  5175. console.log("商店数组:" + state);
  5176. this.onButtonEvent(layout.Close_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(button) {
  5177. return _regeneratorRuntime().wrap(function _callee$(_context) {
  5178. while (1) switch (_context.prev = _context.next) {
  5179. case 0:
  5180. gui.close(UI_Store);
  5181. case 1:
  5182. case "end":
  5183. return _context.stop();
  5184. }
  5185. }, _callee);
  5186. })));
  5187. _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop(i) {
  5188. return _regeneratorRuntime().wrap(function _loop$(_context3) {
  5189. while (1) switch (_context3.prev = _context3.next) {
  5190. case 0:
  5191. if (state[i] == false) {
  5192. _this2.onButtonEvent(layout.Free_Gets[i], /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(button) {
  5193. var res, _res;
  5194. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  5195. while (1) switch (_context2.prev = _context2.next) {
  5196. case 0:
  5197. if (!(i != 0)) {
  5198. _context2.next = 7;
  5199. break;
  5200. }
  5201. _context2.next = 3;
  5202. return chsdk.playRewardAd('获得道具' + _this2.config[i].type);
  5203. case 3:
  5204. res = _context2.sent;
  5205. if (res) {
  5206. Hall.getInstance().player.set_watch_ad_num(1);
  5207. Hall.getInstance().player.add_item(_this2.config[i].type, 1);
  5208. layout.Free_Gets[i].interactable = false;
  5209. layout.Free_Gets[i].node.getComponent(Sprite).grayscale = true;
  5210. state[i] = true;
  5211. Hall.getInstance().player.set_store_state(state);
  5212. Toast.makeText(gui.getLayerNode(5), '获得道具:' + _this2.config[i].name).show();
  5213. }
  5214. _context2.next = 11;
  5215. break;
  5216. case 7:
  5217. _context2.next = 9;
  5218. return chsdk.playRewardAd('获得铜币');
  5219. case 9:
  5220. _res = _context2.sent;
  5221. if (_res) {
  5222. Hall.getInstance().player.set_watch_ad_num(1);
  5223. Hall.getInstance().player.set_coin(Hall.getInstance().player.get_coin() + 100);
  5224. layout.Free_Gets[i].interactable = false;
  5225. layout.Free_Gets[i].node.getComponent(Sprite).grayscale = true;
  5226. _this2.show_Coin();
  5227. state[i] = true;
  5228. Hall.getInstance().player.set_store_state(state);
  5229. Toast.makeText(gui.getLayerNode(5), '获得铜币:X' + 100).show();
  5230. }
  5231. case 11:
  5232. case "end":
  5233. return _context2.stop();
  5234. }
  5235. }, _callee2);
  5236. })), _this2);
  5237. } else {
  5238. layout.Free_Gets[i].interactable = false;
  5239. layout.Free_Gets[i].node.getComponent(Sprite).grayscale = true;
  5240. }
  5241. case 1:
  5242. case "end":
  5243. return _context3.stop();
  5244. }
  5245. }, _loop);
  5246. });
  5247. i = 0;
  5248. case 9:
  5249. if (!(i < layout.Free_Gets.length)) {
  5250. _context6.next = 14;
  5251. break;
  5252. }
  5253. return _context6.delegateYield(_loop(i), "t0", 11);
  5254. case 11:
  5255. i++;
  5256. _context6.next = 9;
  5257. break;
  5258. case 14:
  5259. _loop2 = /*#__PURE__*/_regeneratorRuntime().mark(function _loop2(_i) {
  5260. return _regeneratorRuntime().wrap(function _loop2$(_context5) {
  5261. while (1) switch (_context5.prev = _context5.next) {
  5262. case 0:
  5263. _this2.onButtonEvent(layout.Coin_Gets[_i], /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(button) {
  5264. return _regeneratorRuntime().wrap(function _callee3$(_context4) {
  5265. while (1) switch (_context4.prev = _context4.next) {
  5266. case 0:
  5267. //花费铜币购买物品
  5268. if (Hall.getInstance().player.get_coin() >= _this2.config[_i + 1].cost) {
  5269. Hall.getInstance().player.add_item(_this2.config[_i + 1], 1);
  5270. Hall.getInstance().player.set_coin(Hall.getInstance().player.get_coin() - _this2.config[_i + 1].cost);
  5271. Toast.makeText(gui.getLayerNode(5), '获得道具:' + _this2.config[_i + 1].name).show();
  5272. _this2.show_Coin();
  5273. } else {
  5274. Toast.makeText(gui.getLayerNode(5), '铜币不足').show();
  5275. }
  5276. case 1:
  5277. case "end":
  5278. return _context4.stop();
  5279. }
  5280. }, _callee3);
  5281. })), _this2);
  5282. case 1:
  5283. case "end":
  5284. return _context5.stop();
  5285. }
  5286. }, _loop2);
  5287. });
  5288. _i = 0;
  5289. case 16:
  5290. if (!(_i < layout.Coin_Gets.length)) {
  5291. _context6.next = 21;
  5292. break;
  5293. }
  5294. return _context6.delegateYield(_loop2(_i), "t1", 18);
  5295. case 18:
  5296. _i++;
  5297. _context6.next = 16;
  5298. break;
  5299. case 21:
  5300. this.show_Coin();
  5301. case 22:
  5302. case "end":
  5303. return _context6.stop();
  5304. }
  5305. }, _callee4, this);
  5306. }));
  5307. function onCreated() {
  5308. return _onCreated.apply(this, arguments);
  5309. }
  5310. return onCreated;
  5311. }();
  5312. _proto.show_Coin = function show_Coin() {
  5313. var layout = this.getLayout();
  5314. layout.Coin_Num.string = Hall.getInstance().player.get_coin().toString();
  5315. };
  5316. return UI_Store;
  5317. }(ui_base)) || _class));
  5318. cclegacy._RF.pop();
  5319. }
  5320. };
  5321. });
  5322. System.register("chunks:///_virtual/UI_Task_Item.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './Hall.ts', './ui.ts', './UI_Task.ts', './Toast.ts'], function (exports) {
  5323. var _applyDecoratedDescriptor, _inheritsLoose, _initializerDefineProperty, _assertThisInitialized, cclegacy, _decorator, ProgressBar, Label, Button, Sprite, SpriteFrame, Component, Hall, gui, UI_Task, Toast;
  5324. return {
  5325. setters: [function (module) {
  5326. _applyDecoratedDescriptor = module.applyDecoratedDescriptor;
  5327. _inheritsLoose = module.inheritsLoose;
  5328. _initializerDefineProperty = module.initializerDefineProperty;
  5329. _assertThisInitialized = module.assertThisInitialized;
  5330. }, function (module) {
  5331. cclegacy = module.cclegacy;
  5332. _decorator = module._decorator;
  5333. ProgressBar = module.ProgressBar;
  5334. Label = module.Label;
  5335. Button = module.Button;
  5336. Sprite = module.Sprite;
  5337. SpriteFrame = module.SpriteFrame;
  5338. Component = module.Component;
  5339. }, function (module) {
  5340. Hall = module.Hall;
  5341. }, function (module) {
  5342. gui = module.gui;
  5343. }, function (module) {
  5344. UI_Task = module.UI_Task;
  5345. }, function (module) {
  5346. Toast = module.Toast;
  5347. }],
  5348. execute: function () {
  5349. var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
  5350. cclegacy._RF.push({}, "016bcam/A5JvLXaYhjRZdz9", "UI_Task_Item", undefined);
  5351. var ccclass = _decorator.ccclass,
  5352. property = _decorator.property;
  5353. var UI_Task_Item = exports('UI_Task_Item', (_dec = ccclass('UI_Task_Item'), _dec2 = property(ProgressBar), _dec3 = property(Label), _dec4 = property(Button), _dec5 = property(Sprite), _dec6 = property([SpriteFrame]), _dec(_class = (_class2 = /*#__PURE__*/function (_Component) {
  5354. _inheritsLoose(UI_Task_Item, _Component);
  5355. function UI_Task_Item() {
  5356. var _this;
  5357. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  5358. args[_key] = arguments[_key];
  5359. }
  5360. _this = _Component.call.apply(_Component, [this].concat(args)) || this;
  5361. _initializerDefineProperty(_this, "progressBar", _descriptor, _assertThisInitialized(_this));
  5362. _initializerDefineProperty(_this, "Des", _descriptor2, _assertThisInitialized(_this));
  5363. _initializerDefineProperty(_this, "Get", _descriptor3, _assertThisInitialized(_this));
  5364. _initializerDefineProperty(_this, "Get_Bg", _descriptor4, _assertThisInitialized(_this));
  5365. _initializerDefineProperty(_this, "Get_Bgs", _descriptor5, _assertThisInitialized(_this));
  5366. _this.config = void 0;
  5367. _initializerDefineProperty(_this, "index", _descriptor6, _assertThisInitialized(_this));
  5368. _this.state = void 0;
  5369. return _this;
  5370. }
  5371. var _proto = UI_Task_Item.prototype;
  5372. _proto.start = function start() {
  5373. this.Get.node.on(Button.EventType.CLICK, this.add_Item, this);
  5374. };
  5375. _proto.update = function update(deltaTime) {}
  5376. //更新进度
  5377. ;
  5378. _proto.show = function show(flag, config) {
  5379. this.config = config;
  5380. this.state = flag;
  5381. switch (config.type) {
  5382. //消除
  5383. case 1:
  5384. this.progressBar.progress = Hall.getInstance().player.get_use_item_num() / config.goal;
  5385. this.Des.string = Hall.getInstance().player.get_use_item_num() + "/" + config.goal;
  5386. break;
  5387. //洗牌 合成
  5388. case 2:
  5389. this.progressBar.progress = Hall.getInstance().player.get_combine_num() / config.goal;
  5390. this.Des.string = Hall.getInstance().player.get_combine_num() + "/" + config.goal;
  5391. break;
  5392. //清空 登陆
  5393. case 3:
  5394. this.progressBar.progress = Hall.getInstance().player.get_login_num() / config.goal;
  5395. this.Des.string = Hall.getInstance().player.get_login_num() + "/" + config.goal;
  5396. break;
  5397. //铜币 过关
  5398. case 4:
  5399. this.progressBar.progress = Hall.getInstance().player.get_pass_level() / config.goal;
  5400. this.Des.string = Hall.getInstance().player.get_pass_level() + "/" + config.goal;
  5401. break;
  5402. //时间 广告
  5403. case 5:
  5404. this.progressBar.progress = Hall.getInstance().player.get_watch_ad_num() / config.goal;
  5405. this.Des.string = Hall.getInstance().player.get_watch_ad_num() + "/" + config.goal;
  5406. break;
  5407. }
  5408. if (this.progressBar.progress == 1) {
  5409. if (this.state) {
  5410. this.Des.string = '已领取';
  5411. this.Get.interactable = false;
  5412. this.Get_Bg.spriteFrame = this.Get_Bgs[0];
  5413. } else {
  5414. this.Des.string = '可领取';
  5415. this.Get.interactable = true;
  5416. this.Get_Bg.spriteFrame = this.Get_Bgs[1];
  5417. }
  5418. } else {
  5419. this.Get.interactable = false;
  5420. this.Get_Bg.spriteFrame = this.Get_Bgs[0];
  5421. }
  5422. }
  5423. //添加东西
  5424. ;
  5425. _proto.add_Item = function add_Item() {
  5426. if (this.progressBar.progress == 1 && this.state == false) {
  5427. if (this.config.type != 4) {
  5428. Hall.getInstance().player.add_item(this.config.type, 1);
  5429. Toast.makeText(gui.getLayerNode(5), '获得道具:' + this.config.name).show();
  5430. } else if (this.config.type == 4) {
  5431. Hall.getInstance().player.set_coin(Hall.getInstance().player.get_coin() + 100);
  5432. Toast.makeText(gui.getLayerNode(5), '获得铜币:X' + this.config.num).show();
  5433. }
  5434. this.state = true;
  5435. this.Des.string = '已领取';
  5436. this.Get_Bg.spriteFrame = this.Get_Bgs[0];
  5437. this.Get.interactable = false;
  5438. gui.get(UI_Task).update_task_state(true, this.index);
  5439. }
  5440. };
  5441. return UI_Task_Item;
  5442. }(Component), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "progressBar", [_dec2], {
  5443. configurable: true,
  5444. enumerable: true,
  5445. writable: true,
  5446. initializer: null
  5447. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Des", [_dec3], {
  5448. configurable: true,
  5449. enumerable: true,
  5450. writable: true,
  5451. initializer: null
  5452. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Get", [_dec4], {
  5453. configurable: true,
  5454. enumerable: true,
  5455. writable: true,
  5456. initializer: null
  5457. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Get_Bg", [_dec5], {
  5458. configurable: true,
  5459. enumerable: true,
  5460. writable: true,
  5461. initializer: null
  5462. }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Get_Bgs", [_dec6], {
  5463. configurable: true,
  5464. enumerable: true,
  5465. writable: true,
  5466. initializer: function initializer() {
  5467. return [];
  5468. }
  5469. }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "index", [property], {
  5470. configurable: true,
  5471. enumerable: true,
  5472. writable: true,
  5473. initializer: null
  5474. })), _class2)) || _class));
  5475. cclegacy._RF.pop();
  5476. }
  5477. };
  5478. });
  5479. System.register("chunks:///_virtual/UI_Task.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui_base.ts', './Layout_Task.ts', './ui.ts', './ModuleDef.ts', './Hall.ts', './UI_Main.ts', './table_task.ts'], function (exports) {
  5480. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, ui_base, Layout_Task, GameUILayers, gui, ModuleDef, Hall, ani_ui, table_task;
  5481. return {
  5482. setters: [function (module) {
  5483. _inheritsLoose = module.inheritsLoose;
  5484. _asyncToGenerator = module.asyncToGenerator;
  5485. _regeneratorRuntime = module.regeneratorRuntime;
  5486. }, function (module) {
  5487. cclegacy = module.cclegacy;
  5488. _decorator = module._decorator;
  5489. }, function (module) {
  5490. ui_base = module.default;
  5491. }, function (module) {
  5492. Layout_Task = module.Layout_Task;
  5493. }, function (module) {
  5494. GameUILayers = module.GameUILayers;
  5495. gui = module.gui;
  5496. }, function (module) {
  5497. ModuleDef = module.ModuleDef;
  5498. }, function (module) {
  5499. Hall = module.Hall;
  5500. }, function (module) {
  5501. ani_ui = module.ani_ui;
  5502. }, function (module) {
  5503. table_task = module.table_task;
  5504. }],
  5505. execute: function () {
  5506. var _dec, _class;
  5507. cclegacy._RF.push({}, "9d50dhNkDpIm6jYTQWhnA9s", "UI_Task", undefined);
  5508. var ccclass = _decorator.ccclass,
  5509. property = _decorator.property;
  5510. var UI_Task = exports('UI_Task', (_dec = ccclass('UI_Task'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  5511. _inheritsLoose(UI_Task, _ui_base);
  5512. function UI_Task() {
  5513. var _this;
  5514. _this = _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Task/Task', GameUILayers.HUD, Layout_Task) || this;
  5515. _this.task_state = void 0;
  5516. _this.config = void 0;
  5517. return _this;
  5518. }
  5519. var _proto = UI_Task.prototype;
  5520. _proto.onCreated = /*#__PURE__*/function () {
  5521. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  5522. var layout, i;
  5523. return _regeneratorRuntime().wrap(function _callee$(_context) {
  5524. while (1) switch (_context.prev = _context.next) {
  5525. case 0:
  5526. this.config = table_task.getList();
  5527. layout = this.getLayout();
  5528. ani_ui(layout.Close_Btn.node.parent);
  5529. this.onButtonEvent(layout.Close_Btn, function () {
  5530. gui.close(UI_Task);
  5531. });
  5532. this.task_state = Hall.getInstance().player.get_task_state();
  5533. console.log("任务数组:" + this.task_state);
  5534. for (i = 0; i < layout.Task_Items.length; i++) {
  5535. layout.Task_Items[i].show(this.task_state[i], this.config[i]);
  5536. }
  5537. case 7:
  5538. case "end":
  5539. return _context.stop();
  5540. }
  5541. }, _callee, this);
  5542. }));
  5543. function onCreated() {
  5544. return _onCreated.apply(this, arguments);
  5545. }
  5546. return onCreated;
  5547. }() //更新task_state并保存
  5548. ;
  5549. _proto.update_task_state = /*#__PURE__*/
  5550. function () {
  5551. var _update_task_state = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(flag, target) {
  5552. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  5553. while (1) switch (_context2.prev = _context2.next) {
  5554. case 0:
  5555. this.task_state[target] = flag;
  5556. Hall.getInstance().player.set_task_state(this.task_state);
  5557. Hall.getInstance().player.setDirty();
  5558. case 3:
  5559. case "end":
  5560. return _context2.stop();
  5561. }
  5562. }, _callee2, this);
  5563. }));
  5564. function update_task_state(_x, _x2) {
  5565. return _update_task_state.apply(this, arguments);
  5566. }
  5567. return update_task_state;
  5568. }();
  5569. return UI_Task;
  5570. }(ui_base)) || _class));
  5571. cclegacy._RF.pop();
  5572. }
  5573. };
  5574. });
  5575. System.register("chunks:///_virtual/UI_TimesOver.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui_base.ts', './ui.ts', './ModuleDef.ts', './Layout_TimesOver.ts', './UI_Fail.ts', './Hall.ts', './UI_Main.ts'], function (exports) {
  5576. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, ui_base, GameUILayers, gui, ModuleDef, Layout_TimesOver, UI_Fail, Hall, ani_ui, UI_Main;
  5577. return {
  5578. setters: [function (module) {
  5579. _inheritsLoose = module.inheritsLoose;
  5580. _asyncToGenerator = module.asyncToGenerator;
  5581. _regeneratorRuntime = module.regeneratorRuntime;
  5582. }, function (module) {
  5583. cclegacy = module.cclegacy;
  5584. _decorator = module._decorator;
  5585. }, function (module) {
  5586. ui_base = module.default;
  5587. }, function (module) {
  5588. GameUILayers = module.GameUILayers;
  5589. gui = module.gui;
  5590. }, function (module) {
  5591. ModuleDef = module.ModuleDef;
  5592. }, function (module) {
  5593. Layout_TimesOver = module.Layout_TimesOver;
  5594. }, function (module) {
  5595. UI_Fail = module.UI_Fail;
  5596. }, function (module) {
  5597. Hall = module.Hall;
  5598. }, function (module) {
  5599. ani_ui = module.ani_ui;
  5600. UI_Main = module.UI_Main;
  5601. }],
  5602. execute: function () {
  5603. var _dec, _class;
  5604. cclegacy._RF.push({}, "93f49g+PURGyJ0pLDMhVj8P", "UI_TimesOver", undefined);
  5605. var ccclass = _decorator.ccclass,
  5606. property = _decorator.property;
  5607. var UI_TimesOver = exports('UI_TimesOver', (_dec = ccclass('UI_TimesOver'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  5608. _inheritsLoose(UI_TimesOver, _ui_base);
  5609. function UI_TimesOver() {
  5610. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_TimesOver/TimesOver', GameUILayers.HUD, Layout_TimesOver) || this;
  5611. }
  5612. var _proto = UI_TimesOver.prototype;
  5613. _proto.onCreated = /*#__PURE__*/function () {
  5614. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
  5615. var layout, num;
  5616. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  5617. while (1) switch (_context2.prev = _context2.next) {
  5618. case 0:
  5619. layout = this.getLayout();
  5620. ani_ui(layout.Close_Btn.node.parent);
  5621. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.pause);
  5622. num = Hall.getInstance().player.get_item(5);
  5623. if (num > 0) {
  5624. layout.AddTime_Ad.node.active = false;
  5625. layout.RedPoint_num.node.parent.active = true;
  5626. layout.RedPoint_num.string = num.toString();
  5627. } else {
  5628. layout.AddTime_Ad.node.active = true;
  5629. layout.RedPoint_num.node.parent.active = false;
  5630. }
  5631. //已经消除方块/总方块
  5632. layout.progressBar.progress = (gui.get(UI_Main).getLayout().Container.count - gui.get(UI_Main).getLayout().Container.idioms.length) / gui.get(UI_Main).getLayout().Container.count;
  5633. console.log(gui.get(UI_Main).getLayout().Container.count, gui.get(UI_Main).getLayout().Container.idioms.length);
  5634. layout.progressBar_Percent.string = Math.floor(layout.progressBar.progress * 100) + '%';
  5635. this.onButtonEvent(layout.Close_Btn, function () {
  5636. gui.close(UI_TimesOver);
  5637. gui.show(UI_Fail);
  5638. });
  5639. this.onButtonEvent(layout.AddTime, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
  5640. var ret;
  5641. return _regeneratorRuntime().wrap(function _callee$(_context) {
  5642. while (1) switch (_context.prev = _context.next) {
  5643. case 0:
  5644. if (!(num <= 0)) {
  5645. _context.next = 7;
  5646. break;
  5647. }
  5648. _context.next = 3;
  5649. return chsdk.playRewardAd('获得道具5');
  5650. case 3:
  5651. ret = _context.sent;
  5652. if (ret) {
  5653. gui.close(UI_TimesOver);
  5654. //增加时间
  5655. Hall.getInstance().player.add_item(5, 1);
  5656. Hall.getInstance().player.use_item(5);
  5657. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.resume);
  5658. }
  5659. _context.next = 10;
  5660. break;
  5661. case 7:
  5662. gui.close(UI_TimesOver);
  5663. Hall.getInstance().player.use_item(5);
  5664. //增加时间
  5665. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.resume);
  5666. case 10:
  5667. case "end":
  5668. return _context.stop();
  5669. }
  5670. }, _callee);
  5671. })));
  5672. case 10:
  5673. case "end":
  5674. return _context2.stop();
  5675. }
  5676. }, _callee2, this);
  5677. }));
  5678. function onCreated() {
  5679. return _onCreated.apply(this, arguments);
  5680. }
  5681. return onCreated;
  5682. }();
  5683. return UI_TimesOver;
  5684. }(ui_base)) || _class));
  5685. cclegacy._RF.pop();
  5686. }
  5687. };
  5688. });
  5689. System.register("chunks:///_virtual/UI_Win.ts", ['./rollupPluginModLoBabelHelpers.js', 'cc', './ui.ts', './ui_base.ts', './ResUtil.ts', './ModuleDef.ts', './SceneDef.ts', './UI_Hall.ts', './UI_Main.ts', './Layout_Win.ts', './Container_Manager.ts', './Hall.ts'], function (exports) {
  5690. var _inheritsLoose, _asyncToGenerator, _regeneratorRuntime, cclegacy, _decorator, find, Sprite, GameUILayers, gui, ui_base, ResUtil, ModuleDef, SceneDef, UI_Hall, ani_ui, UI_Main, Layout_Win, Container_Manager, Hall;
  5691. return {
  5692. setters: [function (module) {
  5693. _inheritsLoose = module.inheritsLoose;
  5694. _asyncToGenerator = module.asyncToGenerator;
  5695. _regeneratorRuntime = module.regeneratorRuntime;
  5696. }, function (module) {
  5697. cclegacy = module.cclegacy;
  5698. _decorator = module._decorator;
  5699. find = module.find;
  5700. Sprite = module.Sprite;
  5701. }, function (module) {
  5702. GameUILayers = module.GameUILayers;
  5703. gui = module.gui;
  5704. }, function (module) {
  5705. ui_base = module.default;
  5706. }, function (module) {
  5707. ResUtil = module.ResUtil;
  5708. }, function (module) {
  5709. ModuleDef = module.ModuleDef;
  5710. }, function (module) {
  5711. SceneDef = module.SceneDef;
  5712. }, function (module) {
  5713. UI_Hall = module.UI_Hall;
  5714. }, function (module) {
  5715. ani_ui = module.ani_ui;
  5716. UI_Main = module.UI_Main;
  5717. }, function (module) {
  5718. Layout_Win = module.Layout_Win;
  5719. }, function (module) {
  5720. Container_Manager = module.Container_Manager;
  5721. }, function (module) {
  5722. Hall = module.Hall;
  5723. }],
  5724. execute: function () {
  5725. var _dec, _class;
  5726. cclegacy._RF.push({}, "83142byQEVIGK9m///c1wq2", "UI_Win", undefined);
  5727. var ccclass = _decorator.ccclass,
  5728. property = _decorator.property;
  5729. var UI_Win = exports('UI_Win', (_dec = ccclass('UI_Win'), _dec(_class = /*#__PURE__*/function (_ui_base) {
  5730. _inheritsLoose(UI_Win, _ui_base);
  5731. function UI_Win() {
  5732. return _ui_base.call(this, ModuleDef.GAME, 'ui/UI_Win/Win', GameUILayers.HUD, Layout_Win) || this;
  5733. }
  5734. var _proto = UI_Win.prototype;
  5735. _proto.onCreated = /*#__PURE__*/function () {
  5736. var _onCreated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
  5737. var layout;
  5738. return _regeneratorRuntime().wrap(function _callee4$(_context4) {
  5739. while (1) switch (_context4.prev = _context4.next) {
  5740. case 0:
  5741. layout = this.getLayout();
  5742. ani_ui(layout.Three_Btn.node.parent.parent);
  5743. layout.Container = find('Container').getComponent(Container_Manager);
  5744. Hall.getInstance().player.set_coin(Hall.getInstance().player.get_coin() + 50);
  5745. this.onButtonEvent(layout.Three_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(button) {
  5746. var ret;
  5747. return _regeneratorRuntime().wrap(function _callee$(_context) {
  5748. while (1) switch (_context.prev = _context.next) {
  5749. case 0:
  5750. _context.next = 2;
  5751. return chsdk.playRewardAd('三倍获取铜币');
  5752. case 2:
  5753. ret = _context.sent;
  5754. if (ret) {
  5755. Hall.getInstance().player.set_coin(Hall.getInstance().player.get_coin() + 150 - 50);
  5756. //按钮置灰 点击无效
  5757. layout.Three_Btn.interactable = false;
  5758. layout.Three_Btn.node.getComponent(Sprite).grayscale = true;
  5759. layout.Txt.string = '铜币+150';
  5760. }
  5761. case 4:
  5762. case "end":
  5763. return _context.stop();
  5764. }
  5765. }, _callee);
  5766. })), this);
  5767. this.onButtonEvent(layout.Next_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(button) {
  5768. return _regeneratorRuntime().wrap(function _callee2$(_context2) {
  5769. while (1) switch (_context2.prev = _context2.next) {
  5770. case 0:
  5771. //下一关
  5772. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.next_level);
  5773. gui.close(UI_Win);
  5774. layout.Container.level_idioms();
  5775. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.update_ui_idioms);
  5776. gui.get(UI_Main).evt.emit(gui.get(UI_Main).evt.key.update_remain);
  5777. //关卡难度
  5778. //重新选词
  5779. //刷新UI_Idioms
  5780. //计时刷新,剩余方块数量刷新
  5781. case 5:
  5782. case "end":
  5783. return _context2.stop();
  5784. }
  5785. }, _callee2);
  5786. })), this);
  5787. this.onButtonEvent(layout.ReturnHall_Btn, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(button) {
  5788. return _regeneratorRuntime().wrap(function _callee3$(_context3) {
  5789. while (1) switch (_context3.prev = _context3.next) {
  5790. case 0:
  5791. _context3.next = 2;
  5792. return gui.closeAll();
  5793. case 2:
  5794. gui.show(UI_Hall);
  5795. ResUtil.loadScene(SceneDef.Hall, ModuleDef.GAME, true);
  5796. case 4:
  5797. case "end":
  5798. return _context3.stop();
  5799. }
  5800. }, _callee3);
  5801. })), this);
  5802. case 7:
  5803. case "end":
  5804. return _context4.stop();
  5805. }
  5806. }, _callee4, this);
  5807. }));
  5808. function onCreated() {
  5809. return _onCreated.apply(this, arguments);
  5810. }
  5811. return onCreated;
  5812. }();
  5813. return UI_Win;
  5814. }(ui_base)) || _class));
  5815. cclegacy._RF.pop();
  5816. }
  5817. };
  5818. });
  5819. (function(r) {
  5820. r('virtual:///prerequisite-imports/module_game', 'chunks:///_virtual/module_game');
  5821. })(function(mid, cid) {
  5822. System.register(mid, [cid], function (_export, _context) {
  5823. return {
  5824. setters: [function(_m) {
  5825. var _exportObj = {};
  5826. for (var _key in _m) {
  5827. if (_key !== "default" && _key !== "__esModule") _exportObj[_key] = _m[_key];
  5828. }
  5829. _export(_exportObj);
  5830. }],
  5831. execute: function () { }
  5832. };
  5833. });
  5834. });