game-min.js 616 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466
  1. var egret, __extends, testDeviceType, testRuntimeType, __global, egret_sin_map, egret_cos_map, i, egret_html5_localStorage, egret_h5_graphics, egret_webgl_graphics, RES, Fw, GameData, Drag, L_StateButton, glodAnimation, levellistbar, Game, GameBGView, Methods, getAd, getEnd, overPlan, stopPlan, topbar, v_selectLevel, v_start, winPlan, help, Container, settings, L_ScreenRotating, UI, loading, Main, level_1, level_10, level_11, level_12, level_13, level_14, level_15, level_16, level_17, level_18, level_19, level_2, level_20, level_21, level_22, level_23, level_24, level_25, level_26, level_27, level_28, level_29, level_3, level_30, level_4, level_5, level_6, level_7, level_8, level_9, outlevel;
  2. ! function(a) {
  3. function b(b) {
  4. var c, d, e, f;
  5. for (c = [], d = 1; d < arguments.length; d++) c[d - 1] = arguments[d];
  6. if (d = a.egret_string_code[b])
  7. for (e = c.length, f = 0; e > f; f++) d = d.replace("{" + f + "}", c[f]);
  8. return d
  9. }
  10. var c = function() {
  11. function c() {}
  12. return c.fatal = function(b, c) {
  13. throw void 0 === c && (c = null), a.Logger.traceToConsole("Fatal", b, c), Error(a.Logger.getTraceCode("Fatal", b, c))
  14. }, c.info = function(b, c) {
  15. void 0 === c && (c = null), a.Logger.traceToConsole("Info", b, c)
  16. }, c.warning = function(b, c) {
  17. void 0 === c && (c = null), a.Logger.traceToConsole("Warning", b, c)
  18. }, c.fatalWithErrorId = function(a) {
  19. for (var d = [], e = 1; e < arguments.length; e++) d[e - 1] = arguments[e];
  20. d.unshift(a), (d = b.apply(null, d)) ? c.fatal(d) : c.warning(b(-1, a))
  21. }, c.infoWithErrorId = function(a) {
  22. for (var d = [], e = 1; e < arguments.length; e++) d[e - 1] = arguments[e];
  23. d.unshift(a), (d = b.apply(null, d)) ? c.info(d) : c.warning(b(-1, a))
  24. }, c.warningWithErrorId = function(a) {
  25. for (var d = [], e = 1; e < arguments.length; e++) d[e - 1] = arguments[e];
  26. d.unshift(a), c.warning((d = b.apply(null, d)) ? d : b(-1, a))
  27. }, c.traceToConsole = function(b, c, d) {
  28. console.log(a.Logger.getTraceCode(b, c, d))
  29. }, c.getTraceCode = function(a, b, c) {
  30. return "[" + a + "]" + b + (null == c ? "" : ":" + c)
  31. }, c
  32. }();
  33. a.Logger = c, c.prototype.__class__ = "egret.Logger", a.egret_string_code = {}, a.egret_string_code[-1] = "不存在的stringId:{0}", a.egret_string_code[1e3] = "Browser.isMobile接口参数已经变更,请尽快调整用法为 egret.MainContext.deviceType == egret.MainContext.DEVICE_MOBILE", a.egret_string_code[1001] = "该方法目前不应传入 resolutionPolicy 参数,请在 docs/1.0_Final_ReleaseNote中查看如何升级", a.egret_string_code[1002] = "egret.Ticker是框架内部使用的单例,不允许在外部实例化,计时器请使用egret.Timer类!", a.egret_string_code[1003] = "Ticker#setTimeout方法即将废弃,请使用egret.setTimeout", a.egret_string_code[1004] = "ExternalInterface调用了js没有注册的方法: {0}", a.egret_string_code[1005] = "设置了已经存在的blendMode: {0}", a.egret_string_code[1006] = "child不在当前容器内", a.egret_string_code[1007] = "提供的索引超出范围", a.egret_string_code[1008] = "child未被addChild到该parent", a.egret_string_code[1009] = "设置了已经存在的适配模式:{0}", a.egret_string_code[1010] = "addEventListener侦听函数不能为空", a.egret_string_code[1011] = 'BitmapText找不到文字所对应的纹理:"{0}"', a.egret_string_code[1012] = "egret.BitmapTextSpriteSheet已废弃,请使用egret.BitmapFont代替。", a.egret_string_code[1013] = "TextField.setFocus 没有实现", a.egret_string_code[1014] = "Ease不能被实例化", a.egret_string_code[1015] = "xml not found!", a.egret_string_code[1016] = "{0}已经废弃", a.egret_string_code[1017] = "JSON文件格式不正确: {0}\ndata: {1}", a.egret_string_code[1018] = "egret_html5_localStorage.setItem保存失败,key={0}&value={1}", a.egret_string_code[1019] = "网络异常:{0}", a.egret_string_code[1020] = "无法初始化着色器", a.egret_string_code[1021] = "当前浏览器不支持webgl", a.egret_string_code[1022] = "{0} ArgumentError", a.egret_string_code[1023] = "此方法在ScrollView内不可用!", a.egret_string_code[1024] = "使用了尚未实现的ScaleMode", a.egret_string_code[1025] = "遇到文件尾", a.egret_string_code[1026] = "EncodingError! The code point {0} could not be encoded.", a.egret_string_code[1027] = "DecodingError", a.egret_string_code[1028] = "调用了未配置的注入规则:{0}。 请先在项目初始化里配置指定的注入规则,再调用对应单例。", a.egret_string_code[1029] = "Function.prototype.bind - what is trying to be bound is not callable", a.egret_string_code[1030] = "该API已废弃", a.egret_string_code[2e3] = "RES.createGroup()传入了配置中不存在的键值: {0}", a.egret_string_code[2001] = 'RES加载了不存在或空的资源组:"{0}"', a.egret_string_code[3e3] = "主题配置文件加载失败: {0}", a.egret_string_code[3001] = "找不到主题中所配置的皮肤类名: {0}", a.egret_string_code[3002] = '索引:"{0}"超出集合元素索引范围', a.egret_string_code[3003] = "在此组件中不可用,若此组件为容器类,请使用", a.egret_string_code[3004] = "addChild(){0}addElement()代替", a.egret_string_code[3005] = "addChildAt(){0}addElementAt()代替", a.egret_string_code[3006] = "removeChild(){0}removeElement()代替", a.egret_string_code[3007] = "removeChildAt(){0}removeElementAt()代替", a.egret_string_code[3008] = "setChildIndex(){0}setElementIndex()代替", a.egret_string_code[3009] = "swapChildren(){0}swapElements()代替", a.egret_string_code[3010] = "swapChildrenAt(){0}swapElementsAt()代替", a.egret_string_code[3011] = '索引:"{0}"超出可视元素索引范围', a.egret_string_code[3012] = "此方法在Scroller组件内不可用!", a.egret_string_code[3013] = "UIStage是GUI根容器,只能有一个此实例在显示列表中!", a.egret_string_code[4e3] = "An Bone cannot be added as a child to itself or one of its children (or children's children, etc.)", a.egret_string_code[4001] = "Abstract class can not be instantiated!", a.egret_string_code[4002] = "Unnamed data!", a.egret_string_code[4003] = "Nonsupport version!", a.egret_string_code[3100] = "当前浏览器不支持WebSocket", a.egret_string_code[3101] = "请先连接WebSocket", a.egret_string_code[3102] = "请先设置type为二进制类型", a.getString = b
  34. }(egret || (egret = {})),
  35. function(a) {
  36. var b = function() {
  37. function a() {
  38. this._hashCode = a.hashCount++
  39. }
  40. return Object.defineProperty(a.prototype, "hashCode", {
  41. get: function() {
  42. return this._hashCode
  43. },
  44. enumerable: !0,
  45. configurable: !0
  46. }), a.hashCount = 1, a
  47. }();
  48. a.HashObject = b, b.prototype.__class__ = "egret.HashObject"
  49. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  50. function c() {
  51. this.constructor = a
  52. }
  53. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  54. c.prototype = b.prototype, a.prototype = new c
  55. }, ! function(a) {
  56. var b = function(a) {
  57. function b(b) {
  58. void 0 === b && (b = 300), a.call(this), this.objectPool = [], this._length = 0, 1 > b && (b = 1), this.autoDisposeTime = b, this.frameCount = 0
  59. }
  60. return __extends(b, a), b.prototype._checkFrame = function() {
  61. this.frameCount--, 0 >= this.frameCount && this.dispose()
  62. }, Object.defineProperty(b.prototype, "length", {
  63. get: function() {
  64. return this._length
  65. },
  66. enumerable: !0,
  67. configurable: !0
  68. }), b.prototype.push = function(a) {
  69. var c = this.objectPool; - 1 == c.indexOf(a) && (c.push(a), a.__recycle && a.__recycle(), this._length++, 0 == this.frameCount && (this.frameCount = this.autoDisposeTime, b._callBackList.push(this)))
  70. }, b.prototype.pop = function() {
  71. return 0 == this._length ? null : (this._length--, this.objectPool.pop())
  72. }, b.prototype.dispose = function() {
  73. 0 < this._length && (this.objectPool = [], this._length = 0), this.frameCount = 0;
  74. var a = b._callBackList,
  75. c = a.indexOf(this); - 1 != c && a.splice(c, 1)
  76. }, b._callBackList = [], b
  77. }(a.HashObject);
  78. a.Recycler = b, b.prototype.__class__ = "egret.Recycler"
  79. }(egret || (egret = {})),
  80. function(a) {
  81. a.__START_TIME, a.getTimer = function() {
  82. return Date.now() - a.__START_TIME
  83. }
  84. }(egret || (egret = {})),
  85. function(a) {
  86. a.__callLaterFunctionList = [], a.__callLaterThisList = [], a.__callLaterArgsList = [], a.callLater = function(b, c) {
  87. for (var d = [], e = 2; e < arguments.length; e++) d[e - 2] = arguments[e];
  88. a.__callLaterFunctionList.push(b), a.__callLaterThisList.push(c), a.__callLaterArgsList.push(d)
  89. }, a.__callAsyncFunctionList = [], a.__callAsyncThisList = [], a.__callAsyncArgsList = [], a.__callAsync = function(b, c) {
  90. for (var d = [], e = 2; e < arguments.length; e++) d[e - 2] = arguments[e];
  91. a.__callAsyncFunctionList.push(b), a.__callAsyncThisList.push(c), a.__callAsyncArgsList.push(d)
  92. }
  93. }(egret || (egret = {})),
  94. function(a) {
  95. var b = function() {
  96. function b() {}
  97. return b.prototype.call = function(a) {
  98. this.callback && this.callback.call(this.thisObject, a)
  99. }, b.prototype.dispose = function() {
  100. this.thisObject = this.callback = null, b.__freeList.push(this)
  101. }, b.push = function(c, d) {
  102. var e;
  103. e = b.__freeList.length ? b.__freeList.pop() : new a.RenderCommand, e.callback = c, e.thisObject = d, a.MainContext.__DRAW_COMMAND_LIST.push(e)
  104. }, b.__freeList = [], b
  105. }();
  106. a.RenderCommand = b, b.prototype.__class__ = "egret.RenderCommand"
  107. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  108. function c() {
  109. this.constructor = a
  110. }
  111. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  112. c.prototype = b.prototype, a.prototype = new c
  113. },
  114. function(a) {
  115. var b = function(b) {
  116. function c(a, c, d) {
  117. void 0 === c && (c = !1), void 0 === d && (d = !1), b.call(this), this.data = null, this._type = "", this._cancelable = this._bubbles = !1, this._eventPhase = 2, this._target = this._currentTarget = null, this._isPropagationImmediateStopped = this._isPropagationStopped = this._isDefaultPrevented = !1, this.isNew = !0, this._type = a, this._bubbles = c, this._cancelable = d
  118. }
  119. return __extends(c, b), Object.defineProperty(c.prototype, "type", {
  120. get: function() {
  121. return this._type
  122. },
  123. enumerable: !0,
  124. configurable: !0
  125. }), Object.defineProperty(c.prototype, "bubbles", {
  126. get: function() {
  127. return this._bubbles
  128. },
  129. enumerable: !0,
  130. configurable: !0
  131. }), Object.defineProperty(c.prototype, "cancelable", {
  132. get: function() {
  133. return this._cancelable
  134. },
  135. enumerable: !0,
  136. configurable: !0
  137. }), Object.defineProperty(c.prototype, "eventPhase", {
  138. get: function() {
  139. return this._eventPhase
  140. },
  141. enumerable: !0,
  142. configurable: !0
  143. }), Object.defineProperty(c.prototype, "currentTarget", {
  144. get: function() {
  145. return this._currentTarget
  146. },
  147. enumerable: !0,
  148. configurable: !0
  149. }), Object.defineProperty(c.prototype, "target", {
  150. get: function() {
  151. return this._target
  152. },
  153. enumerable: !0,
  154. configurable: !0
  155. }), c.prototype.isDefaultPrevented = function() {
  156. return this._isDefaultPrevented
  157. }, c.prototype.preventDefault = function() {
  158. this._cancelable && (this._isDefaultPrevented = !0)
  159. }, c.prototype.stopPropagation = function() {
  160. this._bubbles && (this._isPropagationStopped = !0)
  161. }, c.prototype.stopImmediatePropagation = function() {
  162. this._bubbles && (this._isPropagationImmediateStopped = !0)
  163. }, c.prototype._reset = function() {
  164. this.isNew ? this.isNew = !1 : (this._isPropagationImmediateStopped = this._isPropagationStopped = this._isDefaultPrevented = !1, this._currentTarget = this._target = null, this._eventPhase = 2)
  165. }, c.prototype.__recycle = function() {
  166. this.data = this._target = this._currentTarget = null
  167. }, c._dispatchByTarget = function(b, c, d, e, f, g) {
  168. var h, i, j;
  169. if (void 0 === f && (f = !1), void 0 === g && (g = !1), h = b.eventRecycler, h || (h = b.eventRecycler = new a.Recycler), i = h.pop(), i ? i._type = d : i = new b(d), i._bubbles = f, i._cancelable = g, e)
  170. for (j in e) i[j] = e[j], null !== i[j] && (e[j] = null);
  171. return b = c.dispatchEvent(i), h.push(i), b
  172. }, c._getPropertyData = function(a) {
  173. var b = a._props;
  174. return b || (b = a._props = {}), b
  175. }, c.dispatchEvent = function(a, b, d, e) {
  176. void 0 === d && (d = !1);
  177. var f = c._getPropertyData(c);
  178. e && (f.data = e), c._dispatchByTarget(c, a, b, f, d)
  179. }, c.ADDED_TO_STAGE = "addedToStage", c.REMOVED_FROM_STAGE = "removedFromStage", c.ADDED = "added", c.REMOVED = "removed", c.COMPLETE = "complete", c.LOOP_COMPLETE = "loopcomplete", c.ENTER_FRAME = "enterFrame", c.RENDER = "render", c.FINISH_RENDER = "finishRender", c.FINISH_UPDATE_TRANSFORM = "finishUpdateTransform", c.LEAVE_STAGE = "leaveStage", c.RESIZE = "resize", c.CHANGE = "change", c.ACTIVATE = "activate", c.DEACTIVATE = "deactivate", c.CLOSE = "close", c.CONNECT = "connect", c
  180. }(a.HashObject);
  181. a.Event = b, b.prototype.__class__ = "egret.Event"
  182. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  183. function c() {
  184. this.constructor = a
  185. }
  186. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  187. c.prototype = b.prototype, a.prototype = new c
  188. },
  189. function(a) {
  190. var b = function(a) {
  191. function b(b, c, d) {
  192. void 0 === c && (c = !1), void 0 === d && (d = !1), a.call(this, b, c, d), this._status = 0
  193. }
  194. return __extends(b, a), Object.defineProperty(b.prototype, "status", {
  195. get: function() {
  196. return this._status
  197. },
  198. enumerable: !0,
  199. configurable: !0
  200. }), b.dispatchHTTPStatusEvent = function(a, c) {
  201. null == b.httpStatusEvent && (b.httpStatusEvent = new b(b.HTTP_STATUS)), b.httpStatusEvent._status = c, a.dispatchEvent(b.httpStatusEvent)
  202. }, b.HTTP_STATUS = "httpStatus", b.httpStatusEvent = null, b
  203. }(a.Event);
  204. a.HTTPStatusEvent = b, b.prototype.__class__ = "egret.HTTPStatusEvent"
  205. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  206. function c() {
  207. this.constructor = a
  208. }
  209. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  210. c.prototype = b.prototype, a.prototype = new c
  211. },
  212. function(a) {
  213. var b = function(b) {
  214. function c(a, c, d) {
  215. void 0 === c && (c = !1), void 0 === d && (d = !1), b.call(this, a, c, d)
  216. }
  217. return __extends(c, b), c.dispatchIOErrorEvent = function(b) {
  218. a.Event._dispatchByTarget(c, b, c.IO_ERROR)
  219. }, c.IO_ERROR = "ioError", c
  220. }(a.Event);
  221. a.IOErrorEvent = b, b.prototype.__class__ = "egret.IOErrorEvent"
  222. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  223. function c() {
  224. this.constructor = a
  225. }
  226. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  227. c.prototype = b.prototype, a.prototype = new c
  228. },
  229. function(a) {
  230. var b = function(b) {
  231. function c(a, c, d, e, f, g, h, i, j, k) {
  232. void 0 === c && (c = !0), void 0 === d && (d = !0), void 0 === e && (e = 0), void 0 === f && (f = 0), void 0 === g && (g = 0), void 0 === h && (h = !1), void 0 === i && (i = !1), void 0 === k && (k = !1), b.call(this, a, c, d), this._stageY = this._stageX = 0, this.touchPointID = 0 / 0, this.touchDown = this.altKey = this.shiftKey = this.ctrlKey = !1, this.touchPointID = e, this._stageX = f, this._stageY = g, this.ctrlKey = h, this.altKey = i, this.touchDown = k
  233. }
  234. return __extends(c, b), Object.defineProperty(c.prototype, "stageX", {
  235. get: function() {
  236. return this._stageX
  237. },
  238. enumerable: !0,
  239. configurable: !0
  240. }), Object.defineProperty(c.prototype, "stageY", {
  241. get: function() {
  242. return this._stageY
  243. },
  244. enumerable: !0,
  245. configurable: !0
  246. }), Object.defineProperty(c.prototype, "localX", {
  247. get: function() {
  248. return this._currentTarget.globalToLocal(this._stageX, this._stageY, a.Point.identity).x
  249. },
  250. enumerable: !0,
  251. configurable: !0
  252. }), Object.defineProperty(c.prototype, "localY", {
  253. get: function() {
  254. return this._currentTarget.globalToLocal(this._stageX, this._stageY, a.Point.identity).y
  255. },
  256. enumerable: !0,
  257. configurable: !0
  258. }), c.dispatchTouchEvent = function(b, d, e, f, g, h, i, j, k) {
  259. void 0 === e && (e = 0), void 0 === f && (f = 0), void 0 === g && (g = 0), void 0 === h && (h = !1), void 0 === i && (i = !1), void 0 === j && (j = !1), void 0 === k && (k = !1);
  260. var l = a.Event._getPropertyData(c);
  261. l.touchPointID = e, l._stageX = f, l._stageY = g, l.ctrlKey = h, l.altKey = i, l.shiftKey = j, l.touchDown = k, a.Event._dispatchByTarget(c, b, d, l, !0, !0)
  262. }, c.TOUCH_TAP = "touchTap", c.TOUCH_MOVE = "touchMove", c.TOUCH_BEGIN = "touchBegin", c.TOUCH_END = "touchEnd", c.TOUCH_RELEASE_OUTSIDE = "touchReleaseOutside", c.TOUCH_ROLL_OUT = "touchRollOut", c.TOUCH_ROLL_OVER = "touchRollOver", c.TOUCH_OUT = "touchOut", c.TOUCH_OVER = "touchOver", c
  263. }(a.Event);
  264. a.TouchEvent = b, b.prototype.__class__ = "egret.TouchEvent"
  265. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  266. function c() {
  267. this.constructor = a
  268. }
  269. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  270. c.prototype = b.prototype, a.prototype = new c
  271. },
  272. function(a) {
  273. var b = function(b) {
  274. function c(a, c, d) {
  275. void 0 === c && (c = !1), void 0 === d && (d = !1), b.call(this, a, c, d)
  276. }
  277. return __extends(c, b), c.dispatchTimerEvent = function(b, d) {
  278. a.Event._dispatchByTarget(c, b, d)
  279. }, c.TIMER = "timer", c.TIMER_COMPLETE = "timerComplete", c
  280. }(a.Event);
  281. a.TimerEvent = b, b.prototype.__class__ = "egret.TimerEvent"
  282. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  283. function c() {
  284. this.constructor = a
  285. }
  286. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  287. c.prototype = b.prototype, a.prototype = new c
  288. },
  289. function(a) {
  290. var b = function(b) {
  291. function c(a, c, d, e) {
  292. void 0 === c && (c = !1), void 0 === d && (d = !1), void 0 === e && (e = ""), b.call(this, a, c, d), this.text = e
  293. }
  294. return __extends(c, b), c.dispatchTextEvent = function(b, d, e) {
  295. var f = a.Event._getPropertyData(c);
  296. f.text = e, a.Event._dispatchByTarget(c, b, d, f)
  297. }, c.LINK = "link", c
  298. }(a.Event);
  299. a.TextEvent = b, b.prototype.__class__ = "egret.TextEvent"
  300. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  301. function c() {
  302. this.constructor = a
  303. }
  304. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  305. c.prototype = b.prototype, a.prototype = new c
  306. },
  307. function(a) {
  308. var b = function(b) {
  309. function c(a, c, d, e, f) {
  310. void 0 === c && (c = !1), void 0 === d && (d = !1), void 0 === e && (e = 0), void 0 === f && (f = 0), b.call(this, a, c, d), this.bytesTotal = this.bytesLoaded = 0, this.bytesLoaded = e, this.bytesTotal = f
  311. }
  312. return __extends(c, b), c.dispatchProgressEvent = function(b, d, e, f) {
  313. void 0 === e && (e = 0), void 0 === f && (f = 0), a.Event._dispatchByTarget(c, b, d, {
  314. bytesLoaded: e,
  315. bytesTotal: f
  316. })
  317. }, c.PROGRESS = "progress", c.SOCKET_DATA = "socketData", c
  318. }(a.Event);
  319. a.ProgressEvent = b, b.prototype.__class__ = "egret.ProgressEvent"
  320. }(egret || (egret = {})),
  321. function(a) {
  322. var b = function() {
  323. function a() {}
  324. return a.CAPTURING_PHASE = 1, a.AT_TARGET = 2, a.BUBBLING_PHASE = 3, a
  325. }();
  326. a.EventPhase = b, b.prototype.__class__ = "egret.EventPhase"
  327. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  328. function c() {
  329. this.constructor = a
  330. }
  331. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  332. c.prototype = b.prototype, a.prototype = new c
  333. },
  334. function(a) {
  335. var b = function(b) {
  336. function c(a) {
  337. void 0 === a && (a = null), b.call(this), this._captureEventsMap = this._eventsMap = this._eventTarget = null, this._eventTarget = a ? a : this
  338. }
  339. return __extends(c, b), c.prototype.addEventListener = function(b, c, d, e, f) {
  340. void 0 === e && (e = !1), void 0 === f && (f = 0), "undefined" == typeof e && (e = !1), "undefined" == typeof f && (f = 0), c || a.Logger.fatalWithErrorId(1010), e ? (this._captureEventsMap || (this._captureEventsMap = {}), e = this._captureEventsMap) : (this._eventsMap || (this._eventsMap = {}), e = this._eventsMap);
  341. var g = e[b];
  342. g || (g = e[b] = []), this._insertEventBin(g, c, d, f)
  343. }, c.prototype._insertEventBin = function(a, b, c, d, e) {
  344. var f, g, h, i;
  345. for (void 0 === e && (e = void 0), f = -1, g = a.length, h = 0; g > h; h++) {
  346. if (i = a[h], i.listener === b && i.thisObject === c && i.display === e) return !1; - 1 == f && i.priority < d && (f = h)
  347. }
  348. return b = {
  349. listener: b,
  350. thisObject: c,
  351. priority: d
  352. }, e && (b.display = e), -1 != f ? a.splice(f, 0, b) : a.push(b), !0
  353. }, c.prototype.removeEventListener = function(a, b, c, d) {
  354. if (void 0 === d && (d = !1), d = d ? this._captureEventsMap : this._eventsMap) {
  355. var e = d[a];
  356. e && (this._removeEventBin(e, b, c), 0 == e.length && delete d[a])
  357. }
  358. }, c.prototype._removeEventBin = function(a, b, c, d, e) {
  359. var f, g;
  360. for (void 0 === d && (d = void 0), void 0 === e && (e = 0), f = a.length; f > e; e++)
  361. if (g = a[e], g.listener === b && g.thisObject === c && g.display == d) return a.splice(e, 1), !0;
  362. return !1
  363. }, c.prototype.hasEventListener = function(a) {
  364. return this._eventsMap && this._eventsMap[a] || this._captureEventsMap && this._captureEventsMap[a]
  365. }, c.prototype.willTrigger = function(a) {
  366. return this.hasEventListener(a)
  367. }, c.prototype.dispatchEvent = function(a) {
  368. return a._reset(), a._target = this._eventTarget, a._currentTarget = this._eventTarget, this._notifyListener(a)
  369. }, c.prototype._notifyListener = function(a) {
  370. var c, d, e, b = 1 == a._eventPhase ? this._captureEventsMap : this._eventsMap;
  371. if (!b) return !0;
  372. if (b = b[a._type], !b) return !0;
  373. if (c = b.length, 0 == c) return !0;
  374. for (b = b.concat(), d = 0; c > d && (e = b[d], e.listener.call(e.thisObject, a), !a._isPropagationImmediateStopped); d++);
  375. return !a._isDefaultPrevented
  376. }, c.prototype.dispatchEventWith = function(b, c, d) {
  377. void 0 === c && (c = !1), a.Event.dispatchEvent(this, b, c, d)
  378. }, c
  379. }(a.HashObject);
  380. a.EventDispatcher = b, b.prototype.__class__ = "egret.EventDispatcher"
  381. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  382. function c() {
  383. this.constructor = a
  384. }
  385. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  386. c.prototype = b.prototype, a.prototype = new c
  387. },
  388. function(a) {
  389. var b = function(b) {
  390. function c() {
  391. b.call(this), this.stage = this.deviceContext = this.netContext = this.touchContext = this.rendererContext = null, this.reuseEvent = new a.Event("")
  392. }
  393. return __extends(c, b), c.prototype.run = function() {
  394. a.Ticker.getInstance().run(), a.Ticker.getInstance().register(this.renderLoop, this, Number.NEGATIVE_INFINITY), a.Ticker.getInstance().register(this.broadcastEnterFrame, this, Number.POSITIVE_INFINITY), this.touchContext.run(), this._profileInstance = a.Profiler.getInstance()
  395. }, c.prototype.renderLoop = function(b) {
  396. var d, e, f, g;
  397. 0 < a.__callLaterFunctionList.length && (d = a.__callLaterFunctionList, a.__callLaterFunctionList = [], e = a.__callLaterThisList, a.__callLaterThisList = [], f = a.__callLaterArgsList, a.__callLaterArgsList = []), b = this.stage, g = c.cachedEvent, g._type = a.Event.RENDER, this.dispatchEvent(g), a.Stage._invalidateRenderFlag && (this.broadcastRender(), a.Stage._invalidateRenderFlag = !1), d && this.doCallLaterList(d, e, f), 0 < a.__callAsyncFunctionList.length && this.doCallAsyncList(), d = this.rendererContext, d.onRenderStart(), d.clearScreen(), c.__DRAW_COMMAND_LIST = [], c._renderLoopPhase = "updateTransform", b._updateTransform(), c._renderLoopPhase = "draw", g._type = a.Event.FINISH_UPDATE_TRANSFORM, this.dispatchEvent(g), c.__use_new_draw ? this._draw(d) : b._draw(d), g._type = a.Event.FINISH_RENDER, this.dispatchEvent(g), this._profileInstance._isRunning && this._profileInstance._drawProfiler(), d.onRenderFinish()
  398. }, c.prototype._draw = function(a) {
  399. var b, d, e, f;
  400. for (b = c.__DRAW_COMMAND_LIST, d = b.length, e = 0; d > e; e++) f = b[e], f.call(a), f.dispose()
  401. }, c.prototype.broadcastEnterFrame = function(b) {
  402. var c, d, e, f;
  403. for (b = this.reuseEvent, b._type = a.Event.ENTER_FRAME, this.dispatchEvent(b), c = a.DisplayObject._enterFrameCallBackList.concat(), d = c.length, e = 0; d > e; e++) f = c[e], b._target = f.display, b._currentTarget = f.display, f.listener.call(f.thisObject, b);
  404. for (c = a.Recycler._callBackList, e = c.length - 1; e >= 0; e--) c[e]._checkFrame()
  405. }, c.prototype.broadcastRender = function() {
  406. var c, d, e, f, g, b = this.reuseEvent;
  407. for (b._type = a.Event.RENDER, c = a.DisplayObject._renderCallBackList.concat(), d = c.length, e = 0; d > e; e++) f = c[e], g = f.display, b._target = g, b._currentTarget = g, f.listener.call(f.thisObject, b)
  408. }, c.prototype.doCallLaterList = function(a, b, c) {
  409. var d, e, f;
  410. for (d = a.length, e = 0; d > e; e++) f = a[e], null != f && f.apply(b[e], c[e])
  411. }, c.prototype.doCallAsyncList = function() {
  412. var e, f, b = a.__callAsyncFunctionList.concat(),
  413. c = a.__callAsyncThisList.concat(),
  414. d = a.__callAsyncArgsList.concat();
  415. for (a.__callAsyncFunctionList.length = 0, a.__callAsyncThisList.length = 0, e = a.__callAsyncArgsList.length = 0; e < b.length; e++) f = b[e], null != f && f.apply(c[e], d[e])
  416. }, c.deviceType = null, c.DEVICE_PC = "web", c.DEVICE_MOBILE = "native", c.RUNTIME_HTML5 = "runtime_html5", c.RUNTIME_NATIVE = "runtime_native", c.__DRAW_COMMAND_LIST = [], c.__use_new_draw = !0, c.cachedEvent = new a.Event(""), c
  417. }(a.EventDispatcher);
  418. a.MainContext = b, b.prototype.__class__ = "egret.MainContext"
  419. }(egret || (egret = {})), testDeviceType = function() {
  420. if (!this.navigator) return !0;
  421. var a = navigator.userAgent.toLowerCase();
  422. return -1 != a.indexOf("mobile") || -1 != a.indexOf("android")
  423. }, testRuntimeType = function() {
  424. return this.navigator ? !0 : !1
  425. }, egret.MainContext.instance = new egret.MainContext, egret.MainContext.deviceType = testDeviceType() ? egret.MainContext.DEVICE_MOBILE : egret.MainContext.DEVICE_PC, egret.MainContext.runtimeType = testRuntimeType() ? egret.MainContext.RUNTIME_HTML5 : egret.MainContext.RUNTIME_NATIVE, delete testDeviceType, delete testRuntimeType,
  426. function(a) {
  427. var b = function() {
  428. function b() {
  429. this._preDrawCount = this._updateTransformPerformanceCost = this._renderPerformanceCost = this._logicPerformanceCost = this._lastTime = 0, this._txt = null, this._tick = 0, this._maxDeltaTime = 500, this._totalDeltaTime = 0, this._isRunning = !1
  430. }
  431. return b.getInstance = function() {
  432. return null == b.instance && (b.instance = new b), b.instance
  433. }, b.prototype.stop = function() {
  434. if (this._isRunning) {
  435. this._isRunning = !1, a.Ticker.getInstance().unregister(this.update, this);
  436. var b = a.MainContext.instance;
  437. b.removeEventListener(a.Event.ENTER_FRAME, this.onEnterFrame, this), b.removeEventListener(a.Event.RENDER, this.onStartRender, this), b.removeEventListener(a.Event.FINISH_RENDER, this.onFinishRender, this), b.removeEventListener(a.Event.FINISH_UPDATE_TRANSFORM, this.onFinishUpdateTransform, this)
  438. }
  439. }, b.prototype.run = function() {
  440. if (null == this._txt && (this._txt = new a.TextField, this._txt.size = 28, this._txt.multiline = !0, this._txt._parent = new a.DisplayObjectContainer), !this._isRunning) {
  441. this._isRunning = !0, a.Ticker.getInstance().register(this.update, this);
  442. var b = a.MainContext.instance;
  443. b.addEventListener(a.Event.ENTER_FRAME, this.onEnterFrame, this), b.addEventListener(a.Event.RENDER, this.onStartRender, this), b.addEventListener(a.Event.FINISH_RENDER, this.onFinishRender, this), b.addEventListener(a.Event.FINISH_UPDATE_TRANSFORM, this.onFinishUpdateTransform, this)
  444. }
  445. }, b.prototype._drawProfiler = function() {
  446. this._txt._updateTransform(), this._txt._draw(a.MainContext.instance.rendererContext)
  447. }, b.prototype._setTxtFontSize = function(a) {
  448. this._txt.size = a
  449. }, b.prototype.onEnterFrame = function() {
  450. this._lastTime = a.getTimer()
  451. }, b.prototype.onStartRender = function(b) {
  452. b = a.getTimer(), this._logicPerformanceCost = b - this._lastTime, this._lastTime = b
  453. }, b.prototype.onFinishUpdateTransform = function(b) {
  454. b = a.getTimer(), this._updateTransformPerformanceCost = b - this._lastTime, this._lastTime = b
  455. }, b.prototype.onFinishRender = function(b) {
  456. b = a.getTimer(), this._renderPerformanceCost = b - this._lastTime, this._lastTime = b
  457. }, b.prototype.update = function(b) {
  458. if (this._tick++, this._totalDeltaTime += b, this._totalDeltaTime >= this._maxDeltaTime) {
  459. b = (this._preDrawCount - 3).toString();
  460. var c = Math.ceil(this._logicPerformanceCost).toString() + "," + Math.ceil(this._updateTransformPerformanceCost).toString() + "," + Math.ceil(this._renderPerformanceCost).toString() + "," + Math.ceil(a.MainContext.instance.rendererContext.renderCost).toString();
  461. this._txt.text = "draw:" + b + "\ncost:" + c + "\nFPS:" + Math.floor(1e3 * this._tick / this._totalDeltaTime).toString(), this._tick = this._totalDeltaTime = 0
  462. }
  463. this._preDrawCount = 0
  464. }, b.prototype.onDrawImage = function() {
  465. this._preDrawCount++
  466. }, b
  467. }();
  468. a.Profiler = b, b.prototype.__class__ = "egret.Profiler"
  469. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  470. function c() {
  471. this.constructor = a
  472. }
  473. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  474. c.prototype = b.prototype, a.prototype = new c
  475. },
  476. function(a) {
  477. var b = function(b) {
  478. function c() {
  479. b.call(this), this._timeScale = 1, this._paused = !1, this._callIndex = -1, this.callBackList = [], null != c.instance && a.Logger.fatalWithErrorId(1002)
  480. }
  481. return __extends(c, b), c.prototype.run = function() {
  482. a.__START_TIME = (new Date).getTime(), a.MainContext.instance.deviceContext.executeMainLoop(this.update, this)
  483. }, c.prototype.update = function(a) {
  484. if (!this._paused) {
  485. for (a *= this._timeScale, a *= this._timeScale, this._callList = this.callBackList.concat(), this._callIndex = 0; this._callIndex < this._callList.length; this._callIndex++) {
  486. var b = this._callList[this._callIndex];
  487. b.listener.call(b.thisObject, a)
  488. }
  489. this._callIndex = -1, this._callList = null
  490. }
  491. }, c.prototype.register = function(a, b, c) {
  492. void 0 === c && (c = 0), this._insertEventBin(this.callBackList, a, b, c)
  493. }, c.prototype.unregister = function(a, b) {
  494. this._removeEventBin(this.callBackList, a, b), this._callList && -1 < this._callIndex && this._removeEventBin(this._callList, a, b, null, this._callIndex + 1)
  495. }, c.prototype.setTimeout = function(b, c, d) {
  496. for (var e = [], f = 3; f < arguments.length; f++) e[f - 3] = arguments[f];
  497. a.Logger.warningWithErrorId(1003), a.setTimeout.apply(null, [b, c, d].concat(e))
  498. }, c.prototype.setTimeScale = function(a) {
  499. this._timeScale = a
  500. }, c.prototype.getTimeScale = function() {
  501. return this._timeScale
  502. }, c.prototype.pause = function() {
  503. this._paused = !0
  504. }, c.prototype.resume = function() {
  505. this._paused = !1
  506. }, c.getInstance = function() {
  507. return null == c.instance && (c.instance = new c), c.instance
  508. }, c
  509. }(a.EventDispatcher);
  510. a.Ticker = b, b.prototype.__class__ = "egret.Ticker"
  511. }(egret || (egret = {})),
  512. function(a) {
  513. var b = function() {
  514. function a() {}
  515. return a.LEFT = "left", a.RIGHT = "right", a.CENTER = "center", a.JUSTIFY = "justify", a.CONTENT_JUSTIFY = "contentJustify", a
  516. }();
  517. a.HorizontalAlign = b, b.prototype.__class__ = "egret.HorizontalAlign"
  518. }(egret || (egret = {})),
  519. function(a) {
  520. var b = function() {
  521. function a() {}
  522. return a.TOP = "top", a.BOTTOM = "bottom", a.MIDDLE = "middle", a.JUSTIFY = "justify", a.CONTENT_JUSTIFY = "contentJustify", a
  523. }();
  524. a.VerticalAlign = b, b.prototype.__class__ = "egret.VerticalAlign"
  525. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  526. function c() {
  527. this.constructor = a
  528. }
  529. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  530. c.prototype = b.prototype, a.prototype = new c
  531. },
  532. function(a) {
  533. var b = function(b) {
  534. function c(a, c) {
  535. void 0 === c && (c = 0), b.call(this), this._currentCount = 0, this._running = !1, this.lastTime = 0, this.delay = a, this.repeatCount = c
  536. }
  537. return __extends(c, b), Object.defineProperty(c.prototype, "currentCount", {
  538. get: function() {
  539. return this._currentCount
  540. },
  541. enumerable: !0,
  542. configurable: !0
  543. }), Object.defineProperty(c.prototype, "running", {
  544. get: function() {
  545. return this._running
  546. },
  547. enumerable: !0,
  548. configurable: !0
  549. }), c.prototype.reset = function() {
  550. this.stop(), this._currentCount = 0
  551. }, c.prototype.start = function() {
  552. this._running || (this.lastTime = a.getTimer(), a.Ticker.getInstance().register(this.onEnterFrame, this), this._running = !0)
  553. }, c.prototype.stop = function() {
  554. this._running && (a.Ticker.getInstance().unregister(this.onEnterFrame, this), this._running = !1)
  555. }, c.prototype.onEnterFrame = function(b) {
  556. b = a.getTimer(), b - this.lastTime > this.delay && (this.lastTime = b, this._currentCount++, a.TimerEvent.dispatchTimerEvent(this, a.TimerEvent.TIMER), 0 < this.repeatCount && this._currentCount >= this.repeatCount && (this.stop(), a.TimerEvent.dispatchTimerEvent(this, a.TimerEvent.TIMER_COMPLETE)))
  557. }, c
  558. }(a.EventDispatcher);
  559. a.Timer = b, b.prototype.__class__ = "egret.Timer"
  560. }(egret || (egret = {})),
  561. function(a) {
  562. function b(a) {
  563. if (a = a.prototype ? a.prototype : Object.getPrototypeOf(a), a.hasOwnProperty("__class__")) return a.__class__;
  564. var b = a.constructor.toString(),
  565. c = b.indexOf("("),
  566. b = b.substring(9, c);
  567. return Object.defineProperty(a, "__class__", {
  568. value: b,
  569. enumerable: !1,
  570. writable: !0
  571. }), b
  572. }
  573. a.getQualifiedClassName = b, a.getQualifiedSuperclassName = function(a) {
  574. if (a = a.prototype ? a.prototype : Object.getPrototypeOf(a), a.hasOwnProperty("__superclass__")) return a.__superclass__;
  575. var c = Object.getPrototypeOf(a);
  576. return null == c ? null : (c = b(c.constructor)) ? (Object.defineProperty(a, "__superclass__", {
  577. value: c,
  578. enumerable: !1,
  579. writable: !0
  580. }), c) : null
  581. }
  582. }(egret || (egret = {})),
  583. function(a) {
  584. var b = {};
  585. a.getDefinitionByName = function(a) {
  586. var c, d, e, f;
  587. if (!a) return null;
  588. if (c = b[a]) return c;
  589. for (d = a.split("."), e = d.length, c = __global, f = 0; e > f; f++)
  590. if (c = c[d[f]], !c) return null;
  591. return b[a] = c
  592. }
  593. }(egret || (egret = {})), __global = __global || this, ! function(a) {
  594. function b(a) {
  595. var b, d;
  596. for (b in c) d = c[b], d.delay -= a, 0 >= d.delay && (d.listener.apply(d.thisObject, d.params), delete c[b])
  597. }
  598. var c = {},
  599. d = 0;
  600. a.setTimeout = function(e, f, g) {
  601. for (var h = [], i = 3; i < arguments.length; i++) h[i - 3] = arguments[i];
  602. return h = {
  603. listener: e,
  604. thisObject: f,
  605. delay: g,
  606. params: h
  607. }, 0 == d && a.Ticker.getInstance().register(b, null), d++, c[d] = h, d
  608. }, a.clearTimeout = function(a) {
  609. delete c[a]
  610. }
  611. }(egret || (egret = {})),
  612. function(a) {
  613. a.hasDefinition = function(b) {
  614. return a.getDefinitionByName(b) ? !0 : !1
  615. }
  616. }(egret || (egret = {})),
  617. function(a) {
  618. a.toColorString = function(a) {
  619. for ((isNaN(a) || 0 > a) && (a = 0), a > 16777215 && (a = 16777215), a = a.toString(16).toUpperCase(); 6 > a.length;) a = "0" + a;
  620. return "#" + a
  621. }
  622. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  623. function c() {
  624. this.constructor = a
  625. }
  626. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  627. c.prototype = b.prototype, a.prototype = new c
  628. },
  629. function(a) {
  630. var b = function(b) {
  631. function c(a, c, d, e, f, g) {
  632. void 0 === a && (a = 1), void 0 === c && (c = 0), void 0 === d && (d = 0), void 0 === e && (e = 1), void 0 === f && (f = 0), void 0 === g && (g = 0), b.call(this), this.a = a, this.b = c, this.c = d, this.d = e, this.tx = f, this.ty = g
  633. }
  634. return __extends(c, b), c.prototype.prepend = function(a, b, c, d, e, f) {
  635. var h, i, g = this.tx;
  636. return (1 != a || 0 != b || 0 != c || 1 != d) && (h = this.a, i = this.c, this.a = h * a + this.b * c, this.b = h * b + this.b * d, this.c = i * a + this.d * c, this.d = i * b + this.d * d), this.tx = g * a + this.ty * c + e, this.ty = g * b + this.ty * d + f, this
  637. }, c.prototype.append = function(a, b, c, d, e, f) {
  638. var g = this.a,
  639. h = this.b,
  640. i = this.c,
  641. j = this.d;
  642. return (1 != a || 0 != b || 0 != c || 1 != d) && (this.a = a * g + b * i, this.b = a * h + b * j, this.c = c * g + d * i, this.d = c * h + d * j), this.tx = e * g + f * i + this.tx, this.ty = e * h + f * j + this.ty, this
  643. }, c.prototype.prependTransform = function(b, c, d, e, f, g, h, i, j) {
  644. if (f % 360) {
  645. var k = a.NumberUtils.cos(f);
  646. f = a.NumberUtils.sin(f)
  647. } else k = 1, f = 0;
  648. return (i || j) && (this.tx -= i, this.ty -= j), g || h ? (this.prepend(k * d, f * d, -f * e, k * e, 0, 0), this.prepend(a.NumberUtils.cos(h), a.NumberUtils.sin(h), -a.NumberUtils.sin(g), a.NumberUtils.cos(g), b, c)) : this.prepend(k * d, f * d, -f * e, k * e, b, c), this
  649. }, c.prototype.appendTransform = function(b, c, d, e, f, g, h, i, j) {
  650. if (f % 360) {
  651. var k = a.NumberUtils.cos(f);
  652. f = a.NumberUtils.sin(f)
  653. } else k = 1, f = 0;
  654. return g || h ? (this.append(a.NumberUtils.cos(h), a.NumberUtils.sin(h), -a.NumberUtils.sin(g), a.NumberUtils.cos(g), b, c), this.append(k * d, f * d, -f * e, k * e, 0, 0)) : this.append(k * d, f * d, -f * e, k * e, b, c), (i || j) && (this.tx -= i * this.a + j * this.c, this.ty -= i * this.b + j * this.d), this
  655. }, c.prototype.rotate = function(a) {
  656. var c, d, e, b = Math.cos(a);
  657. return a = Math.sin(a), c = this.a, d = this.c, e = this.tx, this.a = c * b - this.b * a, this.b = c * a + this.b * b, this.c = d * b - this.d * a, this.d = d * a + this.d * b, this.tx = e * b - this.ty * a, this.ty = e * a + this.ty * b, this
  658. }, c.prototype.skew = function(b, c) {
  659. return this.append(a.NumberUtils.cos(c), a.NumberUtils.sin(c), -a.NumberUtils.sin(b), a.NumberUtils.cos(b), 0, 0), this
  660. }, c.prototype.scale = function(a, b) {
  661. return this.a *= a, this.d *= b, this.c *= a, this.b *= b, this.tx *= a, this.ty *= b, this
  662. }, c.prototype.translate = function(a, b) {
  663. return this.tx += a, this.ty += b, this
  664. }, c.prototype.identity = function() {
  665. return this.a = this.d = 1, this.b = this.c = this.tx = this.ty = 0, this
  666. }, c.prototype.identityMatrix = function(a) {
  667. return this.a = a.a, this.b = a.b, this.c = a.c, this.d = a.d, this.tx = a.tx, this.ty = a.ty, this
  668. }, c.prototype.invert = function() {
  669. var a = this.a,
  670. b = this.b,
  671. c = this.c,
  672. d = this.d,
  673. e = this.tx,
  674. f = a * d - b * c;
  675. return this.a = d / f, this.b = -b / f, this.c = -c / f, this.d = a / f, this.tx = (c * this.ty - d * e) / f, this.ty = -(a * this.ty - b * e) / f, this
  676. }, c.transformCoords = function(b, c, d) {
  677. var e = a.Point.identity;
  678. return e.x = b.a * c + b.c * d + b.tx, e.y = b.d * d + b.b * c + b.ty, e
  679. }, c.prototype.toArray = function(a) {
  680. return this.array || (this.array = new Float32Array(9)), a ? (this.array[0] = this.a, this.array[1] = this.b, this.array[2] = 0, this.array[3] = this.c, this.array[4] = this.d, this.array[5] = 0, this.array[6] = this.tx, this.array[7] = this.ty) : (this.array[0] = this.a, this.array[1] = this.b, this.array[2] = this.tx, this.array[3] = this.c, this.array[4] = this.d, this.array[5] = this.ty, this.array[6] = 0, this.array[7] = 0), this.array[8] = 1, this.array
  681. }, c.identity = new c, c.DEG_TO_RAD = Math.PI / 180, c
  682. }(a.HashObject);
  683. a.Matrix = b, b.prototype.__class__ = "egret.Matrix"
  684. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  685. function c() {
  686. this.constructor = a
  687. }
  688. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  689. c.prototype = b.prototype, a.prototype = new c
  690. },
  691. function(a) {
  692. var b = function(a) {
  693. function b(b, c) {
  694. void 0 === b && (b = 0), void 0 === c && (c = 0), a.call(this), this.x = b, this.y = c
  695. }
  696. return __extends(b, a), b.prototype.clone = function() {
  697. return new b(this.x, this.y)
  698. }, b.prototype.equals = function(a) {
  699. return this.x == a.x && this.y == a.y
  700. }, b.distance = function(a, b) {
  701. return Math.sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y))
  702. }, b.identity = new b(0, 0), b
  703. }(a.HashObject);
  704. a.Point = b, b.prototype.__class__ = "egret.Point"
  705. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  706. function c() {
  707. this.constructor = a
  708. }
  709. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  710. c.prototype = b.prototype, a.prototype = new c
  711. },
  712. function(a) {
  713. var b = function(a) {
  714. function b(b, c, d, e) {
  715. void 0 === b && (b = 0), void 0 === c && (c = 0), void 0 === d && (d = 0), void 0 === e && (e = 0), a.call(this), this.x = b, this.y = c, this.width = d, this.height = e
  716. }
  717. return __extends(b, a), Object.defineProperty(b.prototype, "right", {
  718. get: function() {
  719. return this.x + this.width
  720. },
  721. set: function(a) {
  722. this.width = a - this.x
  723. },
  724. enumerable: !0,
  725. configurable: !0
  726. }), Object.defineProperty(b.prototype, "bottom", {
  727. get: function() {
  728. return this.y + this.height
  729. },
  730. set: function(a) {
  731. this.height = a - this.y
  732. },
  733. enumerable: !0,
  734. configurable: !0
  735. }), b.prototype.initialize = function(a, b, c, d) {
  736. return this.x = a, this.y = b, this.width = c, this.height = d, this
  737. }, b.prototype.contains = function(a, b) {
  738. return this.x <= a && this.x + this.width >= a && this.y <= b && this.y + this.height >= b
  739. }, b.prototype.intersects = function(a) {
  740. return Math.max(this.x, a.x) <= Math.min(this.right, a.right) && Math.max(this.y, a.y) <= Math.min(this.bottom, a.bottom)
  741. }, b.prototype.setEmpty = function() {
  742. this.height = this.width = this.y = this.x = 0
  743. }, b.prototype.clone = function() {
  744. return new b(this.x, this.y, this.width, this.height)
  745. }, b.prototype.containsPoint = function(a) {
  746. return this.x < a.x && this.x + this.width > a.x && this.y < a.y && this.y + this.height > a.y ? !0 : !1
  747. }, b.identity = new b(0, 0, 0, 0), b
  748. }(a.HashObject);
  749. a.Rectangle = b, b.prototype.__class__ = "egret.Rectangle"
  750. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  751. function c() {
  752. this.constructor = a
  753. }
  754. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  755. c.prototype = b.prototype, a.prototype = new c
  756. },
  757. function(a) {
  758. var b = function(b) {
  759. function c() {
  760. b.call(this), this._isSupportDOMParser = this._xmlDict = this._parser = null, this._xmlDict = {}, window.DOMParser ? (this._isSupportDOMParser = !0, this._parser = new DOMParser) : this._isSupportDOMParser = !1
  761. }
  762. return __extends(c, b), c.getInstance = function() {
  763. return c._instance || (c._instance = new c), c._instance
  764. }, c.prototype.parserXML = function(b) {
  765. for (var c = 0;
  766. "\n" == b.charAt(c) || " " == b.charAt(c) || "\r" == b.charAt(c) || " " == b.charAt(c);) c++;
  767. return 0 != c && (b = b.substring(c, b.length)), this._isSupportDOMParser ? c = this._parser.parseFromString(b, "text/xml") : (c = new ActiveXObject("Microsoft.XMLDOM"), c.async = "false", c.loadXML(b)), null == c && a.Logger.infoWithErrorId(1015), c
  768. }, c._instance = null, c
  769. }(a.HashObject);
  770. a.SAXParser = b, b.prototype.__class__ = "egret.SAXParser"
  771. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  772. function c() {
  773. this.constructor = a
  774. }
  775. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  776. c.prototype = b.prototype, a.prototype = new c
  777. },
  778. function(a) {
  779. var c, d, e, f, b = function(b) {
  780. function c() {
  781. b.call(this), this._designHeight = this._designWidth = 0, this._scaleY = this._scaleX = 1, this._stageHeight = this._stageWidth = this._offSetY = 0
  782. }
  783. return __extends(c, b), c.getInstance = function() {
  784. return null == c.instance && (d.initialize(), c.instance = new c), c.instance
  785. }, c.prototype.setDesignSize = function(b, c, d) {
  786. this._designWidth = b, this._designHeight = c, d && (a.Logger.warningWithErrorId(1001), this._setResolutionPolicy(d))
  787. }, c.prototype._setResolutionPolicy = function(a) {
  788. this._resolutionPolicy = a, a.init(this), a._apply(this, this._designWidth, this._designHeight)
  789. }, c.prototype.getScaleX = function() {
  790. return this._scaleX
  791. }, c.prototype.getScaleY = function() {
  792. return this._scaleY
  793. }, c.prototype.getOffSetY = function() {
  794. return this._offSetY
  795. }, c.canvas_name = "egretCanvas", c.canvas_div_name = "gameDiv", c
  796. }(a.HashObject);
  797. a.StageDelegate = b, b.prototype.__class__ = "egret.StageDelegate", c = function() {
  798. function a(a, b) {
  799. this._containerStrategy = a, this._contentStrategy = b
  800. }
  801. return a.prototype.init = function(a) {
  802. this._containerStrategy.init(a), this._contentStrategy.init(a)
  803. }, a.prototype._apply = function(a, b, c) {
  804. this._containerStrategy._apply(a, b, c), this._contentStrategy._apply(a, b, c)
  805. }, a
  806. }(), a.ResolutionPolicy = c, c.prototype.__class__ = "egret.ResolutionPolicy", d = function() {
  807. function a() {}
  808. return a.initialize = function() {
  809. a.EQUAL_TO_FRAME = new e
  810. }, a.prototype.init = function() {}, a.prototype._apply = function() {}, a.prototype._setupContainer = function() {
  811. var a, b = document.body;
  812. b && (a = b.style) && (a.paddingTop = a.paddingTop || "0px", a.paddingRight = a.paddingRight || "0px", a.paddingBottom = a.paddingBottom || "0px", a.paddingLeft = a.paddingLeft || "0px", a.borderTop = a.borderTop || "0px", a.borderRight = a.borderRight || "0px", a.borderBottom = a.borderBottom || "0px", a.borderLeft = a.borderLeft || "0px", a.marginTop = a.marginTop || "0px", a.marginRight = a.marginRight || "0px", a.marginBottom = a.marginBottom || "0px", a.marginLeft = a.marginLeft || "0px")
  813. }, a
  814. }(), a.ContainerStrategy = d, d.prototype.__class__ = "egret.ContainerStrategy", e = function(a) {
  815. function b() {
  816. a.apply(this, arguments)
  817. }
  818. return __extends(b, a), b.prototype._apply = function() {
  819. this._setupContainer()
  820. }, b
  821. }(d), a.EqualToFrame = e, e.prototype.__class__ = "egret.EqualToFrame", c = function() {
  822. function c() {}
  823. return c.prototype.init = function() {}, c.prototype._apply = function() {}, c.prototype.setEgretSize = function(c, d, e, f, g, h) {
  824. void 0 === h && (h = 0), a.StageDelegate.getInstance()._stageWidth = Math.round(c), a.StageDelegate.getInstance()._stageHeight = Math.round(d), c = document.getElementById(b.canvas_div_name), c.style.width = e + "px", c.style.height = f + "px", c.style.top = h + "px"
  825. }, c.prototype._getClientWidth = function() {
  826. return document.documentElement.clientWidth
  827. }, c.prototype._getClientHeight = function() {
  828. return document.documentElement.clientHeight
  829. }, c
  830. }(), a.ContentStrategy = c, c.prototype.__class__ = "egret.ContentStrategy", f = function(a) {
  831. function b(b) {
  832. void 0 === b && (b = 0), a.call(this), this.minWidth = 0 / 0, this.minWidth = b
  833. }
  834. return __extends(b, a), b.prototype._apply = function(a, b, c) {
  835. b = this._getClientWidth();
  836. var d = this._getClientHeight(),
  837. e = d / c,
  838. f = b / e,
  839. g = 1;
  840. 0 != this.minWidth && (g = Math.min(1, f / this.minWidth)), this.setEgretSize(f / g, c, b, d * g), a._scaleX = e * g, a._scaleY = e * g
  841. }, b
  842. }(c), a.FixedHeight = f, f.prototype.__class__ = "egret.FixedHeight", f = function(a) {
  843. function b(b) {
  844. void 0 === b && (b = 0), a.call(this), this.minHeight = 0 / 0, this.minHeight = b
  845. }
  846. return __extends(b, a), b.prototype._apply = function(a, b, c) {
  847. c = this._getClientWidth();
  848. var d = this._getClientHeight(),
  849. e = c / b,
  850. f = d / e,
  851. g = 1;
  852. 0 != this.minHeight && (g = Math.min(1, f / this.minHeight)), this.setEgretSize(b, f / g, c * g, d, c * (1 - g) / 2), a._scaleX = e * g, a._scaleY = e * g
  853. }, b
  854. }(c), a.FixedWidth = f, f.prototype.__class__ = "egret.FixedWidth", f = function(a) {
  855. function b(b, c) {
  856. a.call(this), this.width = b, this.height = c
  857. }
  858. return __extends(b, a), b.prototype._apply = function(a, b, c) {
  859. c = this.width;
  860. var d = this.height,
  861. e = c / b;
  862. this.setEgretSize(b, d / e, c, d), a._scaleX = e, a._scaleY = e
  863. }, b
  864. }(c), a.FixedSize = f, f.prototype.__class__ = "egret.FixedSize", f = function(a) {
  865. function b() {
  866. a.call(this)
  867. }
  868. return __extends(b, a), b.prototype._apply = function(a, b, c) {
  869. this.setEgretSize(b, c, b, c, Math.floor((b - b) / 2)), a._scaleX = 1, a._scaleY = 1
  870. }, b
  871. }(c), a.NoScale = f, f.prototype.__class__ = "egret.NoScale", f = function(a) {
  872. function b() {
  873. a.call(this)
  874. }
  875. return __extends(b, a), b.prototype._apply = function(a, b, c) {
  876. var d = this._getClientWidth(),
  877. e = this._getClientHeight(),
  878. f = d,
  879. g = e,
  880. h = g / c > f / b ? f / b : g / c,
  881. f = b * h,
  882. g = c * h,
  883. d = Math.floor((d - f) / 2);
  884. a._offSetY = Math.floor((e - g) / 2), this.setEgretSize(b, c / 1, 1 * f, g, d, a._offSetY), a._scaleX = 1 * h, a._scaleY = 1 * h
  885. }, b
  886. }(c), a.ShowAll = f, f.prototype.__class__ = "egret.ShowAll", c = function(a) {
  887. function b() {
  888. a.call(this)
  889. }
  890. return __extends(b, a), b.prototype._apply = function(a, b, c) {
  891. var d = this._getClientWidth(),
  892. e = this._getClientHeight(),
  893. d = d / b,
  894. e = e / c;
  895. this.setEgretSize(b, c, b * d, c * e), a._scaleX = d, a._scaleY = e
  896. }, b
  897. }(c), a.FullScreen = c, c.prototype.__class__ = "egret.FullScreen"
  898. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  899. function c() {
  900. this.constructor = a
  901. }
  902. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  903. c.prototype = b.prototype, a.prototype = new c
  904. },
  905. function(a) {
  906. var b = function(b) {
  907. function c() {
  908. b.call(this), this._originalData = {}, this._drawAreaList = []
  909. }
  910. return __extends(c, b), c.getInstance = function() {
  911. return null == c.instance && (c.instance = new c), c.instance
  912. }, c.prototype.addDrawArea = function(a) {
  913. this._drawAreaList.push(a)
  914. }, c.prototype.clearDrawArea = function() {
  915. this._drawAreaList = []
  916. }, c.prototype.drawImage = function(b, d, e, f, g, h, i, j, k, l, m) {
  917. var n, o, p, q;
  918. if (void 0 === m && (m = void 0), i = i || 0, j = j || 0, n = d._texture_to_render, null != n && 0 != h && 0 != g && 0 != k && 0 != l)
  919. if (o = a.MainContext.instance.rendererContext._texture_scale_factor, g /= o, h /= o, 0 != this._drawAreaList.length && a.MainContext.instance.rendererContext._cacheCanvasContext) {
  920. for (o = a.DisplayObject.getTransformBounds(d._getSize(c.identityRectangle), d._worldTransform), d._worldBounds.initialize(o.x, o.y, o.width, o.height), o = this._originalData, o.sourceX = e, o.sourceY = f, o.sourceWidth = g, o.sourceHeight = h, o.destX = i, o.destY = j, o.destWidth = k, o.destHeight = l, p = this.getDrawAreaList(), q = 0; q < p.length; q++)
  921. if (!this.ignoreRender(d, p[q], o.destX, o.destY)) {
  922. b.drawImage(n, e, f, g, h, i, j, k, l, m);
  923. break
  924. }
  925. } else b.drawImage(n, e, f, g, h, i, j, k, l, m)
  926. }, c.prototype.ignoreRender = function(a, b, c, d) {
  927. var e = a._worldBounds;
  928. return c *= a._worldTransform.a, d *= a._worldTransform.d, e.x + e.width + c <= b.x || e.x + c >= b.x + b.width || e.y + e.height + d <= b.y || e.y + d >= b.y + b.height ? !0 : !1
  929. }, c.prototype.getDrawAreaList = function() {
  930. var b;
  931. return 0 == this._drawAreaList.length ? (this._defaultDrawAreaList || (this._defaultDrawAreaList = [new a.Rectangle(0, 0, a.MainContext.instance.stage.stageWidth, a.MainContext.instance.stage.stageHeight)], a.MainContext.instance.stage.addEventListener(a.Event.RESIZE, this.onResize, this)), b = this._defaultDrawAreaList) : b = this._drawAreaList, b
  932. }, c.prototype.onResize = function() {
  933. a.MainContext.instance.stage.removeEventListener(a.Event.RESIZE, this.onResize, this), this._defaultDrawAreaList = null
  934. }, c.identityRectangle = new a.Rectangle, c
  935. }(a.HashObject);
  936. a.RenderFilter = b, b.prototype.__class__ = "egret.RenderFilter"
  937. }(egret || (egret = {})),
  938. function(a) {
  939. var b = function() {
  940. function b() {}
  941. return b.mapClass = function(a, b, c) {
  942. void 0 === c && (c = ""), a = this.getKey(a) + "#" + c, this.mapClassDic[a] = b
  943. }, b.getKey = function(b) {
  944. return "string" == typeof b ? b : a.getQualifiedClassName(b)
  945. }, b.mapValue = function(a, b, c) {
  946. void 0 === c && (c = ""), a = this.getKey(a) + "#" + c, this.mapValueDic[a] = b
  947. }, b.hasMapRule = function(a, b) {
  948. void 0 === b && (b = "");
  949. var c = this.getKey(a) + "#" + b;
  950. return this.mapValueDic[c] || this.mapClassDic[c] ? !0 : !1
  951. }, b.getInstance = function(b, c) {
  952. var d, e;
  953. if (void 0 === c && (c = ""), d = this.getKey(b) + "#" + c, this.mapValueDic[d]) return this.mapValueDic[d];
  954. if (e = this.mapClassDic[d]) return e = new e, this.mapValueDic[d] = e, delete this.mapClassDic[d], e;
  955. throw Error(a.getString(1028, d))
  956. }, b.mapClassDic = {}, b.mapValueDic = {}, b
  957. }();
  958. a.Injector = b, b.prototype.__class__ = "egret.Injector"
  959. }(egret || (egret = {})),
  960. function(a) {
  961. var b = function() {
  962. return function() {
  963. this.type = null
  964. }
  965. }();
  966. a.Filter = b, b.prototype.__class__ = "egret.Filter"
  967. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  968. function c() {
  969. this.constructor = a
  970. }
  971. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  972. c.prototype = b.prototype, a.prototype = new c
  973. },
  974. function(a) {
  975. var b = function(a) {
  976. function b(b, c) {
  977. a.call(this), this.blurX = b, this.blurY = c, this.type = "blur"
  978. }
  979. return __extends(b, a), b
  980. }(a.Filter);
  981. a.BlurFilter = b, b.prototype.__class__ = "egret.BlurFilter"
  982. }(egret || (egret = {})),
  983. function(a) {
  984. var b = function() {
  985. function a() {}
  986. return a.NORMAL = "normal", a.ADD = "add", a.ERASE = "erase", a
  987. }();
  988. a.BlendMode = b, b.prototype.__class__ = "egret.BlendMode"
  989. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  990. function c() {
  991. this.constructor = a
  992. }
  993. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  994. c.prototype = b.prototype, a.prototype = new c
  995. },
  996. function(a) {
  997. var b = function(b) {
  998. function c() {
  999. b.call(this), this.__hack_local_matrix = null, this._sizeDirty = this._normalDirty = !0, this._parent = this._texture_to_render = this.name = this._sizeChangeCallTarget = this._sizeChangeCallBack = null, this._y = this._x = 0, this._scaleY = this._scaleX = 1, this._anchorY = this._anchorX = this._anchorOffsetY = this._anchorOffsetX = 0, this._visible = !0, this._rotation = 0, this._alpha = 1, this._skewY = this._skewX = 0, this._touchEnabled = !1, this._scrollRect = this.blendMode = null, this._explicitHeight = this._explicitWidth = 0 / 0, this._hasHeightSet = this._hasWidthSet = !1, this._worldBounds = this.mask = null, this.worldAlpha = 1, this.needDraw = this._isContainer = !1, this._hitTestPointTexture = null, this._rectH = this._rectW = 0, this._stage = null, this._cacheAsBitmap = !1, this.renderTexture = null, this._cacheDirty = !1, this._filter = this._colorTransform = null, this._worldTransform = new a.Matrix, this._worldBounds = new a.Rectangle(0, 0, 0, 0), this._cacheBounds = new a.Rectangle(0, 0, 0, 0)
  1000. }
  1001. return __extends(c, b), c.prototype._setDirty = function() {
  1002. this._normalDirty = !0
  1003. }, c.prototype.getDirty = function() {
  1004. return this._normalDirty || this._sizeDirty
  1005. }, c.prototype._setParentSizeDirty = function() {
  1006. var a = this._parent;
  1007. !a || a._hasWidthSet || a._hasHeightSet || a._setSizeDirty()
  1008. }, c.prototype._setSizeDirty = function() {
  1009. this._sizeDirty || (this._sizeDirty = !0, this._setDirty(), this._setCacheDirty(), this._setParentSizeDirty(), null != this._sizeChangeCallBack && (this._sizeChangeCallTarget == this._parent ? this._sizeChangeCallBack.call(this._sizeChangeCallTarget) : this._sizeChangeCallTarget = this._sizeChangeCallBack = null))
  1010. }, c.prototype._clearDirty = function() {
  1011. this._normalDirty = !1
  1012. }, c.prototype._clearSizeDirty = function() {
  1013. this._sizeDirty = !1
  1014. }, Object.defineProperty(c.prototype, "parent", {
  1015. get: function() {
  1016. return this._parent
  1017. },
  1018. enumerable: !0,
  1019. configurable: !0
  1020. }), c.prototype._parentChanged = function(a) {
  1021. this._parent = a
  1022. }, Object.defineProperty(c.prototype, "x", {
  1023. get: function() {
  1024. return this._x
  1025. },
  1026. set: function(a) {
  1027. this._setX(a)
  1028. },
  1029. enumerable: !0,
  1030. configurable: !0
  1031. }), c.prototype._setX = function(b) {
  1032. a.NumberUtils.isNumber(b) && this._x != b && (this._x = b, this._setDirty(), this._setParentSizeDirty())
  1033. }, Object.defineProperty(c.prototype, "y", {
  1034. get: function() {
  1035. return this._y
  1036. },
  1037. set: function(a) {
  1038. this._setY(a)
  1039. },
  1040. enumerable: !0,
  1041. configurable: !0
  1042. }), c.prototype._setY = function(b) {
  1043. a.NumberUtils.isNumber(b) && this._y != b && (this._y = b, this._setDirty(), this._setParentSizeDirty())
  1044. }, Object.defineProperty(c.prototype, "scaleX", {
  1045. get: function() {
  1046. return this._scaleX
  1047. },
  1048. set: function(b) {
  1049. a.NumberUtils.isNumber(b) && this._scaleX != b && (this._scaleX = b, this._setDirty(), this._setParentSizeDirty())
  1050. },
  1051. enumerable: !0,
  1052. configurable: !0
  1053. }), Object.defineProperty(c.prototype, "scaleY", {
  1054. get: function() {
  1055. return this._scaleY
  1056. },
  1057. set: function(b) {
  1058. a.NumberUtils.isNumber(b) && this._scaleY != b && (this._scaleY = b, this._setDirty(), this._setParentSizeDirty())
  1059. },
  1060. enumerable: !0,
  1061. configurable: !0
  1062. }), Object.defineProperty(c.prototype, "anchorOffsetX", {
  1063. get: function() {
  1064. return this._anchorOffsetX
  1065. },
  1066. set: function(b) {
  1067. a.NumberUtils.isNumber(b) && this._anchorOffsetX != b && (this._anchorOffsetX = b, this._setDirty(), this._setParentSizeDirty())
  1068. },
  1069. enumerable: !0,
  1070. configurable: !0
  1071. }), Object.defineProperty(c.prototype, "anchorOffsetY", {
  1072. get: function() {
  1073. return this._anchorOffsetY
  1074. },
  1075. set: function(b) {
  1076. a.NumberUtils.isNumber(b) && this._anchorOffsetY != b && (this._anchorOffsetY = b, this._setDirty(), this._setParentSizeDirty())
  1077. },
  1078. enumerable: !0,
  1079. configurable: !0
  1080. }), Object.defineProperty(c.prototype, "anchorX", {
  1081. get: function() {
  1082. return this._anchorX
  1083. },
  1084. set: function(a) {
  1085. this._setAnchorX(a)
  1086. },
  1087. enumerable: !0,
  1088. configurable: !0
  1089. }), c.prototype._setAnchorX = function(b) {
  1090. a.NumberUtils.isNumber(b) && this._anchorX != b && (this._anchorX = b, this._setDirty(), this._setParentSizeDirty())
  1091. }, Object.defineProperty(c.prototype, "anchorY", {
  1092. get: function() {
  1093. return this._anchorY
  1094. },
  1095. set: function(a) {
  1096. this._setAnchorY(a)
  1097. },
  1098. enumerable: !0,
  1099. configurable: !0
  1100. }), c.prototype._setAnchorY = function(b) {
  1101. a.NumberUtils.isNumber(b) && this._anchorY != b && (this._anchorY = b, this._setDirty(), this._setParentSizeDirty())
  1102. }, Object.defineProperty(c.prototype, "visible", {
  1103. get: function() {
  1104. return this._visible
  1105. },
  1106. set: function(a) {
  1107. this._setVisible(a)
  1108. },
  1109. enumerable: !0,
  1110. configurable: !0
  1111. }), c.prototype._setVisible = function(a) {
  1112. this._visible != a && (this._visible = a, this._setSizeDirty())
  1113. }, Object.defineProperty(c.prototype, "rotation", {
  1114. get: function() {
  1115. return this._rotation
  1116. },
  1117. set: function(b) {
  1118. a.NumberUtils.isNumber(b) && this._rotation != b && (this._rotation = b, this._setDirty(), this._setParentSizeDirty())
  1119. },
  1120. enumerable: !0,
  1121. configurable: !0
  1122. }), Object.defineProperty(c.prototype, "alpha", {
  1123. get: function() {
  1124. return this._alpha
  1125. },
  1126. set: function(b) {
  1127. a.NumberUtils.isNumber(b) && this._alpha != b && (this._alpha = b, this._setDirty(), this._setCacheDirty())
  1128. },
  1129. enumerable: !0,
  1130. configurable: !0
  1131. }), Object.defineProperty(c.prototype, "skewX", {
  1132. get: function() {
  1133. return this._skewX
  1134. },
  1135. set: function(b) {
  1136. a.NumberUtils.isNumber(b) && this._skewX != b && (this._skewX = b, this._setDirty(), this._setParentSizeDirty())
  1137. },
  1138. enumerable: !0,
  1139. configurable: !0
  1140. }), Object.defineProperty(c.prototype, "skewY", {
  1141. get: function() {
  1142. return this._skewY
  1143. },
  1144. set: function(b) {
  1145. a.NumberUtils.isNumber(b) && this._skewY != b && (this._skewY = b, this._setDirty(), this._setParentSizeDirty())
  1146. },
  1147. enumerable: !0,
  1148. configurable: !0
  1149. }), Object.defineProperty(c.prototype, "touchEnabled", {
  1150. get: function() {
  1151. return this._touchEnabled
  1152. },
  1153. set: function(a) {
  1154. this._setTouchEnabled(a)
  1155. },
  1156. enumerable: !0,
  1157. configurable: !0
  1158. }), c.prototype._setTouchEnabled = function(a) {
  1159. this._touchEnabled = a
  1160. }, Object.defineProperty(c.prototype, "scrollRect", {
  1161. get: function() {
  1162. return this._scrollRect
  1163. },
  1164. set: function(a) {
  1165. this._setScrollRect(a)
  1166. },
  1167. enumerable: !0,
  1168. configurable: !0
  1169. }), c.prototype._setScrollRect = function(a) {
  1170. this._scrollRect = a, this._setSizeDirty()
  1171. }, Object.defineProperty(c.prototype, "measuredWidth", {
  1172. get: function() {
  1173. return this._measureBounds().width
  1174. },
  1175. enumerable: !0,
  1176. configurable: !0
  1177. }), Object.defineProperty(c.prototype, "measuredHeight", {
  1178. get: function() {
  1179. return this._measureBounds().height
  1180. },
  1181. enumerable: !0,
  1182. configurable: !0
  1183. }), Object.defineProperty(c.prototype, "explicitWidth", {
  1184. get: function() {
  1185. return this._explicitWidth
  1186. },
  1187. enumerable: !0,
  1188. configurable: !0
  1189. }), Object.defineProperty(c.prototype, "explicitHeight", {
  1190. get: function() {
  1191. return this._explicitHeight
  1192. },
  1193. enumerable: !0,
  1194. configurable: !0
  1195. }), Object.defineProperty(c.prototype, "width", {
  1196. get: function() {
  1197. return this._getWidth()
  1198. },
  1199. set: function(a) {
  1200. this._setWidth(a)
  1201. },
  1202. enumerable: !0,
  1203. configurable: !0
  1204. }), c.prototype._getWidth = function() {
  1205. return this._getSize(a.Rectangle.identity).width
  1206. }, Object.defineProperty(c.prototype, "height", {
  1207. get: function() {
  1208. return this._getHeight()
  1209. },
  1210. set: function(a) {
  1211. this._setHeight(a)
  1212. },
  1213. enumerable: !0,
  1214. configurable: !0
  1215. }), c.prototype._getHeight = function() {
  1216. return this._getSize(a.Rectangle.identity).height
  1217. }, c.prototype._setWidth = function(b) {
  1218. this._setSizeDirty(), this._setCacheDirty(), this._explicitWidth = b, this._hasWidthSet = a.NumberUtils.isNumber(b)
  1219. }, c.prototype._setHeight = function(b) {
  1220. this._setSizeDirty(), this._setCacheDirty(), this._explicitHeight = b, this._hasHeightSet = a.NumberUtils.isNumber(b)
  1221. }, c.prototype._draw = function(b) {
  1222. var c, d;
  1223. this._visible && !this.drawCacheTexture(b) && (c = a.MainContext.__use_new_draw && this._isContainer, this._filter && !c && b.setGlobalFilter(this._filter), this._colorTransform && !c && b.setGlobalColorTransform(this._colorTransform.matrix), b.setAlpha(this.worldAlpha, this.blendMode), b.setTransform(this._worldTransform), d = this.mask || this._scrollRect, d && !c && b.pushMask(d), this._render(b), d && !c && b.popMask(), this._colorTransform && !c && b.setGlobalColorTransform(null), this._filter && !c && b.setGlobalFilter(null)), this.destroyCacheBounds()
  1224. }, c.prototype._setGlobalFilter = function(a) {
  1225. a.setGlobalFilter(this._filter)
  1226. }, c.prototype._removeGlobalFilter = function(a) {
  1227. a.setGlobalFilter(null)
  1228. }, c.prototype._setGlobalColorTransform = function(a) {
  1229. a.setGlobalColorTransform(this._colorTransform.matrix)
  1230. }, c.prototype._removeGlobalColorTransform = function(a) {
  1231. a.setGlobalColorTransform(null)
  1232. }, c.prototype._pushMask = function(a) {
  1233. a.setTransform(this._worldTransform);
  1234. var b = this.mask || this._scrollRect;
  1235. b && a.pushMask(b)
  1236. }, c.prototype._popMask = function(a) {
  1237. a.popMask()
  1238. }, c.prototype.drawCacheTexture = function(b) {
  1239. var c, d, e, f;
  1240. return 0 == this._cacheAsBitmap ? !1 : (c = this.getBounds(a.Rectangle.identity), d = a.MainContext.instance.rendererContext._texture_scale_factor, (this._cacheDirty || null == this._texture_to_render || Math.round(c.width) != Math.round(this._texture_to_render._sourceWidth * d) || Math.round(c.height) != Math.round(this._texture_to_render._sourceHeight * d)) && (this._cacheDirty = !this._makeBitmapCache()), null == this._texture_to_render ? !1 : (e = this._texture_to_render, c = e._offsetX, d = e._offsetY, f = e._textureWidth, e = e._textureHeight, this._updateTransform(), b.setAlpha(this.worldAlpha, this.blendMode), b.setTransform(this._worldTransform), a.RenderFilter.getInstance().drawImage(b, this, 0, 0, f, e, c, d, f, e), !0))
  1241. }, c.prototype._updateTransform = function() {
  1242. this._visible && (this._calculateWorldTransform(), "updateTransform" == a.MainContext._renderLoopPhase && (this.needDraw || this._texture_to_render || this._cacheAsBitmap) && a.RenderCommand.push(this._draw, this))
  1243. }, c.prototype._calculateWorldTransform = function() {
  1244. var c, a = this._worldTransform,
  1245. b = this._parent;
  1246. a.identityMatrix(b._worldTransform), this._getMatrix(a), c = this._scrollRect, c && a.append(1, 0, 0, 1, -c.x, -c.y), this.worldAlpha = b.worldAlpha * this._alpha
  1247. }, c.prototype._render = function() {}, c.prototype.getBounds = function(b, c) {
  1248. var d, e, f, g, h, i;
  1249. return void 0 === c && (c = !0), d = this._measureBounds(), e = this._hasWidthSet ? this._explicitWidth : d.width, f = this._hasHeightSet ? this._explicitHeight : d.height, this._rectW = d.width, this._rectH = d.height, this._clearSizeDirty(), g = d.x, d = d.y, h = 0, i = 0, c && (0 != this._anchorX || 0 != this._anchorY ? (h = e * this._anchorX, i = f * this._anchorY) : (h = this._anchorOffsetX, i = this._anchorOffsetY)), this._cacheBounds.initialize(g - h, d - i, e, f), e = this._cacheBounds, b || (b = new a.Rectangle), b.initialize(e.x, e.y, e.width, e.height)
  1250. }, c.prototype.destroyCacheBounds = function() {
  1251. this._cacheBounds.x = 0, this._cacheBounds.y = 0, this._cacheBounds.width = 0, this._cacheBounds.height = 0
  1252. }, c.prototype._getConcatenatedMatrix = function() {
  1253. var b, d, e;
  1254. for (b = c.identityMatrixForGetConcatenated.identity(), d = this; null != d;) 0 != d._anchorX || 0 != d._anchorY ? (e = d._getSize(a.Rectangle.identity), b.prependTransform(d._x, d._y, d._scaleX, d._scaleY, d._rotation, d._skewX, d._skewY, e.width * d._anchorX, e.height * d._anchorY)) : b.prependTransform(d._x, d._y, d._scaleX, d._scaleY, d._rotation, d._skewX, d._skewY, d._anchorOffsetX, d._anchorOffsetY), d._scrollRect && b.prepend(1, 0, 0, 1, -d._scrollRect.x, -d._scrollRect.y), d = d._parent;
  1255. return b
  1256. }, c.prototype.localToGlobal = function(b, c, d) {
  1257. void 0 === b && (b = 0), void 0 === c && (c = 0);
  1258. var e = this._getConcatenatedMatrix();
  1259. return e.append(1, 0, 0, 1, b, c), d || (d = new a.Point), d.x = e.tx, d.y = e.ty, d
  1260. }, c.prototype.globalToLocal = function(b, c, d) {
  1261. void 0 === b && (b = 0), void 0 === c && (c = 0);
  1262. var e = this._getConcatenatedMatrix();
  1263. return e.invert(), e.append(1, 0, 0, 1, b, c), d || (d = new a.Point), d.x = e.tx, d.y = e.ty, d
  1264. }, c.prototype.hitTest = function(b, c, d) {
  1265. return void 0 === d && (d = !1), this._visible && (d || this._touchEnabled) ? (d = this.getBounds(a.Rectangle.identity, !1), b -= d.x, c -= d.y, b >= 0 && b < d.width && c >= 0 && c < d.height ? this.mask || this._scrollRect ? this._scrollRect && b > this._scrollRect.x && c > this._scrollRect.y && b < this._scrollRect.x + this._scrollRect.width && c < this._scrollRect.y + this._scrollRect.height || this.mask && this.mask.x <= b && b < this.mask.x + this.mask.width && this.mask.y <= c && c < this.mask.y + this.mask.height ? this : null : this : null) : null
  1266. }, c.prototype.hitTestPoint = function(b, c, d) {
  1267. return b = this.globalToLocal(b, c), d ? (this._hitTestPointTexture || (this._hitTestPointTexture = new a.RenderTexture), d = this._hitTestPointTexture, d.drawToTexture(this), 0 != d.getPixel32(b.x - this._hitTestPointTexture._offsetX, b.y - this._hitTestPointTexture._offsetY)[3] ? !0 : !1) : !!this.hitTest(b.x, b.y, !0)
  1268. }, c.prototype._getMatrix = function(b) {
  1269. var c, d, e;
  1270. return b || (b = a.Matrix.identity.identity()), d = this._getOffsetPoint(), c = d.x, d = d.y, e = this.__hack_local_matrix, e ? (b.append(e.a, e.b, e.c, e.d, e.tx, e.ty), b.append(1, 0, 0, 1, -c, -d)) : b.appendTransform(this._x, this._y, this._scaleX, this._scaleY, this._rotation, this._skewX, this._skewY, c, d), b
  1271. }, c.prototype._getSize = function(a) {
  1272. return this._hasHeightSet && this._hasWidthSet ? (this._clearSizeDirty(), a.initialize(0, 0, this._explicitWidth, this._explicitHeight)) : (this._measureSize(a), this._hasWidthSet && (a.width = this._explicitWidth), this._hasHeightSet && (a.height = this._explicitHeight), a)
  1273. }, c.prototype._measureSize = function(a) {
  1274. return this._sizeDirty ? (a = this._measureBounds(), this._rectW = a.width, this._rectH = a.height, this._clearSizeDirty()) : (a.width = this._rectW, a.height = this._rectH), a.x = 0, a.y = 0, a
  1275. }, c.prototype._measureBounds = function() {
  1276. return a.Rectangle.identity.initialize(0, 0, 0, 0)
  1277. }, c.prototype._getOffsetPoint = function() {
  1278. var d, b = this._anchorOffsetX,
  1279. c = this._anchorOffsetY;
  1280. return (0 != this._anchorX || 0 != this._anchorY) && (c = this._getSize(a.Rectangle.identity), b = this._anchorX * c.width, c = this._anchorY * c.height), d = a.Point.identity, d.x = b, d.y = c, d
  1281. }, c.prototype._onAddToStage = function() {
  1282. this._stage = a.MainContext.instance.stage, a.DisplayObjectContainer.__EVENT__ADD_TO_STAGE_LIST.push(this)
  1283. }, c.prototype._onRemoveFromStage = function() {
  1284. a.DisplayObjectContainer.__EVENT__REMOVE_FROM_STAGE_LIST.push(this)
  1285. }, Object.defineProperty(c.prototype, "stage", {
  1286. get: function() {
  1287. return this._stage
  1288. },
  1289. enumerable: !0,
  1290. configurable: !0
  1291. }), c.prototype.addEventListener = function(d, e, f, g, h) {
  1292. void 0 === g && (g = !1), void 0 === h && (h = 0), b.prototype.addEventListener.call(this, d, e, f, g, h), ((g = d == a.Event.ENTER_FRAME) || d == a.Event.RENDER) && this._insertEventBin(g ? c._enterFrameCallBackList : c._renderCallBackList, e, f, h, this)
  1293. }, c.prototype.removeEventListener = function(d, e, f, g) {
  1294. void 0 === g && (g = !1), b.prototype.removeEventListener.call(this, d, e, f, g), ((g = d == a.Event.ENTER_FRAME) || d == a.Event.RENDER) && this._removeEventBin(g ? c._enterFrameCallBackList : c._renderCallBackList, e, f, this)
  1295. }, c.prototype.dispatchEvent = function(a) {
  1296. if (!a._bubbles) return b.prototype.dispatchEvent.call(this, a);
  1297. for (var c = [], d = this; d;) c.push(d), d = d._parent;
  1298. return a._reset(), this._dispatchPropagationEvent(a, c), !a._isDefaultPrevented
  1299. }, c.prototype._dispatchPropagationEvent = function(a, b, c) {
  1300. var d, e, f;
  1301. for (c = b.length, d = 1, e = c - 1; e >= 0; e--)
  1302. if (f = b[e], a._currentTarget = f, a._target = this, a._eventPhase = d, f._notifyListener(a), a._isPropagationStopped || a._isPropagationImmediateStopped) return;
  1303. if (f = b[0], a._currentTarget = f, a._target = this, a._eventPhase = 2, f._notifyListener(a), !a._isPropagationStopped && !a._isPropagationImmediateStopped)
  1304. for (d = 3, e = 1; c > e && (f = b[e], a._currentTarget = f, a._target = this, a._eventPhase = d, f._notifyListener(a), !a._isPropagationStopped && !a._isPropagationImmediateStopped); e++);
  1305. }, c.prototype.willTrigger = function(a) {
  1306. for (var b = this; b;) {
  1307. if (b.hasEventListener(a)) return !0;
  1308. b = b._parent
  1309. }
  1310. return !1
  1311. }, Object.defineProperty(c.prototype, "cacheAsBitmap", {
  1312. get: function() {
  1313. return this._cacheAsBitmap
  1314. },
  1315. set: function(b) {
  1316. (this._cacheAsBitmap = b) ? a.callLater(this._makeBitmapCache, this): this._texture_to_render = null
  1317. },
  1318. enumerable: !0,
  1319. configurable: !0
  1320. }), c.prototype._makeBitmapCache = function() {
  1321. this.renderTexture || (this.renderTexture = new a.RenderTexture);
  1322. var b = this.renderTexture.drawToTexture(this);
  1323. return this._texture_to_render = b ? this.renderTexture : null, b
  1324. }, c.prototype._setCacheDirty = function(a) {
  1325. void 0 === a && (a = !0), this._cacheDirty = a
  1326. }, c.getTransformBounds = function(a, b) {
  1327. var g, h, i, j, k, l, m, n, c = a.x,
  1328. d = a.y,
  1329. e = a.width,
  1330. f = a.height;
  1331. return (c || d) && b.appendTransform(0, 0, 1, 1, 0, 0, 0, -c, -d), g = e * b.a, e *= b.b, h = f * b.c, f *= b.d, i = b.tx, j = b.ty, k = i, l = i, m = j, n = j, (c = g + i) < k ? k = c : c > l && (l = c), (c = g + h + i) < k ? k = c : c > l && (l = c), (c = h + i) < k ? k = c : c > l && (l = c), (d = e + j) < m ? m = d : d > n && (n = d), (d = e + f + j) < m ? m = d : d > n && (n = d), (d = f + j) < m ? m = d : d > n && (n = d), a.initialize(k, m, l - k, n - m)
  1332. }, Object.defineProperty(c.prototype, "colorTransform", {
  1333. get: function() {
  1334. return this._colorTransform
  1335. },
  1336. set: function(a) {
  1337. this._colorTransform = a
  1338. },
  1339. enumerable: !0,
  1340. configurable: !0
  1341. }), Object.defineProperty(c.prototype, "filter", {
  1342. get: function() {
  1343. return this._filter
  1344. },
  1345. set: function(a) {
  1346. this._filter = a
  1347. },
  1348. enumerable: !0,
  1349. configurable: !0
  1350. }), c.identityMatrixForGetConcatenated = new a.Matrix, c._enterFrameCallBackList = [], c._renderCallBackList = [], c
  1351. }(a.EventDispatcher);
  1352. a.DisplayObject = b, b.prototype.__class__ = "egret.DisplayObject", b = function() {
  1353. function a() {
  1354. this.matrix = null
  1355. }
  1356. return a.prototype.updateColor = function() {}, a
  1357. }(), a.ColorTransform = b, b.prototype.__class__ = "egret.ColorTransform"
  1358. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  1359. function c() {
  1360. this.constructor = a
  1361. }
  1362. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  1363. c.prototype = b.prototype, a.prototype = new c
  1364. },
  1365. function(a) {
  1366. var b = function(b) {
  1367. function c() {
  1368. b.call(this), this._touchChildren = !0, this._children = [], this._isContainer = !0
  1369. }
  1370. return __extends(c, b), Object.defineProperty(c.prototype, "touchChildren", {
  1371. get: function() {
  1372. return this._touchChildren
  1373. },
  1374. set: function(a) {
  1375. this._touchChildren = a
  1376. },
  1377. enumerable: !0,
  1378. configurable: !0
  1379. }), Object.defineProperty(c.prototype, "numChildren", {
  1380. get: function() {
  1381. return this._children.length
  1382. },
  1383. enumerable: !0,
  1384. configurable: !0
  1385. }), c.prototype.setChildIndex = function(a, b) {
  1386. this.doSetChildIndex(a, b)
  1387. }, c.prototype.doSetChildIndex = function(b, c) {
  1388. var d = this._children.indexOf(b);
  1389. 0 > d && a.Logger.fatalWithErrorId(1006), this._children.splice(d, 1), 0 > c || this._children.length <= c ? this._children.push(b) : this._children.splice(c, 0, b)
  1390. }, c.prototype.addChild = function(a) {
  1391. var b = this._children.length;
  1392. return a._parent == this && b--, this._doAddChild(a, b)
  1393. }, c.prototype.addChildAt = function(a, b) {
  1394. return this._doAddChild(a, b)
  1395. }, c.prototype._doAddChild = function(b, d, e) {
  1396. var f, g;
  1397. if (void 0 === e && (e = !0), b == this) return b;
  1398. if (0 > d || d > this._children.length) return a.Logger.fatalWithErrorId(1007), b;
  1399. if (f = b._parent, f == this) return this.doSetChildIndex(b, d), b;
  1400. if (f && (g = f._children.indexOf(b), g >= 0 && f._doRemoveChild(g)), this._children.splice(d, 0, b), b._parentChanged(this), e && b.dispatchEventWith(a.Event.ADDED, !0), this._stage)
  1401. for (b._onAddToStage(), d = c.__EVENT__ADD_TO_STAGE_LIST; 0 < d.length;) f = d.shift(), e && f.dispatchEventWith(a.Event.ADDED_TO_STAGE);
  1402. return b._setDirty(), this._setSizeDirty(), b
  1403. }, c.prototype.removeChild = function(b) {
  1404. return b = this._children.indexOf(b), b >= 0 ? this._doRemoveChild(b) : (a.Logger.fatalWithErrorId(1008), null)
  1405. }, c.prototype.removeChildAt = function(b) {
  1406. return b >= 0 && b < this._children.length ? this._doRemoveChild(b) : (a.Logger.fatalWithErrorId(1007), null)
  1407. }, c.prototype._doRemoveChild = function(b, d) {
  1408. var e, f, g, h;
  1409. if (void 0 === d && (d = !0), e = this._children, f = e[b], d && f.dispatchEventWith(a.Event.REMOVED, !0), this._stage)
  1410. for (f._onRemoveFromStage(), g = c.__EVENT__REMOVE_FROM_STAGE_LIST; 0 < g.length;) h = g.shift(), d && h.dispatchEventWith(a.Event.REMOVED_FROM_STAGE), h._stage = null;
  1411. return f._parentChanged(null), e.splice(b, 1), this._setSizeDirty(), f
  1412. }, c.prototype.getChildAt = function(b) {
  1413. return b >= 0 && b < this._children.length ? this._children[b] : (a.Logger.fatalWithErrorId(1007), null)
  1414. }, c.prototype.contains = function(a) {
  1415. for (; a;) {
  1416. if (a == this) return !0;
  1417. a = a._parent
  1418. }
  1419. return !1
  1420. }, c.prototype.swapChildrenAt = function(b, c) {
  1421. b >= 0 && b < this._children.length && c >= 0 && c < this._children.length ? this._swapChildrenAt(b, c) : a.Logger.fatalWithErrorId(1007)
  1422. }, c.prototype.swapChildren = function(b, c) {
  1423. var d = this._children.indexOf(b),
  1424. e = this._children.indexOf(c); - 1 == d || -1 == e ? a.Logger.fatalWithErrorId(1008) : this._swapChildrenAt(d, e)
  1425. }, c.prototype._swapChildrenAt = function(a, b) {
  1426. if (a != b) {
  1427. var c = this._children,
  1428. d = c[a];
  1429. c[a] = c[b], c[b] = d
  1430. }
  1431. }, c.prototype.getChildIndex = function(a) {
  1432. return this._children.indexOf(a)
  1433. }, c.prototype.removeChildren = function() {
  1434. for (var a = this._children.length - 1; a >= 0; a--) this._doRemoveChild(a)
  1435. }, c.prototype._updateTransform = function() {
  1436. var c, d, e;
  1437. if (this._visible) {
  1438. if (this._filter && a.RenderCommand.push(this._setGlobalFilter, this), this._colorTransform && a.RenderCommand.push(this._setGlobalColorTransform, this), c = this.mask || this._scrollRect, c && a.RenderCommand.push(this._pushMask, this), b.prototype._updateTransform.call(this), !this._cacheAsBitmap || !this._texture_to_render)
  1439. for (d = 0, e = this._children.length; e > d; d++) this._children[d]._updateTransform();
  1440. c && a.RenderCommand.push(this._popMask, this), this._colorTransform && a.RenderCommand.push(this._removeGlobalColorTransform, this), this._filter && a.RenderCommand.push(this._removeGlobalFilter, this)
  1441. }
  1442. }, c.prototype._render = function(b) {
  1443. if (!a.MainContext.__use_new_draw)
  1444. for (var c = 0, d = this._children.length; d > c; c++) this._children[c]._draw(b)
  1445. }, c.prototype._measureBounds = function() {
  1446. var b, c, d, e, f, g, h, i, j, k, l;
  1447. for (b = 0, c = 0, d = 0, e = 0, f = this._children.length, g = 0; f > g; g++) h = this._children[g], h._visible && (i = h.getBounds(a.Rectangle.identity, !1), j = i.x, k = i.y, l = i.width, i = i.height, h = h._getMatrix(), h = a.DisplayObject.getTransformBounds(a.Rectangle.identity.initialize(j, k, l, i), h), j = h.x, k = h.y, l = h.width + h.x, h = h.height + h.y, (b > j || 0 == g) && (b = j), (l > c || 0 == g) && (c = l), (d > k || 0 == g) && (d = k), (h > e || 0 == g) && (e = h));
  1448. return a.Rectangle.identity.initialize(b, d, c - b, e - d)
  1449. }, c.prototype.hitTest = function(c, d, e) {
  1450. var f, g, h, i, j, k, l;
  1451. if (void 0 === e && (e = !1), !this._visible) return null;
  1452. if (this._scrollRect) {
  1453. if (c < this._scrollRect.x || d < this._scrollRect.y || c > this._scrollRect.x + this._scrollRect.width || d > this._scrollRect.y + this._scrollRect.height) return null
  1454. } else if (this.mask && (this.mask.x > c || c > this.mask.x + this.mask.width || this.mask.y > d || d > this.mask.y + this.mask.height)) return null;
  1455. for (g = this._children, h = this._touchChildren, i = g.length - 1; i >= 0; i--)
  1456. if (j = g[i], k = j._getMatrix(), l = j._scrollRect, l && k.append(1, 0, 0, 1, -l.x, -l.y), k.invert(), k = a.Matrix.transformCoords(k, c, d), j = j.hitTest(k.x, k.y, !0)) {
  1457. if (!h) return this;
  1458. if (j._touchEnabled && h) return j;
  1459. f = this
  1460. }
  1461. return f ? f : this._texture_to_render ? b.prototype.hitTest.call(this, c, d, e) : null
  1462. }, c.prototype._onAddToStage = function() {
  1463. b.prototype._onAddToStage.call(this);
  1464. for (var a = this._children.length, c = 0; a > c; c++) this._children[c]._onAddToStage()
  1465. }, c.prototype._onRemoveFromStage = function() {
  1466. b.prototype._onRemoveFromStage.call(this);
  1467. for (var a = this._children.length, c = 0; a > c; c++) this._children[c]._onRemoveFromStage()
  1468. }, c.prototype.getChildByName = function(a) {
  1469. for (var b, c = this._children, d = c.length, e = 0; d > e; e++)
  1470. if (b = c[e], b.name == a) return b;
  1471. return null
  1472. }, c.__EVENT__ADD_TO_STAGE_LIST = [], c.__EVENT__REMOVE_FROM_STAGE_LIST = [], c
  1473. }(a.DisplayObject);
  1474. a.DisplayObjectContainer = b, b.prototype.__class__ = "egret.DisplayObjectContainer"
  1475. }(egret || (egret = {})),
  1476. function(a) {
  1477. var b = function() {
  1478. function a() {}
  1479. return a.NO_BORDER = "noBorder", a.NO_SCALE = "noScale", a.SHOW_ALL = "showAll", a.EXACT_FIT = "exactFit", a
  1480. }();
  1481. a.StageScaleMode = b, b.prototype.__class__ = "egret.StageScaleMode"
  1482. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  1483. function c() {
  1484. this.constructor = a
  1485. }
  1486. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  1487. c.prototype = b.prototype, a.prototype = new c
  1488. },
  1489. function(a) {
  1490. var b = function(b) {
  1491. function c(a, c) {
  1492. void 0 === a && (a = 480), void 0 === c && (c = 800), b.call(this), this._changeSizeDispatchFlag = !0, this._scaleMode = "", this._stageHeight = this._stageWidth = 0 / 0, this.touchEnabled = !0, this._stage = this, this._stageWidth = a, this._stageHeight = c
  1493. }
  1494. return __extends(c, b), c.prototype.invalidate = function() {
  1495. c._invalidateRenderFlag = !0
  1496. }, Object.defineProperty(c.prototype, "scaleMode", {
  1497. get: function() {
  1498. return this._scaleMode
  1499. },
  1500. set: function(a) {
  1501. this._scaleMode != a && (this._scaleMode = a, this.setResolutionPolicy())
  1502. },
  1503. enumerable: !0,
  1504. configurable: !0
  1505. }), c.prototype.changeSize = function() {
  1506. this._changeSizeDispatchFlag && (this.setResolutionPolicy(), this.dispatchEventWith(a.Event.RESIZE))
  1507. }, c.prototype.setResolutionPolicy = function() {
  1508. var d, b = c.SCALE_MODE_ENUM[this._scaleMode];
  1509. if (!b) throw Error(a.getString(1024));
  1510. d = new a.EqualToFrame, b = new a.ResolutionPolicy(d, b), a.StageDelegate.getInstance()._setResolutionPolicy(b), this._stageWidth = a.StageDelegate.getInstance()._stageWidth, this._stageHeight = a.StageDelegate.getInstance()._stageHeight
  1511. }, Object.defineProperty(c.prototype, "stageWidth", {
  1512. get: function() {
  1513. return this._stageWidth
  1514. },
  1515. enumerable: !0,
  1516. configurable: !0
  1517. }), Object.defineProperty(c.prototype, "stageHeight", {
  1518. get: function() {
  1519. return this._stageHeight
  1520. },
  1521. enumerable: !0,
  1522. configurable: !0
  1523. }), c.prototype.hitTest = function(b, c, d) {
  1524. var e, f, g, h;
  1525. if (!this._touchEnabled) return null;
  1526. if (!this._touchChildren) return this;
  1527. for (d = this._children, f = d.length - 1; f >= 0; f--)
  1528. if (e = d[f], g = e._getMatrix(), h = e._scrollRect, h && g.append(1, 0, 0, 1, -h.x, -h.y), g.invert(), g = a.Matrix.transformCoords(g, b, c), (e = e.hitTest(g.x, g.y, !0)) && e._touchEnabled) return e;
  1529. return this
  1530. }, c.prototype.getBounds = function(b) {
  1531. return b || (b = new a.Rectangle), b.initialize(0, 0, this._stageWidth, this._stageHeight)
  1532. }, c.prototype._updateTransform = function() {
  1533. for (var a = 0, b = this._children.length; b > a; a++) this._children[a]._updateTransform()
  1534. }, Object.defineProperty(c.prototype, "focus", {
  1535. get: function() {
  1536. return null
  1537. },
  1538. enumerable: !0,
  1539. configurable: !0
  1540. }), c.registerScaleMode = function(b, d, e) {
  1541. c.SCALE_MODE_ENUM[b] && !e ? a.Logger.warningWithErrorId(1009, b) : c.SCALE_MODE_ENUM[b] = d
  1542. }, c._invalidateRenderFlag = !1, c.SCALE_MODE_ENUM = {}, c
  1543. }(a.DisplayObjectContainer);
  1544. a.Stage = b, b.prototype.__class__ = "egret.Stage"
  1545. }(egret || (egret = {})), egret.Stage.SCALE_MODE_ENUM[egret.StageScaleMode.NO_SCALE] = new egret.NoScale, egret.Stage.SCALE_MODE_ENUM[egret.StageScaleMode.SHOW_ALL] = new egret.ShowAll, egret.Stage.SCALE_MODE_ENUM[egret.StageScaleMode.NO_BORDER] = new egret.FixedWidth, egret.Stage.SCALE_MODE_ENUM[egret.StageScaleMode.EXACT_FIT] = new egret.FullScreen, __extends = this.__extends || function(a, b) {
  1546. function c() {
  1547. this.constructor = a
  1548. }
  1549. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  1550. c.prototype = b.prototype, a.prototype = new c
  1551. },
  1552. function(a) {
  1553. var b = function(b) {
  1554. function c(c) {
  1555. void 0 === c && (c = null), b.call(this), this._lastTouchPosition = new a.Point(0, 0), this._touchStartPosition = new a.Point(0, 0), this._scrollStarted = !1, this._lastTouchTime = 0, this._lastTouchEvent = null, this._velocitys = [], this._isVTweenPlaying = this._isHTweenPlaying = !1, this._vScrollTween = this._hScrollTween = null, this.scrollBeginThreshold = 10, this.scrollSpeed = 1, this._content = null, this._horizontalScrollPolicy = this._verticalScrollPolicy = "auto", this._scrollTop = this._scrollLeft = 0, this._vCanScroll = this._hCanScroll = !1, this.touchBeginTimer = this.delayTouchBeginEvent = null, this.touchEnabled = !0, c && this.setContent(c)
  1556. }
  1557. return __extends(c, b), c.prototype.setContent = function(a) {
  1558. this._content !== a && (this.removeContent(), a && (this._content = a, b.prototype.addChild.call(this, a), this._addEvents()))
  1559. }, c.prototype.removeContent = function() {
  1560. this._content && (this._removeEvents(), b.prototype.removeChildAt.call(this, 0)), this._content = null
  1561. }, Object.defineProperty(c.prototype, "verticalScrollPolicy", {
  1562. get: function() {
  1563. return this._verticalScrollPolicy
  1564. },
  1565. set: function(a) {
  1566. a != this._verticalScrollPolicy && (this._verticalScrollPolicy = a)
  1567. },
  1568. enumerable: !0,
  1569. configurable: !0
  1570. }), Object.defineProperty(c.prototype, "horizontalScrollPolicy", {
  1571. get: function() {
  1572. return this._horizontalScrollPolicy
  1573. },
  1574. set: function(a) {
  1575. a != this._horizontalScrollPolicy && (this._horizontalScrollPolicy = a)
  1576. },
  1577. enumerable: !0,
  1578. configurable: !0
  1579. }), Object.defineProperty(c.prototype, "scrollLeft", {
  1580. get: function() {
  1581. return this._scrollLeft
  1582. },
  1583. set: function(a) {
  1584. a != this._scrollLeft && (this._scrollLeft = a, this._validatePosition(!1, !0), this._updateContentPosition())
  1585. },
  1586. enumerable: !0,
  1587. configurable: !0
  1588. }), Object.defineProperty(c.prototype, "scrollTop", {
  1589. get: function() {
  1590. return this._scrollTop
  1591. },
  1592. set: function(a) {
  1593. a != this._scrollTop && (this._scrollTop = a, this._validatePosition(!0, !1), this._updateContentPosition())
  1594. },
  1595. enumerable: !0,
  1596. configurable: !0
  1597. }), c.prototype.setScrollPosition = function(a, b, c) {
  1598. if (void 0 === c && (c = !1), !(c && 0 == a && 0 == b || !c && this._scrollTop == a && this._scrollLeft == b)) {
  1599. if (c) {
  1600. c = this._isOnTheEdge(!0);
  1601. var d = this._isOnTheEdge(!1);
  1602. this._scrollTop += c ? a / 2 : a, this._scrollLeft += d ? b / 2 : b
  1603. } else this._scrollTop = a, this._scrollLeft = b;
  1604. this._validatePosition(!0, !0), this._updateContentPosition()
  1605. }
  1606. }, c.prototype._isOnTheEdge = function(a) {
  1607. void 0 === a && (a = !0);
  1608. var b = this._scrollTop,
  1609. c = this._scrollLeft;
  1610. return a ? 0 > b || b > this.getMaxScrollTop() : 0 > c || c > this.getMaxScrollLeft()
  1611. }, c.prototype._validatePosition = function(a, b) {
  1612. if (void 0 === a && (a = !1), void 0 === b && (b = !1), a) {
  1613. var c = this.height,
  1614. d = this._getContentHeight();
  1615. this._scrollTop = Math.max(this._scrollTop, (0 - c) / 2), this._scrollTop = Math.min(this._scrollTop, d > c ? d - c / 2 : c / 2)
  1616. }
  1617. b && (c = this.width, d = this._getContentWidth(), this._scrollLeft = Math.max(this._scrollLeft, (0 - c) / 2), this._scrollLeft = Math.min(this._scrollLeft, d > c ? d - c / 2 : c / 2))
  1618. }, c.prototype._setWidth = function(a) {
  1619. this._explicitWidth != a && (b.prototype._setWidth.call(this, a), this._updateContentPosition())
  1620. }, c.prototype._setHeight = function(a) {
  1621. this._explicitHeight != a && (b.prototype._setHeight.call(this, a), this._updateContentPosition())
  1622. }, c.prototype._updateContentPosition = function() {
  1623. var b = this.getBounds(a.Rectangle.identity);
  1624. this.scrollRect = new a.Rectangle(this._scrollLeft, this._scrollTop, b.width, b.height), this.dispatchEvent(new a.Event(a.Event.CHANGE))
  1625. }, c.prototype._checkScrollPolicy = function() {
  1626. var b, a = this.__checkScrollPolicy(this._horizontalScrollPolicy, this._getContentWidth(), this.width);
  1627. return this._hCanScroll = a, b = this.__checkScrollPolicy(this._verticalScrollPolicy, this._getContentHeight(), this.height), this._vCanScroll = b, a || b
  1628. }, c.prototype.__checkScrollPolicy = function(a, b, c) {
  1629. return "on" == a ? !0 : "off" == a ? !1 : b > c
  1630. }, c.prototype._addEvents = function() {
  1631. this.addEventListener(a.TouchEvent.TOUCH_BEGIN, this._onTouchBegin, this), this.addEventListener(a.TouchEvent.TOUCH_BEGIN, this._onTouchBeginCapture, this, !0), this.addEventListener(a.TouchEvent.TOUCH_END, this._onTouchEndCapture, this, !0)
  1632. }, c.prototype._removeEvents = function() {
  1633. this.removeEventListener(a.TouchEvent.TOUCH_BEGIN, this._onTouchBegin, this), this.removeEventListener(a.TouchEvent.TOUCH_BEGIN, this._onTouchBeginCapture, this, !0), this.removeEventListener(a.TouchEvent.TOUCH_END, this._onTouchEndCapture, this, !0)
  1634. }, c.prototype._onTouchBegin = function(b) {
  1635. !b._isDefaultPrevented && this._checkScrollPolicy() && (this._touchStartPosition.x = b.stageX, this._touchStartPosition.y = b.stageY, (this._isHTweenPlaying || this._isVTweenPlaying) && this._onScrollFinished(), this.stage.addEventListener(a.TouchEvent.TOUCH_MOVE, this._onTouchMove, this), this.stage.addEventListener(a.TouchEvent.TOUCH_END, this._onTouchEnd, this), this.stage.addEventListener(a.TouchEvent.LEAVE_STAGE, this._onTouchEnd, this), this.addEventListener(a.Event.ENTER_FRAME, this._onEnterFrame, this), this._logTouchEvent(b), b.preventDefault())
  1636. }, c.prototype._onTouchBeginCapture = function(b) {
  1637. var d, c = this._checkScrollPolicy();
  1638. if (c) {
  1639. for (d = b.target; d != this;) {
  1640. if ("_checkScrollPolicy" in d && (c = d._checkScrollPolicy())) return;
  1641. d = d.parent
  1642. }
  1643. b.stopPropagation(), this.delayTouchBeginEvent = this.cloneTouchEvent(b), this.touchBeginTimer || (this.touchBeginTimer = new a.Timer(100, 1), this.touchBeginTimer.addEventListener(a.TimerEvent.TIMER_COMPLETE, this._onTouchBeginTimer, this)), this.touchBeginTimer.start(), this._onTouchBegin(b)
  1644. }
  1645. }, c.prototype._onTouchEndCapture = function() {
  1646. this.delayTouchBeginEvent && this._onTouchBeginTimer()
  1647. }, c.prototype._onTouchBeginTimer = function() {
  1648. this.touchBeginTimer.stop();
  1649. var a = this.delayTouchBeginEvent;
  1650. this.delayTouchBeginEvent = null, this.stage && this.dispatchPropagationEvent(a)
  1651. }, c.prototype.dispatchPropagationEvent = function(a) {
  1652. for (var b = [], c = a._target, d = 0; c;) c == this && (d = b.length), b.push(c), c = c.parent;
  1653. c = b.slice(0, d), c = c.reverse(), b = c.concat(b), this._dispatchPropagationEvent(a, b, d)
  1654. }, c.prototype._dispatchPropagationEvent = function(a, b, c) {
  1655. var d, e, f;
  1656. for (d = b.length, e = 0; d > e && (f = b[e], a._currentTarget = f, a._eventPhase = c > e ? 1 : e == c ? 2 : 3, f._notifyListener(a), !a._isPropagationStopped && !a._isPropagationImmediateStopped); e++);
  1657. }, c.prototype._onTouchMove = function(a) {
  1658. if (this._lastTouchPosition.x != a.stageX || this._lastTouchPosition.y != a.stageY) {
  1659. if (!this._scrollStarted) {
  1660. var b = a.stageX - this._touchStartPosition.x,
  1661. c = a.stageY - this._touchStartPosition.y;
  1662. if (Math.sqrt(b * b + c * c) < this.scrollBeginThreshold) return void this._logTouchEvent(a)
  1663. }
  1664. this._scrollStarted = !0, this.delayTouchBeginEvent && (this.delayTouchBeginEvent = null, this.touchBeginTimer.stop()), this.touchChildren = !1, b = this._getPointChange(a), this.setScrollPosition(b.y, b.x, !0), this._calcVelocitys(a), this._logTouchEvent(a)
  1665. }
  1666. }, c.prototype._onTouchEnd = function() {
  1667. this.touchChildren = !0, this._scrollStarted = !1, a.MainContext.instance.stage.removeEventListener(a.TouchEvent.TOUCH_MOVE, this._onTouchMove, this), a.MainContext.instance.stage.removeEventListener(a.TouchEvent.TOUCH_END, this._onTouchEnd, this), a.MainContext.instance.stage.removeEventListener(a.TouchEvent.LEAVE_STAGE, this._onTouchEnd, this), this.removeEventListener(a.Event.ENTER_FRAME, this._onEnterFrame, this), this._moveAfterTouchEnd()
  1668. }, c.prototype._onEnterFrame = function(b) {
  1669. b = a.getTimer(), 100 < b - this._lastTouchTime && 300 > b - this._lastTouchTime && this._calcVelocitys(this._lastTouchEvent)
  1670. }, c.prototype._logTouchEvent = function(b) {
  1671. this._lastTouchPosition.x = b.stageX, this._lastTouchPosition.y = b.stageY, this._lastTouchEvent = this.cloneTouchEvent(b), this._lastTouchTime = a.getTimer()
  1672. }, c.prototype._getPointChange = function(a) {
  1673. return {
  1674. x: !1 === this._hCanScroll ? 0 : this._lastTouchPosition.x - a.stageX,
  1675. y: !1 === this._vCanScroll ? 0 : this._lastTouchPosition.y - a.stageY
  1676. }
  1677. }, c.prototype._calcVelocitys = function(b) {
  1678. var d, c = a.getTimer();
  1679. 0 == this._lastTouchTime ? this._lastTouchTime = c : (d = this._getPointChange(b), c -= this._lastTouchTime, d.x /= c, d.y /= c, this._velocitys.push(d), 5 < this._velocitys.length && this._velocitys.shift(), this._lastTouchPosition.x = b.stageX, this._lastTouchPosition.y = b.stageY)
  1680. }, c.prototype._getContentWidth = function() {
  1681. return this._content.explicitWidth || this._content.width
  1682. }, c.prototype._getContentHeight = function() {
  1683. return this._content.explicitHeight || this._content.height
  1684. }, c.prototype.getMaxScrollLeft = function() {
  1685. var a = this._getContentWidth() - this.width;
  1686. return Math.max(0, a)
  1687. }, c.prototype.getMaxScrollTop = function() {
  1688. var a = this._getContentHeight() - this.height;
  1689. return Math.max(0, a)
  1690. }, c.prototype._moveAfterTouchEnd = function() {
  1691. var a, b, d, e, f, g;
  1692. if (0 != this._velocitys.length) {
  1693. for (a = 0, b = 0, d = 0, e = 0; e < this._velocitys.length; e++) f = this._velocitys[e], g = c.weight[e], a += f.x * g, b += f.y * g, d += g;
  1694. this._velocitys.length = 0, 0 >= this.scrollSpeed && (this.scrollSpeed = 1), a = a / d * this.scrollSpeed, b = b / d * this.scrollSpeed, f = Math.abs(a), d = Math.abs(b), g = this.getMaxScrollLeft(), e = this.getMaxScrollTop(), a = f > .02 ? this.getAnimationDatas(a, this._scrollLeft, g) : {
  1695. position: this._scrollLeft,
  1696. duration: 1
  1697. }, b = d > .02 ? this.getAnimationDatas(b, this._scrollTop, e) : {
  1698. position: this._scrollTop,
  1699. duration: 1
  1700. }, this.setScrollLeft(a.position, a.duration), this.setScrollTop(b.position, b.duration)
  1701. }
  1702. }, c.prototype._onTweenFinished = function(a) {
  1703. a == this._vScrollTween && (this._isVTweenPlaying = !1), a == this._hScrollTween && (this._isHTweenPlaying = !1), 0 == this._isHTweenPlaying && 0 == this._isVTweenPlaying && this._onScrollFinished()
  1704. }, c.prototype._onScrollStarted = function() {}, c.prototype._onScrollFinished = function() {
  1705. a.Tween.removeTweens(this), this._vScrollTween = this._hScrollTween = null, this._isVTweenPlaying = this._isHTweenPlaying = !1, this.dispatchEvent(new a.Event(a.Event.COMPLETE))
  1706. }, c.prototype.setScrollTop = function(b, c) {
  1707. var d, e;
  1708. return void 0 === c && (c = 0), d = Math.min(this.getMaxScrollTop(), Math.max(b, 0)), 0 == c ? (this.scrollTop = d, null) : (e = a.Tween.get(this).to({
  1709. scrollTop: b
  1710. }, c, a.Ease.quartOut), d != b && e.to({
  1711. scrollTop: d
  1712. }, 300, a.Ease.quintOut), this._isVTweenPlaying = !0, this._vScrollTween = e, e.call(this._onTweenFinished, this, [e]), this._isHTweenPlaying || this._onScrollStarted(), e)
  1713. }, c.prototype.setScrollLeft = function(b, c) {
  1714. var d, e;
  1715. return void 0 === c && (c = 0), d = Math.min(this.getMaxScrollLeft(), Math.max(b, 0)), 0 == c ? (this.scrollLeft = d, null) : (e = a.Tween.get(this).to({
  1716. scrollLeft: b
  1717. }, c, a.Ease.quartOut), d != b && e.to({
  1718. scrollLeft: d
  1719. }, 300, a.Ease.quintOut), this._isHTweenPlaying = !0, this._hScrollTween = e, e.call(this._onTweenFinished, this, [e]), this._isVTweenPlaying || this._onScrollStarted(), e)
  1720. }, c.prototype.getAnimationDatas = function(a, b, c) {
  1721. var d = Math.abs(a),
  1722. e = 0,
  1723. f = b + 500 * a;
  1724. if (0 > f || f > c)
  1725. for (f = b; 1 / 0 != Math.abs(a) && .02 < Math.abs(a);) f += a, a = 0 > f || f > c ? .95 * .998 * a : .998 * a, e++;
  1726. else e = 500 * -Math.log(.02 / d);
  1727. return {
  1728. position: Math.min(c + 50, Math.max(f, -50)),
  1729. duration: e
  1730. }
  1731. }, c.prototype.cloneTouchEvent = function(b) {
  1732. var c = new a.TouchEvent(b._type, b._bubbles, b.cancelable);
  1733. return c.touchPointID = b.touchPointID, c._stageX = b._stageX, c._stageY = b._stageY, c.ctrlKey = b.ctrlKey, c.altKey = b.altKey, c.shiftKey = b.shiftKey, c.touchDown = b.touchDown, c._isDefaultPrevented = !1, c._target = b._target, c
  1734. }, c.prototype.throwNotSupportedError = function() {
  1735. throw Error(a.getString(1023))
  1736. }, c.prototype.addChild = function() {
  1737. return this.throwNotSupportedError(), null
  1738. }, c.prototype.addChildAt = function() {
  1739. return this.throwNotSupportedError(), null
  1740. }, c.prototype.removeChild = function() {
  1741. return this.throwNotSupportedError(), null
  1742. }, c.prototype.removeChildAt = function() {
  1743. return this.throwNotSupportedError(), null
  1744. }, c.prototype.setChildIndex = function() {
  1745. this.throwNotSupportedError()
  1746. }, c.prototype.swapChildren = function() {
  1747. this.throwNotSupportedError()
  1748. }, c.prototype.swapChildrenAt = function() {
  1749. this.throwNotSupportedError()
  1750. }, c.prototype.hitTest = function(c, d, e) {
  1751. void 0 === e && (e = !1);
  1752. var f = b.prototype.hitTest.call(this, c, d, e);
  1753. return f ? f : a.DisplayObject.prototype.hitTest.call(this, c, d, e)
  1754. }, c.weight = [1, 1.33, 1.66, 2, 2.33], c
  1755. }(a.DisplayObjectContainer);
  1756. a.ScrollView = b, b.prototype.__class__ = "egret.ScrollView"
  1757. }(egret || (egret = {})),
  1758. function(a) {
  1759. var b = function() {
  1760. function a() {}
  1761. return a.REPEAT = "repeat", a.SCALE = "scale", a
  1762. }();
  1763. a.BitmapFillMode = b, b.prototype.__class__ = "egret.BitmapFillMode"
  1764. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  1765. function c() {
  1766. this.constructor = a
  1767. }
  1768. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  1769. c.prototype = b.prototype, a.prototype = new c
  1770. },
  1771. function(a) {
  1772. var b = function(b) {
  1773. function c(a) {
  1774. b.call(this), this.scale9Grid = this._texture = null, this.fillMode = "scale", a && (this._texture = a, this._setSizeDirty()), this.needDraw = !0
  1775. }
  1776. return __extends(c, b), Object.defineProperty(c.prototype, "texture", {
  1777. get: function() {
  1778. return this._texture
  1779. },
  1780. set: function(a) {
  1781. a != this._texture && (this._setSizeDirty(), this._texture = a)
  1782. },
  1783. enumerable: !0,
  1784. configurable: !0
  1785. }), c.prototype._render = function(a) {
  1786. var b = this._texture;
  1787. b ? (this._texture_to_render = b, c._drawBitmap(a, this._hasWidthSet ? this._explicitWidth : b._textureWidth, this._hasHeightSet ? this._explicitHeight : b._textureHeight, this)) : this._texture_to_render = null
  1788. }, c._drawBitmap = function(a, b, d, e) {
  1789. var g, h, i, j, k, l, f = e._texture_to_render;
  1790. f && (g = f._textureWidth, h = f._textureHeight, "scale" == e.fillMode ? (i = e.scale9Grid || f.scale9Grid, i && g - i.width < b && h - i.height < d ? c.drawScale9GridImage(a, e, i, b, d) : (i = f._offsetX, j = f._offsetY, k = f._bitmapWidth || g, l = f._bitmapHeight || h, b /= g, i = Math.round(i * b), b = Math.round(k * b), d /= h, j = Math.round(j * d), d = Math.round(l * d), c.renderFilter.drawImage(a, e, f._bitmapX, f._bitmapY, k, l, i, j, b, d))) : c.drawRepeatImage(a, e, b, d, e.fillMode))
  1791. }, c.drawRepeatImage = function(b, c, d, e, f) {
  1792. var h, i, j, k, l, g = c._texture_to_render;
  1793. g && (h = g._textureWidth, i = g._textureHeight, j = g._bitmapX, k = g._bitmapY, h = g._bitmapWidth || h, i = g._bitmapHeight || i, l = g._offsetX, g = g._offsetY, a.RenderFilter.getInstance().drawImage(b, c, j, k, h, i, l, g, d, e, f))
  1794. }, c.drawScale9GridImage = function(b, c, d, e, f) {
  1795. var i, j, k, l, m, n, o, p, q, r, s, t, u, g = a.MainContext.instance.rendererContext._texture_scale_factor,
  1796. h = c._texture_to_render;
  1797. h && d && (i = h._textureWidth, j = h._textureHeight, k = h._bitmapX, l = h._bitmapY, m = h._bitmapWidth || i, n = h._bitmapHeight || j, e -= i - m, f -= j - n, b.drawImageScale9(h, k, l, m, n, h._offsetX, h._offsetY, e, f, d) || (i = h._offsetX / g, j = h._offsetY / g, h = a.RenderFilter.getInstance(), d = a.Rectangle.identity.initialize(d.x - Math.round(i), d.y - Math.round(i), d.width, d.height), i = Math.round(i), j = Math.round(j), d.y == d.bottom && (d.bottom < n ? d.bottom++ : d.y--), d.x == d.right && (d.right < m ? d.right++ : d.x--), o = k + d.x / g, p = k + d.right / g, q = m - d.right, r = l + d.y / g, g = l + d.bottom / g, s = n - d.bottom, t = i + d.x, u = j + d.y, n = f - (n - d.bottom), m = e - (m - d.right), h.drawImage(b, c, k, l, d.x, d.y, i, j, d.x, d.y), h.drawImage(b, c, o, l, d.width, d.y, t, j, m - d.x, d.y), h.drawImage(b, c, p, l, q, d.y, i + m, j, e - m, d.y), h.drawImage(b, c, k, r, d.x, d.height, i, u, d.x, n - d.y), h.drawImage(b, c, o, r, d.width, d.height, t, u, m - d.x, n - d.y), h.drawImage(b, c, p, r, q, d.height, i + m, u, e - m, n - d.y), h.drawImage(b, c, k, g, d.x, s, i, j + n, d.x, f - n), h.drawImage(b, c, o, g, d.width, s, t, j + n, m - d.x, f - n), h.drawImage(b, c, p, g, q, s, i + m, j + n, e - m, f - n)))
  1798. }, c.prototype._measureBounds = function() {
  1799. var c = this._texture;
  1800. return c ? a.Rectangle.identity.initialize(0, 0, c._textureWidth, c._textureHeight) : b.prototype._measureBounds.call(this)
  1801. }, c.renderFilter = a.RenderFilter.getInstance(), c
  1802. }(a.DisplayObject);
  1803. a.Bitmap = b, b.prototype.__class__ = "egret.Bitmap"
  1804. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  1805. function c() {
  1806. this.constructor = a
  1807. }
  1808. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  1809. c.prototype = b.prototype, a.prototype = new c
  1810. },
  1811. function(a) {
  1812. var b = function(b) {
  1813. function c() {
  1814. b.call(this), this._text = "", this._textChanged = !1, this._font = null, this._fontChanged = !1, this._textOffsetY = this._textOffsetX = this._textHeight = this._textWidth = 0, this.textLinesChange = !0, this._lineHeights = [], this.needDraw = this.cacheAsBitmap = !0
  1815. }
  1816. return __extends(c, b), Object.defineProperty(c.prototype, "text", {
  1817. get: function() {
  1818. return this._text
  1819. },
  1820. set: function(a) {
  1821. this._text != a && (this._textChanged = !0, this._text = a, this._setSizeDirty())
  1822. },
  1823. enumerable: !0,
  1824. configurable: !0
  1825. }), Object.defineProperty(c.prototype, "font", {
  1826. get: function() {
  1827. return this._font
  1828. },
  1829. set: function(a) {
  1830. this._font != a && (this._font = a, this._fontChanged = !0, this._setSizeDirty())
  1831. },
  1832. enumerable: !0,
  1833. configurable: !0
  1834. }), c.prototype._setSizeDirty = function() {
  1835. b.prototype._setSizeDirty.call(this), this.textLinesChange = !0
  1836. }, c.prototype._render = function(b) {
  1837. var f, g, h, i, j, k, l, m, n, o, p, q, r, s, d = this.getTextLines(),
  1838. e = d.length;
  1839. if (0 != e) {
  1840. for (f = this._font, g = f._getFirstCharHeight(), g = Math.ceil(g * c.EMPTY_FACTOR), h = 0, i = this._hasHeightSet ? this._explicitHeight : Number.POSITIVE_INFINITY, j = this._lineHeights, k = 0; e > k && (l = j[k], !(k > 0 && h + l > i)); k++) {
  1841. for (m = d[k], n = m.length, o = 0, p = 0; n > p; p++) q = m.charAt(p), r = f.getTexture(q), r ? (q = r._bitmapWidth || r._textureWidth, s = r._bitmapHeight || r._textureHeight, this._texture_to_render = r, a.RenderFilter.getInstance().drawImage(b, this, r._bitmapX, r._bitmapY, q, s, o + r._offsetX, h + r._offsetY, q, s), o += r._textureWidth) : " " == q ? o += g : a.Logger.warningWithErrorId(1011, q);
  1842. h += l
  1843. }
  1844. this._texture_to_render = null
  1845. }
  1846. }, c.prototype._measureBounds = function() {
  1847. return 0 == this.getTextLines().length ? a.Rectangle.identity.initialize(0, 0, 0, 0) : a.Rectangle.identity.initialize(this._textOffsetX, this._textOffsetY, this._textWidth - this._textOffsetX, this._textHeight - this._textOffsetY)
  1848. }, c.prototype.getTextLines = function() {
  1849. var b, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B;
  1850. if (!this.textLinesChange) return this._textLines;
  1851. if (b = [], this._textLines = b, this.textLinesChange = !1, d = [], this._lineHeights = d, !this._text || !this._font) return b;
  1852. for (e = 0, f = 0, g = 0, h = 0, i = this._hasWidthSet, j = this._hasWidthSet ? this._explicitWidth : Number.POSITIVE_INFINITY, k = this._font, l = k._getFirstCharHeight(), m = Math.ceil(l * c.EMPTY_FACTOR), n = this._text.split(/(?:\r\n|\r|\n)/), o = n.length, p = !0, q = 0; o > q; q++) {
  1853. for (r = n[q], s = r.length, t = 0, u = 0, v = !0, w = 0; s > w; w++) {
  1854. if (y = r.charAt(w), z = 0, A = 0, B = k.getTexture(y), B) y = B._textureWidth, x = B._textureHeight, z = B._offsetX, A = B._offsetY;
  1855. else {
  1856. if (" " != y) {
  1857. a.Logger.warningWithErrorId(1011, y), v && (v = !1);
  1858. continue
  1859. }
  1860. y = m, x = l
  1861. }
  1862. v && (v = !1, g = Math.min(z, g)), p && (h = Math.min(A, h)), i && w > 0 && u + y > j ? (b.push(r.substring(0, w)), d.push(t), f += t, e = Math.max(u, e), r = r.substring(w), s = r.length, w = 0, u = y, t = x) : (u += y, t = Math.max(x, t))
  1863. }
  1864. p && (p = !1), b.push(r), d.push(t), f += t, e = Math.max(u, e)
  1865. }
  1866. return this._textWidth = e, this._textHeight = f, this._textOffsetX = g, this._textOffsetY = h, b
  1867. }, c.EMPTY_FACTOR = .33, c
  1868. }(a.DisplayObject);
  1869. a.BitmapText = b, b.prototype.__class__ = "egret.BitmapText"
  1870. }(egret || (egret = {})),
  1871. function(a) {
  1872. var b = function() {
  1873. function b() {
  1874. this.fillStyleColor = this.strokeStyleColor = this.renderContext = this.commandQueue = this.canvasContext = null, this._dirty = !1, this._firstCheck = !0, this._lastY = this._lastX = this._maxY = this._maxX = this._minY = this._minX = 0, this.commandQueue = []
  1875. }
  1876. return b.prototype.beginFill = function() {}, b.prototype._setStyle = function() {}, b.prototype.drawRect = function(a, b, c, d) {
  1877. this.checkRect(a, b, c, d)
  1878. }, b.prototype.drawCircle = function(a, b, c) {
  1879. this.checkRect(a - c, b - c, 2 * c, 2 * c)
  1880. }, b.prototype.drawRoundRect = function(a, b, c, d) {
  1881. this.checkRect(a, b, c, d)
  1882. }, b.prototype.drawEllipse = function(a, b, c, d) {
  1883. this.checkRect(a - c, b - d, 2 * c, 2 * d)
  1884. }, b.prototype.lineStyle = function() {}, b.prototype.lineTo = function(a, b) {
  1885. this.checkPoint(a, b)
  1886. }, b.prototype.curveTo = function(a, b, c, d) {
  1887. this.checkPoint(a, b), this.checkPoint(c, d)
  1888. }, b.prototype.moveTo = function(a, b) {
  1889. this.checkPoint(a, b)
  1890. }, b.prototype.clear = function() {
  1891. this._maxY = this._maxX = this._minY = this._minX = 0, this._firstCheck = !0
  1892. }, b.prototype.endFill = function() {}, b.prototype._draw = function() {}, b.prototype.checkRect = function(a, b, c, d) {
  1893. this._firstCheck ? (this._firstCheck = !1, this._minX = a, this._minY = b, this._maxX = a + c, this._maxY = b + d) : (this._minX = Math.min(this._minX, a), this._minY = Math.min(this._minY, b), this._maxX = Math.max(this._maxX, a + c), this._maxY = Math.max(this._maxY, b + d))
  1894. }, b.prototype.checkPoint = function(a, b) {
  1895. this._firstCheck ? (this._firstCheck = !1, this._minX = a, this._minY = b, this._maxX = a, this._maxY = b) : (this._minX = Math.min(this._minX, a), this._minY = Math.min(this._minY, b), this._maxX = Math.max(this._maxX, a), this._maxY = Math.max(this._maxY, b)), this._lastX = a, this._lastY = b
  1896. }, b.prototype._measureBounds = function() {
  1897. return a.Rectangle.identity.initialize(this._minX, this._minY, this._maxX - this._minX, this._maxY - this._minY)
  1898. }, b
  1899. }();
  1900. a.Graphics = b, b.prototype.__class__ = "egret.Graphics",
  1901. function() {
  1902. return function(a, b, c) {
  1903. this.method = a, this.thisObject = b, this.args = c
  1904. }
  1905. }().prototype.__class__ = "egret.Command"
  1906. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  1907. function c() {
  1908. this.constructor = a
  1909. }
  1910. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  1911. c.prototype = b.prototype, a.prototype = new c
  1912. },
  1913. function(a) {
  1914. var b = function(b) {
  1915. function c() {
  1916. b.call(this), this._graphics = null
  1917. }
  1918. return __extends(c, b), Object.defineProperty(c.prototype, "graphics", {
  1919. get: function() {
  1920. return this._graphics || (this._graphics = new a.Graphics, this.needDraw = !0), this._graphics
  1921. },
  1922. enumerable: !0,
  1923. configurable: !0
  1924. }), c.prototype._render = function(a) {
  1925. this._graphics && this._graphics._draw(a)
  1926. }, c.prototype._measureBounds = function() {
  1927. var a = this._graphics;
  1928. return a ? a._measureBounds() : b.prototype._measureBounds.call(this)
  1929. }, c
  1930. }(a.DisplayObject);
  1931. a.Shape = b, b.prototype.__class__ = "egret.Shape"
  1932. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  1933. function c() {
  1934. this.constructor = a
  1935. }
  1936. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  1937. c.prototype = b.prototype, a.prototype = new c
  1938. },
  1939. function(a) {
  1940. var b = function(b) {
  1941. function c() {
  1942. b.call(this), this._graphics = null
  1943. }
  1944. return __extends(c, b), Object.defineProperty(c.prototype, "graphics", {
  1945. get: function() {
  1946. return this._graphics || (this._graphics = new a.Graphics, this.needDraw = !0), this._graphics
  1947. },
  1948. enumerable: !0,
  1949. configurable: !0
  1950. }), c.prototype._render = function(a) {
  1951. this._graphics && this._graphics._draw(a), b.prototype._render.call(this, a)
  1952. }, c.prototype._measureBounds = function() {
  1953. var b, c, d, e, f, g, h, i, j, k, l;
  1954. for (b = 0, c = 0, d = 0, e = 0, f = this._children.length, g = 0; f > g; g++) h = this._children[g], h._visible && (i = h.getBounds(a.Rectangle.identity, !1), j = i.x, k = i.y, l = i.width, i = i.height, h = h._getMatrix(), h = a.DisplayObject.getTransformBounds(a.Rectangle.identity.initialize(j, k, l, i), h), j = h.x, k = h.y, l = h.width + h.x, h = h.height + h.y, (b > j || 0 == g) && (b = j), (l > c || 0 == g) && (c = l), (d > k || 0 == g) && (d = k), (h > e || 0 == g) && (e = h));
  1955. return this._graphics && (f = this._graphics._measureBounds(), j = f.x, k = f.y, l = f.width + f.x, h = f.height + f.y, (b > j || 0 == g) && (b = j), (l > c || 0 == g) && (c = l), (d > k || 0 == g) && (d = k), (h > e || 0 == g) && (e = h)), a.Rectangle.identity.initialize(b, d, c - b, e - d)
  1956. }, c.prototype.hitTest = function(c, d, e) {
  1957. void 0 === e && (e = !1);
  1958. var f = b.prototype.hitTest.call(this, c, d, e);
  1959. return f ? f : this._graphics ? a.DisplayObject.prototype.hitTest.call(this, c, d, e) : null
  1960. }, c
  1961. }(a.DisplayObjectContainer);
  1962. a.Sprite = b, b.prototype.__class__ = "egret.Sprite"
  1963. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  1964. function c() {
  1965. this.constructor = a
  1966. }
  1967. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  1968. c.prototype = b.prototype, a.prototype = new c
  1969. },
  1970. function(a) {
  1971. var b = function(b) {
  1972. function c() {
  1973. b.call(this), this._inputEnabled = !1, this._type = "", this._inputUtils = null, this._text = "", this._displayAsPassword = !1, this._fontFamily = c.default_fontFamily, this._size = 30, this._bold = this._italic = !1, this._textColorString = "#FFFFFF", this._textColor = 16777215, this._strokeColorString = "#000000", this._stroke = this._strokeColor = 0, this._textAlign = "left", this._verticalAlign = "top", this._maxChars = 0, this._scrollV = -1, this._numLines = this._lineSpacing = this._maxScrollV = 0, this._isFlow = this._multiline = !1, this._textArr = [], this._isArrayChanged = !1, this._textMaxHeight = this._textMaxWidth = 0, this._linesArr = [], this.needDraw = !0
  1974. }
  1975. return __extends(c, b), c.prototype.isInput = function() {
  1976. return this._type == a.TextFieldType.INPUT
  1977. }, c.prototype._setTouchEnabled = function(a) {
  1978. b.prototype._setTouchEnabled.call(this, a), this.isInput() && (this._inputEnabled = !0)
  1979. }, Object.defineProperty(c.prototype, "type", {
  1980. get: function() {
  1981. return this._type
  1982. },
  1983. set: function(a) {
  1984. this._setType(a)
  1985. },
  1986. enumerable: !0,
  1987. configurable: !0
  1988. }), c.prototype._setType = function(b) {
  1989. this._type != b && (this._type = b, this._type == a.TextFieldType.INPUT ? (this._hasWidthSet || this._setWidth(100), this._hasHeightSet || this._setHeight(30), null == this._inputUtils && (this._inputUtils = new a.InputController), this._inputUtils.init(this), this._setDirty(), this._stage && this._inputUtils._addStageText()) : this._inputUtils && (this._inputUtils._removeStageText(), this._inputUtils = null))
  1990. }, Object.defineProperty(c.prototype, "text", {
  1991. get: function() {
  1992. return this._getText()
  1993. },
  1994. set: function(a) {
  1995. this._setText(a)
  1996. },
  1997. enumerable: !0,
  1998. configurable: !0
  1999. }), c.prototype._getText = function() {
  2000. return this._type == a.TextFieldType.INPUT ? this._inputUtils._getText() : this._text
  2001. }, c.prototype._setSizeDirty = function() {
  2002. b.prototype._setSizeDirty.call(this), this._isArrayChanged = !0
  2003. }, c.prototype._setTextDirty = function() {
  2004. this._setSizeDirty()
  2005. }, c.prototype._setBaseText = function(a) {
  2006. null == a && (a = ""), this._isFlow = !1, this._text != a && (this._setTextDirty(), this._text = a, a = "", a = this._displayAsPassword ? this.changeToPassText(this._text) : this._text, this.setMiddleStyle([{
  2007. text: a
  2008. }]))
  2009. }, c.prototype._setText = function(a) {
  2010. null == a && (a = ""), this._setBaseText(a), this._inputUtils && this._inputUtils._setText(this._text)
  2011. }, Object.defineProperty(c.prototype, "displayAsPassword", {
  2012. get: function() {
  2013. return this._displayAsPassword
  2014. },
  2015. set: function(a) {
  2016. this._setDisplayAsPassword(a)
  2017. },
  2018. enumerable: !0,
  2019. configurable: !0
  2020. }), c.prototype._setDisplayAsPassword = function(a) {
  2021. this._displayAsPassword != a && (this._displayAsPassword = a, this._setTextDirty(), a = "", a = this._displayAsPassword ? this.changeToPassText(this._text) : this._text, this.setMiddleStyle([{
  2022. text: a
  2023. }]))
  2024. }, Object.defineProperty(c.prototype, "fontFamily", {
  2025. get: function() {
  2026. return this._fontFamily
  2027. },
  2028. set: function(a) {
  2029. this._setFontFamily(a)
  2030. },
  2031. enumerable: !0,
  2032. configurable: !0
  2033. }), c.prototype._setFontFamily = function(a) {
  2034. this._fontFamily != a && (this._setTextDirty(), this._fontFamily = a)
  2035. }, Object.defineProperty(c.prototype, "size", {
  2036. get: function() {
  2037. return this._size
  2038. },
  2039. set: function(a) {
  2040. this._setSize(a)
  2041. },
  2042. enumerable: !0,
  2043. configurable: !0
  2044. }), c.prototype._setSize = function(a) {
  2045. this._size != a && (this._setTextDirty(), this._size = a)
  2046. }, Object.defineProperty(c.prototype, "italic", {
  2047. get: function() {
  2048. return this._italic
  2049. },
  2050. set: function(a) {
  2051. this._setItalic(a)
  2052. },
  2053. enumerable: !0,
  2054. configurable: !0
  2055. }), c.prototype._setItalic = function(a) {
  2056. this._italic != a && (this._setTextDirty(), this._italic = a)
  2057. }, Object.defineProperty(c.prototype, "bold", {
  2058. get: function() {
  2059. return this._bold
  2060. },
  2061. set: function(a) {
  2062. this._setBold(a)
  2063. },
  2064. enumerable: !0,
  2065. configurable: !0
  2066. }), c.prototype._setBold = function(a) {
  2067. this._bold != a && (this._setTextDirty(), this._bold = a)
  2068. }, Object.defineProperty(c.prototype, "textColor", {
  2069. get: function() {
  2070. return this._textColor
  2071. },
  2072. set: function(a) {
  2073. this._setTextColor(a)
  2074. },
  2075. enumerable: !0,
  2076. configurable: !0
  2077. }), c.prototype._setTextColor = function(b) {
  2078. this._textColor != b && (this._setTextDirty(), this._textColor = b, this._textColorString = a.toColorString(b))
  2079. }, Object.defineProperty(c.prototype, "strokeColor", {
  2080. get: function() {
  2081. return this._strokeColor
  2082. },
  2083. set: function(a) {
  2084. this._setStrokeColor(a)
  2085. },
  2086. enumerable: !0,
  2087. configurable: !0
  2088. }), c.prototype._setStrokeColor = function(b) {
  2089. this._strokeColor != b && (this._setTextDirty(), this._strokeColor = b, this._strokeColorString = a.toColorString(b))
  2090. }, Object.defineProperty(c.prototype, "stroke", {
  2091. get: function() {
  2092. return this._stroke
  2093. },
  2094. set: function(a) {
  2095. this._setStroke(a)
  2096. },
  2097. enumerable: !0,
  2098. configurable: !0
  2099. }), c.prototype._setStroke = function(a) {
  2100. this._stroke != a && (this._setTextDirty(), this._stroke = a)
  2101. }, Object.defineProperty(c.prototype, "textAlign", {
  2102. get: function() {
  2103. return this._textAlign
  2104. },
  2105. set: function(a) {
  2106. this._setTextAlign(a)
  2107. },
  2108. enumerable: !0,
  2109. configurable: !0
  2110. }), c.prototype._setTextAlign = function(a) {
  2111. this._textAlign != a && (this._setTextDirty(), this._textAlign = a)
  2112. }, Object.defineProperty(c.prototype, "verticalAlign", {
  2113. get: function() {
  2114. return this._verticalAlign
  2115. },
  2116. set: function(a) {
  2117. this._setVerticalAlign(a)
  2118. },
  2119. enumerable: !0,
  2120. configurable: !0
  2121. }), c.prototype._setVerticalAlign = function(a) {
  2122. this._verticalAlign != a && (this._setTextDirty(), this._verticalAlign = a)
  2123. }, Object.defineProperty(c.prototype, "maxChars", {
  2124. get: function() {
  2125. return this._maxChars
  2126. },
  2127. set: function(a) {
  2128. this._setMaxChars(a)
  2129. },
  2130. enumerable: !0,
  2131. configurable: !0
  2132. }), c.prototype._setMaxChars = function(a) {
  2133. this._maxChars != a && (this._maxChars = a)
  2134. }, Object.defineProperty(c.prototype, "scrollV", {
  2135. set: function(a) {
  2136. this._scrollV = a, this._setDirty()
  2137. },
  2138. enumerable: !0,
  2139. configurable: !0
  2140. }), Object.defineProperty(c.prototype, "maxScrollV", {
  2141. get: function() {
  2142. return this._maxScrollV
  2143. },
  2144. enumerable: !0,
  2145. configurable: !0
  2146. }), Object.defineProperty(c.prototype, "selectionBeginIndex", {
  2147. get: function() {
  2148. return 0
  2149. },
  2150. enumerable: !0,
  2151. configurable: !0
  2152. }), Object.defineProperty(c.prototype, "selectionEndIndex", {
  2153. get: function() {
  2154. return 0
  2155. },
  2156. enumerable: !0,
  2157. configurable: !0
  2158. }), Object.defineProperty(c.prototype, "caretIndex", {
  2159. get: function() {
  2160. return 0
  2161. },
  2162. enumerable: !0,
  2163. configurable: !0
  2164. }), c.prototype._setSelection = function() {}, Object.defineProperty(c.prototype, "lineSpacing", {
  2165. get: function() {
  2166. return this._lineSpacing
  2167. },
  2168. set: function(a) {
  2169. this._setLineSpacing(a)
  2170. },
  2171. enumerable: !0,
  2172. configurable: !0
  2173. }), c.prototype._setLineSpacing = function(a) {
  2174. this._lineSpacing != a && (this._setTextDirty(), this._lineSpacing = a)
  2175. }, c.prototype._getLineHeight = function() {
  2176. return this._lineSpacing + this._size
  2177. }, Object.defineProperty(c.prototype, "numLines", {
  2178. get: function() {
  2179. return this._numLines
  2180. },
  2181. enumerable: !0,
  2182. configurable: !0
  2183. }), Object.defineProperty(c.prototype, "multiline", {
  2184. get: function() {
  2185. return this._multiline
  2186. },
  2187. set: function(a) {
  2188. this._setMultiline(a)
  2189. },
  2190. enumerable: !0,
  2191. configurable: !0
  2192. }), c.prototype._setMultiline = function(a) {
  2193. this._multiline = a, this._setDirty()
  2194. }, c.prototype.setFocus = function() {
  2195. a.Logger.warningWithErrorId(1013)
  2196. }, c.prototype._onRemoveFromStage = function() {
  2197. b.prototype._onRemoveFromStage.call(this), this._removeEvent(), this._type == a.TextFieldType.INPUT && this._inputUtils._removeStageText()
  2198. }, c.prototype._onAddToStage = function() {
  2199. b.prototype._onAddToStage.call(this), this._addEvent(), this._type == a.TextFieldType.INPUT && this._inputUtils._addStageText()
  2200. }, c.prototype._updateBaseTransform = function() {
  2201. this._getLinesArr(), 0 != this._textMaxWidth && b.prototype._updateTransform.call(this)
  2202. }, c.prototype._updateTransform = function() {
  2203. this._type == a.TextFieldType.INPUT ? this._normalDirty ? this._inputUtils._updateProperties() : this._inputUtils._updateTransform() : this._updateBaseTransform()
  2204. }, c.prototype._draw = function(a) {
  2205. 0 != this._textMaxWidth && b.prototype._draw.call(this, a)
  2206. }, c.prototype._render = function(a) {
  2207. this.drawText(a), this._clearDirty()
  2208. }, c.prototype._measureBounds = function() {
  2209. return this._getLinesArr(), 0 == this._textMaxWidth ? a.Rectangle.identity.initialize(0, 0, 0, 0) : a.Rectangle.identity.initialize(0, 0, this._textMaxWidth, this._textMaxHeight + (this._numLines - 1) * this._lineSpacing)
  2210. }, Object.defineProperty(c.prototype, "textFlow", {
  2211. get: function() {
  2212. return this._textArr
  2213. },
  2214. set: function(a) {
  2215. var b, c;
  2216. for (this._isFlow = !0, b = "", null == a && (a = []), c = 0; c < a.length; c++) b += a[c].text;
  2217. this._displayAsPassword ? this._setBaseText(b) : (this._text = b, this.setMiddleStyle(a))
  2218. },
  2219. enumerable: !0,
  2220. configurable: !0
  2221. }), c.prototype.changeToPassText = function(a) {
  2222. if (this._displayAsPassword) {
  2223. for (var b = "", c = 0, d = a.length; d > c; c++) switch (a.charAt(c)) {
  2224. case "\n":
  2225. b += "\n";
  2226. break;
  2227. case "\r":
  2228. break;
  2229. default:
  2230. b += "*"
  2231. }
  2232. return b
  2233. }
  2234. return a
  2235. }, c.prototype.setMiddleStyle = function(a) {
  2236. this._isArrayChanged = !0, this._textArr = a, this._setSizeDirty()
  2237. }, Object.defineProperty(c.prototype, "textWidth", {
  2238. get: function() {
  2239. return this._textMaxWidth
  2240. },
  2241. enumerable: !0,
  2242. configurable: !0
  2243. }), Object.defineProperty(c.prototype, "textHeight", {
  2244. get: function() {
  2245. return this._textMaxHeight
  2246. },
  2247. enumerable: !0,
  2248. configurable: !0
  2249. }), c.prototype.appendText = function(a) {
  2250. this.appendElement({
  2251. text: a
  2252. })
  2253. }, c.prototype.appendElement = function(a) {
  2254. this._textArr.push(a), this.setMiddleStyle(this._textArr)
  2255. }, c.prototype._getLinesArr = function() {
  2256. var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s;
  2257. if (!this._isArrayChanged) return this._linesArr;
  2258. if (this._isArrayChanged = !1, b = this._textArr, c = a.MainContext.instance.rendererContext, this._linesArr = [], this._textMaxWidth = this._textMaxHeight = 0, this._hasWidthSet && 0 == this._explicitWidth) return this._numLines = 0, [{
  2259. width: 0,
  2260. height: 0,
  2261. elements: []
  2262. }];
  2263. for (e = this._linesArr, f = 0, g = 0, h = 0, this._isFlow || c.setupFont(this), i = 0, j = b.length; j > i; i++) {
  2264. for (k = b[i], k.style = k.style || {}, l = k.text.toString().split(/(?:\r\n|\r|\n)/), m = 0, n = l.length; n > m; m++) {
  2265. if (null == e[h] && (d = {
  2266. width: 0,
  2267. height: 0,
  2268. elements: []
  2269. }, e[h] = d, g = f = 0), g = this._type == a.TextFieldType.INPUT ? this._size : Math.max(g, k.style.size || this._size), "" != l[m])
  2270. if (this._isFlow && c.setupFont(this, k.style), o = c.measureText(l[m]), this._hasWidthSet)
  2271. if (f + o <= this._explicitWidth) d.elements.push({
  2272. width: o,
  2273. text: l[m],
  2274. style: k.style
  2275. }), f += o;
  2276. else {
  2277. for (p = 0, q = 0, r = l[m], s = r.length; s > p && (o = c.measureText(r.charAt(p)), !(f + o > this._explicitWidth && 0 != f + p)); p++) q += o, f += o;
  2278. p > 0 && (d.elements.push({
  2279. width: q,
  2280. text: r.substring(0, p),
  2281. style: k.style
  2282. }), l[m] = r.substring(p)), m--
  2283. } else f += o, d.elements.push({
  2284. width: o,
  2285. text: l[m],
  2286. style: k.style
  2287. }); if (m < l.length - 1) {
  2288. if (d.width = f, d.height = g, this._textMaxWidth = Math.max(this._textMaxWidth, f), this._textMaxHeight += g, this._type == a.TextFieldType.INPUT && !this._multiline) return this._numLines = e.length, e;
  2289. h++
  2290. }
  2291. }
  2292. i == b.length - 1 && d && (d.width = f, d.height = g, this._textMaxWidth = Math.max(this._textMaxWidth, f), this._textMaxHeight += g)
  2293. }
  2294. return this._numLines = e.length, e
  2295. }, c.prototype.drawText = function(b) {
  2296. var d, e, f, g, h, i, j, k, l, m, n, o, c = this._getLinesArr();
  2297. if (0 != this._textMaxWidth)
  2298. for (d = this._hasWidthSet ? this._explicitWidth : this._textMaxWidth, e = this._textMaxHeight + (this._numLines - 1) * this._lineSpacing, f = 0, g = 0, this._hasHeightSet && (e < this._explicitHeight ? (h = 0, this._verticalAlign == a.VerticalAlign.MIDDLE ? h = .5 : this._verticalAlign == a.VerticalAlign.BOTTOM && (h = 1), f += h * (this._explicitHeight - e)) : e > this._explicitHeight && (g = Math.max(this._scrollV - 1, 0), g = Math.min(this._numLines - 1, g))), f = Math.round(f), e = 0, this._textAlign == a.HorizontalAlign.CENTER ? e = .5 : this._textAlign == a.HorizontalAlign.RIGHT && (e = 1), h = 0, i = this._numLines; i > g && (j = c[g], k = j.height, f += k / 2, !(0 != g && this._hasHeightSet && f > this._explicitHeight)); g++) {
  2299. for (h = Math.round((d - j.width) * e), l = 0, m = j.elements.length; m > l; l++) n = j.elements[l], o = n.style.size || this._size, this._type == a.TextFieldType.INPUT ? b.drawText(this, n.text, h, f + (k - o) / 2, n.width) : b.drawText(this, n.text, h, f + (k - o) / 2, n.width, n.style), h += n.width;
  2300. f += k / 2 + this._lineSpacing
  2301. }
  2302. }, c.prototype._addEvent = function() {
  2303. this.addEventListener(a.TouchEvent.TOUCH_TAP, this.onTapHandler, this)
  2304. }, c.prototype._removeEvent = function() {
  2305. this.removeEventListener(a.TouchEvent.TOUCH_TAP, this.onTapHandler, this)
  2306. }, c.prototype.onTapHandler = function(b) {
  2307. if (this._type != a.TextFieldType.INPUT && (b = this._getTextElement(b.localX, b.localY), null != b && (b = b.style) && b.href && b.href.match(/^event:/))) {
  2308. var c = b.href.match(/^event:/)[0];
  2309. a.TextEvent.dispatchTextEvent(this, a.TextEvent.LINK, b.href.substring(c.length))
  2310. }
  2311. }, c.prototype._getTextElement = function(a, b) {
  2312. var c = this._getHit(a, b),
  2313. d = this._getLinesArr();
  2314. return c && d[c.lineIndex] && d[c.lineIndex].elements[c.textElementIndex] ? d[c.lineIndex].elements[c.textElementIndex] : null
  2315. }, c.prototype._getHit = function(a, b) {
  2316. var d, e, f, g, c = this._getLinesArr();
  2317. if (0 == this._textMaxWidth) return null;
  2318. for (d = 0, e = 0, f = 0; f < c.length; f++) {
  2319. if (g = c[f], e + g.height >= b) {
  2320. d = f + 1;
  2321. break
  2322. }
  2323. if (e += g.height, e + this._lineSpacing > b) return null;
  2324. e += this._lineSpacing
  2325. }
  2326. if (0 === d) return null;
  2327. for (c = c[d - 1], f = e = 0; f < c.elements.length; f++) {
  2328. if (g = c.elements[f], !(e + g.width < a)) return {
  2329. lineIndex: d - 1,
  2330. textElementIndex: f
  2331. };
  2332. e += g.width
  2333. }
  2334. return null
  2335. }, c.default_fontFamily = "Arial", c
  2336. }(a.DisplayObject);
  2337. a.TextField = b, b.prototype.__class__ = "egret.TextField"
  2338. }(egret || (egret = {})),
  2339. function(a) {
  2340. var b = function() {
  2341. function a() {
  2342. this.resutlArr = []
  2343. }
  2344. return a.prototype.parser = function(a) {
  2345. var b, c, d;
  2346. for (this.stackArray = [], this.resutlArr = [], b = 0, c = a.length; c > b;) d = a.indexOf("<", b), 0 > d ? (this.addToResultArr(a.substring(b)), b = c) : (this.addToResultArr(a.substring(b, d)), b = a.indexOf(">", d), "/" == a.charAt(d + 1) ? this.stackArray.pop() : this.addToArray(a.substring(d + 1, b)), b += 1);
  2347. return this.resutlArr
  2348. }, a.prototype.addToResultArr = function(a) {
  2349. var b, c;
  2350. if ("" != a) {
  2351. for (b = [], b.push(["&lt;", "<"]), b.push(["&gt;", ">"]), b.push(["&", "&"]), b.push(["&quot;", '"']), b.push(["&apos;;", "'"]), c = 0; c < b.length; c++) a.replace(new RegExp(b[c][0], "g"), b[c][1]);
  2352. this.resutlArr.push(0 < this.stackArray.length ? {
  2353. text: a,
  2354. style: this.stackArray[this.stackArray.length - 1]
  2355. } : {
  2356. text: a
  2357. })
  2358. }
  2359. }, a.prototype.changeStringToObject = function(a) {
  2360. var c, b = {};
  2361. for (a = a.replace(/( )+/g, " ").split(" "), c = 0; c < a.length; c++) this.addProperty(b, a[c]);
  2362. return b
  2363. }, a.prototype.addProperty = function(a, b) {
  2364. var c = b.replace(/( )*=( )*/g, "=").split("=");
  2365. switch (c[1] && (c[1] = c[1].replace(/(\"|\')/g, "")), c[0].toLowerCase()) {
  2366. case "color":
  2367. a.textColor = parseInt(c[1]);
  2368. break;
  2369. case "b":
  2370. a.bold = "true" == (c[1] || "true");
  2371. break;
  2372. case "i":
  2373. a.italic = "true" == (c[1] || "true");
  2374. break;
  2375. case "size":
  2376. a.size = parseInt(c[1]);
  2377. break;
  2378. case "fontFamily":
  2379. a.fontFamily = c[1];
  2380. break;
  2381. case "href":
  2382. a.href = c[1]
  2383. }
  2384. }, a.prototype.addToArray = function(a) {
  2385. if (a = this.changeStringToObject(a), 0 != this.stackArray.length) {
  2386. var b, c = this.stackArray[this.stackArray.length - 1];
  2387. for (b in c) null == a[b] && (a[b] = c[b])
  2388. }
  2389. this.stackArray.push(a)
  2390. }, a
  2391. }();
  2392. a.HtmlTextParser = b, b.prototype.__class__ = "egret.HtmlTextParser"
  2393. }(egret || (egret = {})),
  2394. function(a) {
  2395. var b = function() {
  2396. function a() {}
  2397. return a.DYNAMIC = "dynamic", a.INPUT = "input", a
  2398. }();
  2399. a.TextFieldType = b, b.prototype.__class__ = "egret.TextFieldType"
  2400. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2401. function c() {
  2402. this.constructor = a
  2403. }
  2404. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2405. c.prototype = b.prototype, a.prototype = new c
  2406. },
  2407. function(a) {
  2408. var b = function(b) {
  2409. function c(a) {
  2410. b.call(this), this.bitmapData = this._bitmapY = this._bitmapX = this._sourceHeight = this._sourceWidth = 0, this._textureMap = {};
  2411. var c = a.bitmapData;
  2412. this.bitmapData = c, this._sourceWidth = c.width, this._sourceHeight = c.height, this._bitmapX = a._bitmapX - a._offsetX, this._bitmapY = a._bitmapY - a._offsetY
  2413. }
  2414. return __extends(c, b), c.prototype.getTexture = function(a) {
  2415. return this._textureMap[a]
  2416. }, c.prototype.createTexture = function(b, c, d, e, f, g, h, i, j) {
  2417. void 0 === g && (g = 0), void 0 === h && (h = 0), "undefined" == typeof i && (i = g + e), "undefined" == typeof j && (j = h + f);
  2418. var k = new a.Texture,
  2419. l = a.MainContext.instance.rendererContext._texture_scale_factor;
  2420. return k._bitmapData = this.bitmapData, k._bitmapX = this._bitmapX + c, k._bitmapY = this._bitmapY + d, k._bitmapWidth = e * l, k._bitmapHeight = f * l, k._offsetX = g, k._offsetY = h, k._textureWidth = i * l, k._textureHeight = j * l, k._sourceWidth = this._sourceWidth, k._sourceHeight = this._sourceHeight, this._textureMap[b] = k
  2421. }, c
  2422. }(a.HashObject);
  2423. a.SpriteSheet = b, b.prototype.__class__ = "egret.SpriteSheet"
  2424. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2425. function c() {
  2426. this.constructor = a
  2427. }
  2428. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2429. c.prototype = b.prototype, a.prototype = new c
  2430. },
  2431. function(a) {
  2432. var b = function(b) {
  2433. function c() {
  2434. b.call(this), this._isFocus = !1, this._text = null, this._isFirst = this._isFirst = !0
  2435. }
  2436. return __extends(c, b), c.prototype.init = function(b) {
  2437. this._text = b, this.stageText = a.StageText.create(), b = this._text.localToGlobal(), this.stageText._open(b.x, b.y, this._text._explicitWidth, this._text._explicitHeight)
  2438. }, c.prototype._addStageText = function() {
  2439. this._text._inputEnabled || (this._text._touchEnabled = !0), this.stageText._add(), this.stageText._addListeners(), this.stageText.addEventListener("blur", this.onBlurHandler, this), this.stageText.addEventListener("focus", this.onFocusHandler, this), this.stageText.addEventListener("updateText", this.updateTextHandler, this), this._text.addEventListener(a.TouchEvent.TOUCH_TAP, this.onMouseDownHandler, this), a.MainContext.instance.stage.addEventListener(a.TouchEvent.TOUCH_TAP, this.onStageDownHandler, this), a.MainContext.instance.stage.addEventListener(a.Event.RESIZE, this.onResize, this)
  2440. }, c.prototype._removeStageText = function() {
  2441. this.stageText._remove(), this.stageText._removeListeners(), this._text._inputEnabled || (this._text._touchEnabled = !1), this.stageText.removeEventListener("blur", this.onBlurHandler, this), this.stageText.removeEventListener("focus", this.onFocusHandler, this), this.stageText.removeEventListener("updateText", this.updateTextHandler, this), this._text.removeEventListener(a.TouchEvent.TOUCH_TAP, this.onMouseDownHandler, this), a.MainContext.instance.stage.removeEventListener(a.TouchEvent.TOUCH_TAP, this.onStageDownHandler, this), a.MainContext.instance.stage.removeEventListener(a.Event.RESIZE, this.onResize, this)
  2442. }, c.prototype.onResize = function() {
  2443. this._isFirst = !0
  2444. }, c.prototype._getText = function() {
  2445. return this.stageText._getText()
  2446. }, c.prototype._setText = function(a) {
  2447. this.stageText._setText(a)
  2448. }, c.prototype.onFocusHandler = function() {
  2449. this.hideText()
  2450. }, c.prototype.onBlurHandler = function() {
  2451. this.showText()
  2452. }, c.prototype.onMouseDownHandler = function(a) {
  2453. a.stopPropagation(), this._text._visible && (this._isFirst = !0, this._updateTransform(), this.stageText._show())
  2454. }, c.prototype.onStageDownHandler = function() {
  2455. this.stageText._hide(), this.showText()
  2456. }, c.prototype.showText = function() {
  2457. this._isFocus && (this._isFocus = !1, this.resetText())
  2458. }, c.prototype.hideText = function() {
  2459. this._isFocus || (this._text._setBaseText(""), this._isFocus = !0)
  2460. }, c.prototype.updateTextHandler = function() {
  2461. this.resetText(), this._text.dispatchEvent(new a.Event(a.Event.CHANGE))
  2462. }, c.prototype.resetText = function() {
  2463. this._text._setBaseText(this.stageText._getText())
  2464. }, c.prototype._updateTransform = function() {
  2465. var h, i, b = this._text._worldTransform.a,
  2466. c = this._text._worldTransform.b,
  2467. d = this._text._worldTransform.c,
  2468. e = this._text._worldTransform.d,
  2469. f = this._text._worldTransform.tx,
  2470. g = this._text._worldTransform.ty;
  2471. this._text._updateBaseTransform(), h = this._text._worldTransform, (this._isFirst || b != h.a || c != h.b || d != h.c || e != h.d || f != h.tx || g != h.ty) && (this._isFirst = !1, b = this._text.localToGlobal(), this.stageText.changePosition(b.x, b.y), i = this, a.callLater(function() {
  2472. i.stageText._setScale(i._text._worldTransform.a, i._text._worldTransform.d)
  2473. }, this))
  2474. }, c.prototype._updateProperties = function() {
  2475. var c, d, b = this._text._stage;
  2476. if (null == b) this.stageText._setVisible(!1);
  2477. else {
  2478. for (c = this._text, d = c._visible; d && (c = c.parent, c != b);) d = c._visible;
  2479. this.stageText._setVisible(d)
  2480. }
  2481. this.stageText._setMultiline(this._text._multiline), this.stageText._setMaxChars(this._text._maxChars), this.stageText._setSize(this._text._size), this.stageText._setTextColor(this._text._textColorString), this.stageText._setTextFontFamily(this._text._fontFamily), this.stageText._setBold(this._text._bold), this.stageText._setItalic(this._text._italic), this.stageText._setTextAlign(this._text._textAlign), this.stageText._setWidth(this._text._getSize(a.Rectangle.identity).width), this.stageText._setHeight(this._text._getSize(a.Rectangle.identity).height), this.stageText._setTextType(this._text._displayAsPassword ? "password" : "text"), this.stageText._setText(this._text._text), this.stageText._resetStageText(), this._updateTransform()
  2482. }, c
  2483. }(a.HashObject);
  2484. a.InputController = b, b.prototype.__class__ = "egret.InputController"
  2485. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2486. function c() {
  2487. this.constructor = a
  2488. }
  2489. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2490. c.prototype = b.prototype, a.prototype = new c
  2491. },
  2492. function(a) {
  2493. var b = function(a) {
  2494. function b(b, c) {
  2495. a.call(this, b), this.firstCharHeight = 0, this.charList = "string" == typeof c ? this.parseConfig(c) : c && c.hasOwnProperty("frames") ? c.frames : {}
  2496. }
  2497. return __extends(b, a), b.prototype.getTexture = function(a) {
  2498. var b = this._textureMap[a];
  2499. if (!b) {
  2500. if (b = this.charList[a], !b) return null;
  2501. b = this.createTexture(a, b.x, b.y, b.w, b.h, b.offX, b.offY, b.sourceW, b.sourceH), this._textureMap[a] = b
  2502. }
  2503. return b
  2504. }, b.prototype._getFirstCharHeight = function() {
  2505. var a, b, c;
  2506. if (0 == this.firstCharHeight)
  2507. for (a in this.charList)
  2508. if (b = this.charList[a], b && (c = b.sourceH, void 0 === c && (c = b.h, void 0 === c && (c = 0), b = b.offY, void 0 === b && (b = 0), c += b), !(0 >= c))) {
  2509. this.firstCharHeight = c;
  2510. break
  2511. }
  2512. return this.firstCharHeight
  2513. }, b.prototype.parseConfig = function(a) {
  2514. var b, c, d, e, f, g;
  2515. for (a = a.split("\r\n").join("\n"), a = a.split("\n"), b = this.getConfigByKey(a[3], "count"), c = {}, d = 4; 4 + b > d; d++) e = a[d], f = String.fromCharCode(this.getConfigByKey(e, "id")), g = {}, c[f] = g, g.x = this.getConfigByKey(e, "x"), g.y = this.getConfigByKey(e, "y"), g.w = this.getConfigByKey(e, "width"), g.h = this.getConfigByKey(e, "height"), g.offX = this.getConfigByKey(e, "xoffset"), g.offY = this.getConfigByKey(e, "yoffset");
  2516. return c
  2517. }, b.prototype.getConfigByKey = function(a, b) {
  2518. var c, d, e, f;
  2519. for (c = a.split(" "), d = 0, e = c.length; e > d; d++)
  2520. if (f = c[d], b == f.substring(0, b.length)) return c = f.substring(b.length + 1), parseInt(c);
  2521. return 0
  2522. }, b
  2523. }(a.SpriteSheet);
  2524. a.BitmapFont = b, b.prototype.__class__ = "egret.BitmapFont"
  2525. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2526. function c() {
  2527. this.constructor = a
  2528. }
  2529. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2530. c.prototype = b.prototype, a.prototype = new c
  2531. },
  2532. function(a) {
  2533. var b = function(b) {
  2534. function c(a) {
  2535. b.call(this), this._isAddedToStage = !1, this._frames = this._movieClipData = this._textureToRender = null, this._totalFrames = 0, this._frameLabels = null, this._frameIntervalTime = 0, this._eventPool = null, this._isPlaying = !1, this._isStopped = !0, this._passedTime = this._displayedKeyFrameNum = this._nextFrameNum = this._currentFrameNum = this._playTimes = 0, this._setMovieClipData(a), this.needDraw = !0
  2536. }
  2537. return __extends(c, b), c.prototype._init = function() {
  2538. this._reset();
  2539. var a = this._movieClipData;
  2540. a && a._isDataValid() && (this._frames = a.frames, this._totalFrames = a.numFrames, this._frameLabels = a.labels, this._frameIntervalTime = 1e3 / a.frameRate, this._initFrame())
  2541. }, c.prototype._reset = function() {
  2542. this._frames = null, this._playTimes = 0, this._isPlaying = !1, this.setIsStopped(!0), this._currentFrameNum = 0, this._nextFrameNum = 1, this._passedTime = this._displayedKeyFrameNum = 0, this._eventPool = []
  2543. }, c.prototype._initFrame = function() {
  2544. this._movieClipData._isTextureValid() && (this._advanceFrame(), this._constructFrame())
  2545. }, c.prototype._render = function(a) {
  2546. var d, e, f, g, h, i, b = this._textureToRender;
  2547. (this._texture_to_render = b) && (d = Math.round(b._offsetX), e = Math.round(b._offsetY), f = b._bitmapWidth || b._textureWidth, g = b._bitmapHeight || b._textureHeight, h = Math.round(f), i = Math.round(g), c.renderFilter.drawImage(a, this, b._bitmapX, b._bitmapY, f, g, d, e, h, i))
  2548. }, c.prototype._measureBounds = function() {
  2549. var c = this._textureToRender;
  2550. return c ? a.Rectangle.identity.initialize(c._offsetX, c._offsetY, c._textureWidth, c._textureHeight) : b.prototype._measureBounds.call(this)
  2551. }, c.prototype._onAddToStage = function() {
  2552. b.prototype._onAddToStage.call(this), this._isAddedToStage = !0, this._isPlaying && 1 < this._totalFrames && this.setIsStopped(!1)
  2553. }, c.prototype._onRemoveFromStage = function() {
  2554. b.prototype._onRemoveFromStage.call(this), this._isAddedToStage = !1, this.setIsStopped(!0)
  2555. }, c.prototype._getFrameLabelByName = function(a, b) {
  2556. var c, d, e;
  2557. if (void 0 === b && (b = !1), b && (a = a.toLowerCase()), c = this._frameLabels)
  2558. for (d = null, e = 0; e < c.length; e++)
  2559. if (d = c[e], b ? d.name.toLowerCase() === a : d.name === a) return d;
  2560. return null
  2561. }, c.prototype._getFrameLabelByFrame = function(a) {
  2562. var c, d, b = this._frameLabels;
  2563. if (b)
  2564. for (c = null, d = 0; d < b.length; d++)
  2565. if (c = b[d], c.frame === a) return c;
  2566. return null
  2567. }, c.prototype._getFrameLabelForFrame = function(a) {
  2568. var e, b = null,
  2569. c = null,
  2570. d = this._frameLabels;
  2571. if (d)
  2572. for (e = 0; e < d.length && (c = d[e], !(c.frame > a)); e++) b = c;
  2573. return b
  2574. }, c.prototype.play = function(a) {
  2575. void 0 === a && (a = 0), this._isPlaying = !0, this.setPlayTimes(a), 1 < this._totalFrames && this._isAddedToStage && this.setIsStopped(!1)
  2576. }, c.prototype.stop = function() {
  2577. this._isPlaying = !1, this.setIsStopped(!0)
  2578. }, c.prototype.prevFrame = function() {
  2579. this.gotoAndStop(this._currentFrameNum - 1)
  2580. }, c.prototype.nextFrame = function() {
  2581. this.gotoAndStop(this._currentFrameNum + 1)
  2582. }, c.prototype.gotoAndPlay = function(b, c) {
  2583. if (void 0 === c && (c = 0), 0 === arguments.length || 2 < arguments.length) throw Error(a.getString(1022, "MovieClip.gotoAndPlay()"));
  2584. this.play(c), this._gotoFrame(b)
  2585. }, c.prototype.gotoAndStop = function(b) {
  2586. if (1 != arguments.length) throw Error(a.getString(1022, "MovieClip.gotoAndStop()"));
  2587. this.stop(), this._gotoFrame(b)
  2588. }, c.prototype._gotoFrame = function(b) {
  2589. var c;
  2590. if ("string" == typeof b) c = this._getFrameLabelByName(b).frame;
  2591. else if (c = parseInt(b + "", 10), c != b) throw Error(a.getString(1022, "Frame Label Not Found"));
  2592. 1 > c ? c = 1 : c > this._totalFrames && (c = this._totalFrames), c !== this._nextFrameNum && (this._nextFrameNum = c, this._advanceFrame(), this._constructFrame(), this._handlePendingEvent())
  2593. }, c.prototype._advanceTime = function(b) {
  2594. var c = this._frameIntervalTime;
  2595. if (b = this._passedTime + b, this._passedTime = b % c, c = b / c, !(1 > c)) {
  2596. for (; c >= 1;) {
  2597. if (c--, this._nextFrameNum++, this._nextFrameNum > this._totalFrames)
  2598. if (-1 == this._playTimes) this._eventPool.push(a.Event.LOOP_COMPLETE), this._nextFrameNum = 1;
  2599. else {
  2600. if (this._playTimes--, !(0 < this._playTimes)) {
  2601. this._nextFrameNum = this._totalFrames, this._eventPool.push(a.Event.COMPLETE), this.stop();
  2602. break
  2603. }
  2604. this._eventPool.push(a.Event.LOOP_COMPLETE), this._nextFrameNum = 1
  2605. }
  2606. this._advanceFrame()
  2607. }
  2608. this._constructFrame(), this._handlePendingEvent()
  2609. }
  2610. }, c.prototype._advanceFrame = function() {
  2611. this._currentFrameNum = this._nextFrameNum
  2612. }, c.prototype._constructFrame = function() {
  2613. var a = this._currentFrameNum;
  2614. this._displayedKeyFrameNum != a && (this._textureToRender = this._movieClipData.getTextureByFrame(a), this._displayedKeyFrameNum = a)
  2615. }, c.prototype._handlePendingEvent = function() {
  2616. var b, c, d, e, f, g;
  2617. if (0 != this._eventPool.length) {
  2618. for (this._eventPool.reverse(), b = this._eventPool, c = b.length, d = !1, e = !1, f = 0; c > f; f++) g = b.pop(), g == a.Event.LOOP_COMPLETE ? e = !0 : g == a.Event.COMPLETE ? d = !0 : this.dispatchEventWith(g);
  2619. e && this.dispatchEventWith(a.Event.LOOP_COMPLETE), d && this.dispatchEventWith(a.Event.COMPLETE)
  2620. }
  2621. }, Object.defineProperty(c.prototype, "totalFrames", {
  2622. get: function() {
  2623. return this._totalFrames
  2624. },
  2625. enumerable: !0,
  2626. configurable: !0
  2627. }), Object.defineProperty(c.prototype, "currentFrame", {
  2628. get: function() {
  2629. return this._currentFrameNum
  2630. },
  2631. enumerable: !0,
  2632. configurable: !0
  2633. }), Object.defineProperty(c.prototype, "currentFrameLabel", {
  2634. get: function() {
  2635. var a = this._getFrameLabelByFrame(this._currentFrameNum);
  2636. return a && a.name
  2637. },
  2638. enumerable: !0,
  2639. configurable: !0
  2640. }), Object.defineProperty(c.prototype, "currentLabel", {
  2641. get: function() {
  2642. var a = this._getFrameLabelForFrame(this._currentFrameNum);
  2643. return a ? a.name : null
  2644. },
  2645. enumerable: !0,
  2646. configurable: !0
  2647. }), Object.defineProperty(c.prototype, "frameRate", {
  2648. get: function() {
  2649. return this.movieClipData.frameRate
  2650. },
  2651. set: function(a) {
  2652. a != this._movieClipData.frameRate && (this._movieClipData.frameRate = a, this._frameIntervalTime = 1e3 / this._movieClipData.frameRate)
  2653. },
  2654. enumerable: !0,
  2655. configurable: !0
  2656. }), Object.defineProperty(c.prototype, "isPlaying", {
  2657. get: function() {
  2658. return this._isPlaying
  2659. },
  2660. enumerable: !0,
  2661. configurable: !0
  2662. }), Object.defineProperty(c.prototype, "movieClipData", {
  2663. get: function() {
  2664. return this._movieClipData
  2665. },
  2666. set: function(a) {
  2667. this._setMovieClipData(a)
  2668. },
  2669. enumerable: !0,
  2670. configurable: !0
  2671. }), c.prototype._setMovieClipData = function(a) {
  2672. this._movieClipData != a && (this._movieClipData = a, this._init())
  2673. }, c.prototype.setPlayTimes = function(a) {
  2674. (0 > a || a >= 1) && (this._playTimes = 0 > a ? -1 : Math.floor(a))
  2675. }, c.prototype.setIsStopped = function(b) {
  2676. this._isStopped != b && ((this._isStopped = b) ? (this._playTimes = 0, a.Ticker.getInstance().unregister(this._advanceTime, this)) : (this._playTimes = 0 == this._playTimes ? 1 : this._playTimes, a.Ticker.getInstance().register(this._advanceTime, this)))
  2677. }, c.renderFilter = a.RenderFilter.getInstance(), c
  2678. }(a.DisplayObject);
  2679. a.MovieClip = b, b.prototype.__class__ = "egret.MovieClip"
  2680. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2681. function c() {
  2682. this.constructor = a
  2683. }
  2684. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2685. c.prototype = b.prototype, a.prototype = new c
  2686. },
  2687. function(a) {
  2688. var b = function(a) {
  2689. function b(b, c) {
  2690. a.call(this), this._name = b, this._frame = 0 | c
  2691. }
  2692. return __extends(b, a), Object.defineProperty(b.prototype, "name", {
  2693. get: function() {
  2694. return this._name
  2695. },
  2696. enumerable: !0,
  2697. configurable: !0
  2698. }), Object.defineProperty(b.prototype, "frame", {
  2699. get: function() {
  2700. return this._frame
  2701. },
  2702. enumerable: !0,
  2703. configurable: !0
  2704. }), b.prototype.clone = function() {
  2705. return new b(this._name, this._frame)
  2706. }, b
  2707. }(a.EventDispatcher);
  2708. a.FrameLabel = b, b.prototype.__class__ = "egret.FrameLabel"
  2709. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2710. function c() {
  2711. this.constructor = a
  2712. }
  2713. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2714. c.prototype = b.prototype, a.prototype = new c
  2715. },
  2716. function(a) {
  2717. var b = function(b) {
  2718. function c() {
  2719. b.call(this), this._mcData = null, this.numFrames = 1, this.frames = [], this.labels = null, this.frameRate = 0, this.spriteSheet = this.textureData = null
  2720. }
  2721. return __extends(c, b), c.prototype._init = function(a, b, c) {
  2722. this.textureData = b, this.spriteSheet = c, this._setMCData(a)
  2723. }, c.prototype.getKeyFrameData = function(a) {
  2724. return a = this.frames[a - 1], a.frame && (a = this.frames[a.frame - 1]), a
  2725. }, c.prototype.getTextureByFrame = function(a) {
  2726. if (a = this.getKeyFrameData(a), a.res) {
  2727. var b = this.getTextureByResName(a.res);
  2728. return b._offsetX = 0 | a.x, b._offsetY = 0 | a.y, b
  2729. }
  2730. return null
  2731. }, c.prototype.getTextureByResName = function(a) {
  2732. var b = this.spriteSheet.getTexture(a);
  2733. return b || (b = this.textureData[a], b = this.spriteSheet.createTexture(a, b.x, b.y, b.w, b.h)), b
  2734. }, c.prototype._isDataValid = function() {
  2735. return 0 < this.frames.length
  2736. }, c.prototype._isTextureValid = function() {
  2737. return null != this.textureData && null != this.spriteSheet
  2738. }, c.prototype._fillMCData = function(a) {
  2739. this.frameRate = a.frameRate || 24, this._fillFramesData(a.frames), this._fillFrameLabelsData(a.labels)
  2740. }, c.prototype._fillFramesData = function(a) {
  2741. var b, c, d, e, f, g;
  2742. for (c = this.frames, d = a ? a.length : 0, e = 0; d > e; e++)
  2743. if (b = a[e], c.push(b), b.duration && (f = parseInt(b.duration), f > 1))
  2744. for (b = c.length, g = 1; f > g; g++) c.push({
  2745. frame: b
  2746. });
  2747. this.numFrames = c.length
  2748. }, c.prototype._fillFrameLabelsData = function(b) {
  2749. var c, d, e;
  2750. if (b && (c = b.length, c > 0))
  2751. for (this.labels = [], d = 0; c > d; d++) e = b[d], this.labels.push(new a.FrameLabel(e.name, e.frame))
  2752. }, Object.defineProperty(c.prototype, "mcData", {
  2753. get: function() {
  2754. return this._mcData
  2755. },
  2756. set: function(a) {
  2757. this._setMCData(a)
  2758. },
  2759. enumerable: !0,
  2760. configurable: !0
  2761. }), c.prototype._setMCData = function(a) {
  2762. this._mcData != a && (this._mcData = a) && this._fillMCData(a)
  2763. }, c
  2764. }(a.HashObject);
  2765. a.MovieClipData = b, b.prototype.__class__ = "egret.MovieClipData"
  2766. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2767. function c() {
  2768. this.constructor = a
  2769. }
  2770. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2771. c.prototype = b.prototype, a.prototype = new c
  2772. },
  2773. function(a) {
  2774. var b = function(b) {
  2775. function c(a, c) {
  2776. b.call(this), this.enableCache = !0, this._mcDataCache = {}, this._mcDataSet = a, this.setTexture(c)
  2777. }
  2778. return __extends(c, b), c.prototype.clearCache = function() {
  2779. this._mcDataCache = {}
  2780. }, c.prototype.generateMovieClipData = function(b) {
  2781. if (void 0 === b && (b = ""), "" == b && this._mcDataSet)
  2782. for (b in this._mcDataSet.mc) break;
  2783. if ("" == b) return null;
  2784. var c = this._findFromCache(b, this._mcDataCache);
  2785. return c || (c = new a.MovieClipData, this._fillData(b, c, this._mcDataCache)), c
  2786. }, c.prototype._findFromCache = function(a, b) {
  2787. return this.enableCache && b[a] ? b[a] : null
  2788. }, c.prototype._fillData = function(a, b, c) {
  2789. if (this._mcDataSet) {
  2790. var d = this._mcDataSet.mc[a];
  2791. d && (b._init(d, this._mcDataSet.res, this._spriteSheet), this.enableCache && (c[a] = b))
  2792. }
  2793. }, Object.defineProperty(c.prototype, "mcDataSet", {
  2794. get: function() {
  2795. return this._mcDataSet
  2796. },
  2797. set: function(a) {
  2798. this._mcDataSet = a
  2799. },
  2800. enumerable: !0,
  2801. configurable: !0
  2802. }), Object.defineProperty(c.prototype, "texture", {
  2803. set: function(a) {
  2804. this.setTexture(a)
  2805. },
  2806. enumerable: !0,
  2807. configurable: !0
  2808. }), Object.defineProperty(c.prototype, "spriteSheet", {
  2809. get: function() {
  2810. return this._spriteSheet
  2811. },
  2812. enumerable: !0,
  2813. configurable: !0
  2814. }), c.prototype.setTexture = function(b) {
  2815. this._spriteSheet = b ? new a.SpriteSheet(b) : null
  2816. }, c
  2817. }(a.EventDispatcher);
  2818. a.MovieClipDataFactory = b, b.prototype.__class__ = "egret.MovieClipDataFactory"
  2819. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2820. function c() {
  2821. this.constructor = a
  2822. }
  2823. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2824. c.prototype = b.prototype, a.prototype = new c
  2825. },
  2826. function(a) {
  2827. var b = function(a) {
  2828. function b() {
  2829. a.call(this), this._scaleY = this._scaleX = 1, this._size = 30, this._color = "#FFFFFF", this._fontFamily = "Arial", this._italic = this._bold = !1, this._textAlign = "left", this._multiline = this._visible = !1, this._maxChars = 0
  2830. }
  2831. return __extends(b, a), b.prototype._getText = function() {
  2832. return null
  2833. }, b.prototype._setText = function() {}, b.prototype._setTextType = function() {}, b.prototype._getTextType = function() {
  2834. return null
  2835. }, b.prototype._open = function() {}, b.prototype._show = function() {}, b.prototype._add = function() {}, b.prototype._remove = function() {}, b.prototype._hide = function() {}, b.prototype._addListeners = function() {}, b.prototype._removeListeners = function() {}, b.prototype._setScale = function(a, b) {
  2836. this._scaleX = a, this._scaleY = b
  2837. }, b.prototype.changePosition = function() {}, b.prototype._setSize = function(a) {
  2838. this._size = a
  2839. }, b.prototype._setTextColor = function(a) {
  2840. this._color = a
  2841. }, b.prototype._setTextFontFamily = function(a) {
  2842. this._fontFamily = a
  2843. }, b.prototype._setBold = function(a) {
  2844. this._bold = a
  2845. }, b.prototype._setItalic = function(a) {
  2846. this._italic = a
  2847. }, b.prototype._setTextAlign = function(a) {
  2848. this._textAlign = a
  2849. }, b.prototype._setVisible = function(a) {
  2850. this._visible = a
  2851. }, b.prototype._setWidth = function() {}, b.prototype._setHeight = function() {}, b.prototype._setMultiline = function(a) {
  2852. this._multiline = a
  2853. }, b.prototype._setMaxChars = function(a) {
  2854. this._maxChars = a
  2855. }, b.prototype._resetStageText = function() {}, b.create = function() {
  2856. return null
  2857. }, b
  2858. }(a.EventDispatcher);
  2859. a.StageText = b, b.prototype.__class__ = "egret.StageText"
  2860. }(egret || (egret = {})),
  2861. function(a) {
  2862. var b = function() {
  2863. function a() {}
  2864. return a.GET = "get", a.POST = "post", a
  2865. }();
  2866. a.URLRequestMethod = b, b.prototype.__class__ = "egret.URLRequestMethod"
  2867. }(egret || (egret = {})),
  2868. function(a) {
  2869. var b = function() {
  2870. function a() {}
  2871. return a.BINARY = "binary", a.TEXT = "text", a.VARIABLES = "variables", a.TEXTURE = "texture", a.SOUND = "sound", a
  2872. }();
  2873. a.URLLoaderDataFormat = b, b.prototype.__class__ = "egret.URLLoaderDataFormat"
  2874. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2875. function c() {
  2876. this.constructor = a
  2877. }
  2878. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2879. c.prototype = b.prototype, a.prototype = new c
  2880. },
  2881. function(a) {
  2882. var b = function(a) {
  2883. function b(b) {
  2884. void 0 === b && (b = null), a.call(this), this.variables = null, null !== b && this.decode(b)
  2885. }
  2886. return __extends(b, a), b.prototype.decode = function(a) {
  2887. var b, c, d, e;
  2888. for (this.variables || (this.variables = {}), a = a.split("+").join(" "), c = /[?&]?([^=]+)=([^&]*)/g; b = c.exec(a);) d = decodeURIComponent(b[1]), b = decodeURIComponent(b[2]), 0 == d in this.variables ? this.variables[d] = b : (e = this.variables[d], e instanceof Array ? e.push(b) : this.variables[d] = [e, b])
  2889. }, b.prototype.toString = function() {
  2890. if (!this.variables) return "";
  2891. var a, b = this.variables,
  2892. c = [];
  2893. for (a in b) c.push(this.encodeValue(a, b[a]));
  2894. return c.join("&")
  2895. }, b.prototype.encodeValue = function(a, b) {
  2896. return b instanceof Array ? this.encodeArray(a, b) : encodeURIComponent(a) + "=" + encodeURIComponent(b)
  2897. }, b.prototype.encodeArray = function(a, b) {
  2898. return a ? 0 == b.length ? encodeURIComponent(a) + "=" : b.map(function(b) {
  2899. return encodeURIComponent(a) + "=" + encodeURIComponent(b)
  2900. }).join("&") : ""
  2901. }, b
  2902. }(a.HashObject);
  2903. a.URLVariables = b, b.prototype.__class__ = "egret.URLVariables"
  2904. }(egret || (egret = {})),
  2905. function(a) {
  2906. var b = function() {
  2907. return function(a, b) {
  2908. this.value = this.name = "", this.name = a, this.value = b
  2909. }
  2910. }();
  2911. a.URLRequestHeader = b, b.prototype.__class__ = "egret.URLRequestHeader"
  2912. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2913. function c() {
  2914. this.constructor = a
  2915. }
  2916. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2917. c.prototype = b.prototype, a.prototype = new c
  2918. },
  2919. function(a) {
  2920. var b = function(b) {
  2921. function c(c) {
  2922. void 0 === c && (c = null), b.call(this), this.data = null, this.method = a.URLRequestMethod.GET, this.url = "", this.url = c
  2923. }
  2924. return __extends(c, b), c
  2925. }(a.HashObject);
  2926. a.URLRequest = b, b.prototype.__class__ = "egret.URLRequest"
  2927. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2928. function c() {
  2929. this.constructor = a
  2930. }
  2931. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2932. c.prototype = b.prototype, a.prototype = new c
  2933. },
  2934. function(a) {
  2935. var b = function(b) {
  2936. function c(c) {
  2937. void 0 === c && (c = null), b.call(this), this.dataFormat = a.URLLoaderDataFormat.TEXT, this._request = this.data = null, this._status = -1, c && this.load(c)
  2938. }
  2939. return __extends(c, b), c.prototype.load = function(b) {
  2940. this._request = b, this.data = null, a.MainContext.instance.netContext.proceed(this)
  2941. }, c.prototype.__recycle = function() {
  2942. this.data = this._request = null
  2943. }, c
  2944. }(a.EventDispatcher);
  2945. a.URLLoader = b, b.prototype.__class__ = "egret.URLLoader"
  2946. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2947. function c() {
  2948. this.constructor = a
  2949. }
  2950. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2951. c.prototype = b.prototype, a.prototype = new c
  2952. },
  2953. function(a) {
  2954. var b = function(b) {
  2955. function c() {
  2956. b.call(this), this._sourceHeight = this._sourceWidth = this._textureHeight = this._textureWidth = this._offsetY = this._offsetX = this._bitmapHeight = this._bitmapWidth = this._bitmapY = this._bitmapX = 0, this._bitmapData = null
  2957. }
  2958. return __extends(c, b), Object.defineProperty(c.prototype, "textureWidth", {
  2959. get: function() {
  2960. return this._textureWidth
  2961. },
  2962. enumerable: !0,
  2963. configurable: !0
  2964. }), Object.defineProperty(c.prototype, "textureHeight", {
  2965. get: function() {
  2966. return this._textureHeight
  2967. },
  2968. enumerable: !0,
  2969. configurable: !0
  2970. }), Object.defineProperty(c.prototype, "bitmapData", {
  2971. get: function() {
  2972. return this._bitmapData
  2973. },
  2974. enumerable: !0,
  2975. configurable: !0
  2976. }), c.prototype._setBitmapData = function(b) {
  2977. var c = a.MainContext.instance.rendererContext._texture_scale_factor;
  2978. this._bitmapData = b, this._sourceWidth = b.width, this._sourceHeight = b.height, this._textureWidth = this._sourceWidth * c, this._textureHeight = this._sourceHeight * c, this._bitmapWidth = this._textureWidth, this._bitmapHeight = this._textureHeight, this._offsetX = this._offsetY = this._bitmapX = this._bitmapY = 0
  2979. }, c.prototype.getPixel32 = function(a, b) {
  2980. return this._bitmapData.getContext("2d").getImageData(a, b, 1, 1).data
  2981. }, c
  2982. }(a.HashObject);
  2983. a.Texture = b, b.prototype.__class__ = "egret.Texture"
  2984. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  2985. function c() {
  2986. this.constructor = a
  2987. }
  2988. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  2989. c.prototype = b.prototype, a.prototype = new c
  2990. },
  2991. function(a) {
  2992. var b = function(b) {
  2993. function c() {
  2994. b.call(this)
  2995. }
  2996. return __extends(c, b), c.prototype.init = function() {
  2997. this._bitmapData = document.createElement("canvas"), this.renderContext = a.RendererContext.createRendererContext(this._bitmapData)
  2998. }, c.prototype.drawToTexture = function(b, d, e) {
  2999. var g, h, i, j, f = d || b.getBounds(a.Rectangle.identity);
  3000. if (0 == f.width || 0 == f.height) return !1;
  3001. if (this._bitmapData || this.init(), g = f.x, h = f.y, d = f.width, f = f.height, i = a.MainContext.instance.rendererContext._texture_scale_factor, f /= i, d = Math.round(d / i), f = Math.round(f), this.setSize(d, f), this.begin(), b._worldTransform.identity(), b._worldTransform.a = 1 / i, b._worldTransform.d = 1 / i, e && (b._worldTransform.a *= e, b._worldTransform.d *= e), e = b._anchorOffsetX, j = b._anchorOffsetY, (0 != b._anchorX || 0 != b._anchorY) && (e = b._anchorX * d, j = b._anchorY * f), this._offsetX = g + e, this._offsetY = h + j, b._worldTransform.append(1, 0, 0, 1, -this._offsetX, -this._offsetY), b.worldAlpha = 1, b instanceof a.DisplayObjectContainer)
  3002. for (g = b._children, h = 0, e = g.length; e > h; h++) g[h]._updateTransform();
  3003. return this.renderContext.setTransform(b._worldTransform), g = a.RenderFilter.getInstance(), h = g._drawAreaList.concat(), g._drawAreaList.length = 0, this.renderContext.clearScreen(), this.renderContext.onRenderStart(), a.RendererContext.deleteTexture(this), b._filter && this.renderContext.setGlobalFilter(b._filter), b._colorTransform && this.renderContext.setGlobalColorTransform(b._colorTransform.matrix), (e = b.mask || b._scrollRect) && this.renderContext.pushMask(e), j = a.MainContext.__use_new_draw, a.MainContext.__use_new_draw = !1, b._render(this.renderContext), a.MainContext.__use_new_draw = j, e && this.renderContext.popMask(), b._colorTransform && this.renderContext.setGlobalColorTransform(null), b._filter && this.renderContext.setGlobalFilter(null), c.identityRectangle.width = d, c.identityRectangle.height = f, g.addDrawArea(c.identityRectangle), this.renderContext.onRenderFinish(), g._drawAreaList = h, this._sourceWidth = d, this._sourceHeight = f, this._textureWidth = this._sourceWidth * i, this._textureHeight = this._sourceHeight * i, this.end(), !0
  3004. }, c.prototype.setSize = function(a, b) {
  3005. var c = this._bitmapData;
  3006. c.width = a, c.height = b, c.style.width = a + "px", c.style.height = b + "px", this.renderContext._cacheCanvas && (this.renderContext._cacheCanvas.width = a, this.renderContext._cacheCanvas.height = b)
  3007. }, c.prototype.begin = function() {}, c.prototype.end = function() {}, c.prototype.dispose = function() {
  3008. this._bitmapData && (this.renderContext = this._bitmapData = null)
  3009. }, c.identityRectangle = new a.Rectangle, c
  3010. }(a.Texture);
  3011. a.RenderTexture = b, b.prototype.__class__ = "egret.RenderTexture"
  3012. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  3013. function c() {
  3014. this.constructor = a
  3015. }
  3016. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  3017. c.prototype = b.prototype, a.prototype = new c
  3018. },
  3019. function(a) {
  3020. var b = function(b) {
  3021. function c() {
  3022. b.call(this), this.renderCost = 0, this._texture_scale_factor = 1, this.profiler = a.Profiler.getInstance(), c.blendModesForGL || c.initBlendMode()
  3023. }
  3024. return __extends(c, b), Object.defineProperty(c.prototype, "texture_scale_factor", {
  3025. get: function() {
  3026. return this._texture_scale_factor
  3027. },
  3028. set: function(a) {
  3029. this._setTextureScaleFactor(a)
  3030. },
  3031. enumerable: !0,
  3032. configurable: !0
  3033. }), c.prototype._setTextureScaleFactor = function(a) {
  3034. this._texture_scale_factor = a
  3035. }, c.prototype.clearScreen = function() {}, c.prototype.clearRect = function() {}, c.prototype.drawImage = function() {
  3036. this.profiler.onDrawImage()
  3037. }, c.prototype.drawImageScale9 = function() {
  3038. return !1
  3039. }, c.prototype._addOneDraw = function() {
  3040. this.profiler.onDrawImage()
  3041. }, c.prototype.setTransform = function() {}, c.prototype.setAlpha = function() {}, c.prototype.setupFont = function() {}, c.prototype.measureText = function() {
  3042. return 0
  3043. }, c.prototype.drawText = function() {
  3044. this.profiler.onDrawImage()
  3045. }, c.prototype.strokeRect = function() {}, c.prototype.pushMask = function() {}, c.prototype.popMask = function() {}, c.prototype.onRenderStart = function() {}, c.prototype.onRenderFinish = function() {}, c.prototype.setGlobalColorTransform = function() {}, c.prototype.setGlobalFilter = function() {}, c.createRendererContext = function() {
  3046. return null
  3047. }, c.deleteTexture = function(b) {
  3048. var d, e, c = a.MainContext.instance.rendererContext.gl;
  3049. if (b = b._bitmapData) {
  3050. if (d = b.webGLTexture, d && c)
  3051. for (e in d) c.deleteTexture(d[e]);
  3052. b.webGLTexture = null
  3053. }
  3054. }, c.initBlendMode = function() {
  3055. c.blendModesForGL = {}, c.blendModesForGL[a.BlendMode.NORMAL] = [1, 771], c.blendModesForGL[a.BlendMode.ADD] = [770, 1], c.blendModesForGL[a.BlendMode.ERASE] = [0, 770]
  3056. }, c.registerBlendModeForGL = function(b, d, e, f) {
  3057. c.blendModesForGL[b] && !f ? a.Logger.warningWithErrorId(1005, b) : c.blendModesForGL[b] = [d, e]
  3058. }, c.imageSmoothingEnabled = !0, c.blendModesForGL = null, c
  3059. }(a.HashObject);
  3060. a.RendererContext = b, b.prototype.__class__ = "egret.RendererContext"
  3061. }(egret || (egret = {})),
  3062. function(a) {
  3063. var b = function() {
  3064. function a() {}
  3065. return a.MOUSE = "mouse", a.TOUCH = "touch", a.mode = "touch", a
  3066. }();
  3067. a.InteractionMode = b, b.prototype.__class__ = "egret.InteractionMode"
  3068. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  3069. function c() {
  3070. this.constructor = a
  3071. }
  3072. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  3073. c.prototype = b.prototype, a.prototype = new c
  3074. },
  3075. function(a) {
  3076. var b = function(b) {
  3077. function c() {
  3078. b.call(this), this._currentTouchTarget = {}, this.maxTouches = 2, this.touchDownTarget = {}, this.touchingIdentifiers = [], this.lastTouchY = this.lastTouchX = -1
  3079. }
  3080. return __extends(c, b), c.prototype.run = function() {}, c.prototype.getTouchData = function(a, b, c) {
  3081. var d = this._currentTouchTarget[a];
  3082. return null == d && (d = {}, this._currentTouchTarget[a] = d), d.stageX = b, d.stageY = c, d.identifier = a, d
  3083. }, c.prototype.dispatchEvent = function(b, c) {
  3084. a.TouchEvent.dispatchTouchEvent(c.target, b, c.identifier, c.stageX, c.stageY, !1, !1, !1, 1 == this.touchDownTarget[c.identifier])
  3085. }, c.prototype.onTouchBegan = function(b, c, d) {
  3086. if (this.touchingIdentifiers.length != this.maxTouches) {
  3087. var e = a.MainContext.instance.stage.hitTest(b, c);
  3088. e && (b = this.getTouchData(d, b, c), this.touchDownTarget[d] = !0, b.target = e, b.beginTarget = e, this.dispatchEvent(a.TouchEvent.TOUCH_BEGIN, b)), this.touchingIdentifiers.push(d)
  3089. }
  3090. }, c.prototype.onTouchMove = function(b, c, d) {
  3091. if (-1 != this.touchingIdentifiers.indexOf(d) && (b != this.lastTouchX || c != this.lastTouchY)) {
  3092. this.lastTouchX = b, this.lastTouchY = c;
  3093. var e = a.MainContext.instance.stage.hitTest(b, c);
  3094. e && (b = this.getTouchData(d, b, c), b.target = e, this.dispatchEvent(a.TouchEvent.TOUCH_MOVE, b))
  3095. }
  3096. }, c.prototype.onTouchEnd = function(b, c, d) {
  3097. var e = this.touchingIdentifiers.indexOf(d); - 1 != e && (this.touchingIdentifiers.splice(e, 1), e = a.MainContext.instance.stage.hitTest(b, c)) && (b = this.getTouchData(d, b, c), delete this.touchDownTarget[d], d = b.beginTarget, b.target = e, this.dispatchEvent(a.TouchEvent.TOUCH_END, b), d == e ? this.dispatchEvent(a.TouchEvent.TOUCH_TAP, b) : b.beginTarget && (b.target = b.beginTarget, this.dispatchEvent(a.TouchEvent.TOUCH_RELEASE_OUTSIDE, b)), delete this._currentTouchTarget[b.identifier])
  3098. }, c
  3099. }(a.HashObject);
  3100. a.TouchContext = b, b.prototype.__class__ = "egret.TouchContext"
  3101. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  3102. function c() {
  3103. this.constructor = a
  3104. }
  3105. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  3106. c.prototype = b.prototype, a.prototype = new c
  3107. },
  3108. function(a) {
  3109. var b = function(b) {
  3110. function c() {
  3111. b.call(this)
  3112. }
  3113. return __extends(c, b), c.prototype.proceed = function() {}, c._getUrl = function(b) {
  3114. var c = b.url;
  3115. return -1 == c.indexOf("?") && b.method == a.URLRequestMethod.GET && b.data && b.data instanceof a.URLVariables && (c = c + "?" + b.data.toString()), c
  3116. }, c.prototype.getChangeList = function() {
  3117. return []
  3118. }, c
  3119. }(a.HashObject);
  3120. a.NetContext = b, b.prototype.__class__ = "egret.NetContext"
  3121. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  3122. function c() {
  3123. this.constructor = a
  3124. }
  3125. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  3126. c.prototype = b.prototype, a.prototype = new c
  3127. },
  3128. function(a) {
  3129. var b = function(a) {
  3130. function b() {
  3131. a.call(this), this.frameRate = 60
  3132. }
  3133. return __extends(b, a), b.prototype.executeMainLoop = function() {}, b
  3134. }(a.HashObject);
  3135. a.DeviceContext = b, b.prototype.__class__ = "egret.DeviceContext"
  3136. }(egret || (egret = {})),
  3137. function(a) {
  3138. var b = function() {
  3139. function a() {}
  3140. return a.call = function() {}, a.addCallback = function() {}, a
  3141. }();
  3142. a.ExternalInterface = b, b.prototype.__class__ = "egret.ExternalInterface"
  3143. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  3144. function c() {
  3145. this.constructor = a
  3146. }
  3147. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  3148. c.prototype = b.prototype, a.prototype = new c
  3149. },
  3150. function(a) {
  3151. var b = function(b) {
  3152. function c() {
  3153. b.call(this), this.trans = null, this.ua = navigator.userAgent.toLowerCase(), this.trans = this._getTrans()
  3154. }
  3155. return __extends(c, b), c.getInstance = function() {
  3156. return null == c.instance && (c.instance = new c), c.instance
  3157. }, Object.defineProperty(c.prototype, "isMobile", {
  3158. get: function() {
  3159. return a.Logger.warningWithErrorId(1e3), a.MainContext.deviceType == a.MainContext.DEVICE_MOBILE
  3160. },
  3161. enumerable: !0,
  3162. configurable: !0
  3163. }), c.prototype._getHeader = function(a) {
  3164. if ("transform" in a) return "";
  3165. for (var b = ["webkit", "ms", "Moz", "O"], c = 0; c < b.length; c++)
  3166. if (b[c] + "Transform" in a) return b[c];
  3167. return ""
  3168. }, c.prototype._getTrans = function() {
  3169. var a = document.createElement("div").style,
  3170. a = this._getHeader(a);
  3171. return "" == a ? "transform" : a + "Transform"
  3172. }, c.prototype.$new = function(a) {
  3173. return this.$(document.createElement(a))
  3174. }, c.prototype.$ = function(b) {
  3175. var d = document;
  3176. return (b = b instanceof HTMLElement ? b : d.querySelector(b)) && (b.find = b.find || this.$, b.hasClass = b.hasClass || function(a) {
  3177. return this.className.match(new RegExp("(\\s|^)" + a + "(\\s|$)"))
  3178. }, b.addClass = b.addClass || function(a) {
  3179. return this.hasClass(a) || (this.className && (this.className += " "), this.className += a), this
  3180. }, b.removeClass = b.removeClass || function(a) {
  3181. return this.hasClass(a) && (this.className = this.className.replace(a, "")), this
  3182. }, b.remove = b.remove || function() {}, b.appendTo = b.appendTo || function(a) {
  3183. return a.appendChild(this), this
  3184. }, b.prependTo = b.prependTo || function(a) {
  3185. return a.childNodes[0] ? a.insertBefore(this, a.childNodes[0]) : a.appendChild(this), this
  3186. }, b.transforms = b.transforms || function() {
  3187. return this.style[c.getInstance().trans] = c.getInstance().translate(this.position) + c.getInstance().rotate(this.rotation) + c.getInstance().scale(this.scale) + c.getInstance().skew(this.skew), this
  3188. }, b.position = b.position || {
  3189. x: 0,
  3190. y: 0
  3191. }, b.rotation = b.rotation || 0, b.scale = b.scale || {
  3192. x: 1,
  3193. y: 1
  3194. }, b.skew = b.skew || {
  3195. x: 0,
  3196. y: 0
  3197. }, b.translates = function(b, c) {
  3198. return this.position.x = b, this.position.y = c - a.MainContext.instance.stage.stageHeight, this.transforms(), this
  3199. }, b.rotate = function(a) {
  3200. return this.rotation = a, this.transforms(), this
  3201. }, b.resize = function(a, b) {
  3202. return this.scale.x = a, this.scale.y = b, this.transforms(), this
  3203. }, b.setSkew = function(a, b) {
  3204. return this.skew.x = a, this.skew.y = b, this.transforms(), this
  3205. }), b
  3206. }, c.prototype.translate = function(a) {
  3207. return "translate(" + a.x + "px, " + a.y + "px) "
  3208. }, c.prototype.rotate = function(a) {
  3209. return "rotate(" + a + "deg) "
  3210. }, c.prototype.scale = function(a) {
  3211. return "scale(" + a.x + ", " + a.y + ") "
  3212. }, c.prototype.skew = function(a) {
  3213. return "skewX(" + -a.x + "deg) skewY(" + a.y + "deg)"
  3214. }, c
  3215. }(a.HashObject);
  3216. a.Browser = b, b.prototype.__class__ = "egret.Browser"
  3217. }(egret || (egret = {})),
  3218. function(a) {
  3219. ! function(a) {
  3220. a.getItem = function() {
  3221. return null
  3222. }, a.setItem = function() {
  3223. return !1
  3224. }, a.removeItem = function() {}, a.clear = function() {}
  3225. }(a.localStorage || (a.localStorage = {}))
  3226. }(egret || (egret = {})),
  3227. function(a) {
  3228. var b = function() {
  3229. function b() {}
  3230. return b.parse = function(c) {
  3231. var d, e, f, g;
  3232. if (c = a.SAXParser.getInstance().parserXML(c), !c || !c.childNodes) return null;
  3233. for (d = c.childNodes.length, e = !1, f = 0; d > f; f++)
  3234. if (g = c.childNodes[f], 1 == g.nodeType) {
  3235. e = !0;
  3236. break
  3237. }
  3238. return e ? b.parseNode(g) : null
  3239. }, b.parseNode = function(a) {
  3240. var c, d, e, f, g, h;
  3241. if (!a || 1 != a.nodeType) return null;
  3242. for (c = {}, c.localName = a.localName, c.name = a.nodeName, a.namespaceURI && (c.namespace = a.namespaceURI), a.prefix && (c.prefix = a.prefix), d = a.attributes, e = d.length, f = 0; e > f; f++) g = d[f], h = g.name, 0 != h.indexOf("xmlns:") && (c["$" + h] = g.value);
  3243. for (d = a.childNodes, e = d.length, f = 0; e > f; f++)(g = b.parseNode(d[f])) && (c.children || (c.children = []), g.parent = c, c.children.push(g));
  3244. return !c.children && (a = a.textContent.trim()) && (c.text = a), c
  3245. }, b.findChildren = function(a, c, d) {
  3246. return d ? d.length = 0 : d = [], b.findByPath(a, c, d), d
  3247. }, b.findByPath = function(a, c, d) {
  3248. var e, g, h, i, f = c.indexOf(".");
  3249. if (-1 == f ? (e = c, f = !0) : (e = c.substring(0, f), c = c.substring(f + 1), f = !1), a = a.children)
  3250. for (g = a.length, h = 0; g > h; h++) i = a[h], i.localName == e && (f ? d.push(i) : b.findByPath(i, c, d))
  3251. }, b.getAttributes = function(a, b) {
  3252. b ? b.length = 0 : b = [];
  3253. for (var c in a) "$" == c.charAt(0) && b.push(c.substring(1));
  3254. return b
  3255. }, b
  3256. }();
  3257. a.XML = b, b.prototype.__class__ = "egret.XML"
  3258. }(egret || (egret = {})),
  3259. function(a) {
  3260. var c, b = function() {
  3261. function a() {}
  3262. return a.LITTLE_ENDIAN = "LITTLE_ENDIAN", a.BIG_ENDIAN = "BIG_ENDIAN", a
  3263. }();
  3264. a.Endian = b, b.prototype.__class__ = "egret.Endian", c = function() {
  3265. function c(a) {
  3266. this.BUFFER_EXT_SIZE = 0, this.EOF_code_point = this.EOF_byte = -1, this._setArrayBuffer(a || new ArrayBuffer(this.BUFFER_EXT_SIZE)), this.endian = b.BIG_ENDIAN
  3267. }
  3268. return c.prototype._setArrayBuffer = function(a) {
  3269. this.write_position = a.byteLength, this.data = new DataView(a), this._position = 0
  3270. }, c.prototype.setArrayBuffer = function() {}, Object.defineProperty(c.prototype, "buffer", {
  3271. get: function() {
  3272. return this.data.buffer
  3273. },
  3274. set: function(a) {
  3275. this.data = new DataView(a)
  3276. },
  3277. enumerable: !0,
  3278. configurable: !0
  3279. }), Object.defineProperty(c.prototype, "dataView", {
  3280. get: function() {
  3281. return this.data
  3282. },
  3283. set: function(a) {
  3284. this.data = a, this.write_position = a.byteLength
  3285. },
  3286. enumerable: !0,
  3287. configurable: !0
  3288. }), Object.defineProperty(c.prototype, "bufferOffset", {
  3289. get: function() {
  3290. return this.data.byteOffset
  3291. },
  3292. enumerable: !0,
  3293. configurable: !0
  3294. }), Object.defineProperty(c.prototype, "position", {
  3295. get: function() {
  3296. return this._position
  3297. },
  3298. set: function(a) {
  3299. this._position < a && !this.validate(a - this._position) || (this._position = a, this.write_position = a > this.write_position ? a : this.write_position)
  3300. },
  3301. enumerable: !0,
  3302. configurable: !0
  3303. }), Object.defineProperty(c.prototype, "length", {
  3304. get: function() {
  3305. return this.write_position
  3306. },
  3307. set: function(a) {
  3308. this.validateBuffer(a)
  3309. },
  3310. enumerable: !0,
  3311. configurable: !0
  3312. }), Object.defineProperty(c.prototype, "bytesAvailable", {
  3313. get: function() {
  3314. return this.data.byteLength - this._position
  3315. },
  3316. enumerable: !0,
  3317. configurable: !0
  3318. }), c.prototype.clear = function() {
  3319. this._setArrayBuffer(new ArrayBuffer(this.BUFFER_EXT_SIZE))
  3320. }, c.prototype.readBoolean = function() {
  3321. return this.validate(c.SIZE_OF_BOOLEAN) ? 0 != this.data.getUint8(this.position++) : null
  3322. }, c.prototype.readByte = function() {
  3323. return this.validate(c.SIZE_OF_INT8) ? this.data.getInt8(this.position++) : null
  3324. }, c.prototype.readBytes = function(a, b, d) {
  3325. if (void 0 === b && (b = 0), void 0 === d && (d = 0), 0 == d) d = this.bytesAvailable;
  3326. else if (!this.validate(d)) return null;
  3327. a ? a.validateBuffer(d) : a = new c(new ArrayBuffer(d));
  3328. for (var e = 0; d > e; e++) a.data.setUint8(e + b, this.data.getUint8(this.position++))
  3329. }, c.prototype.readDouble = function() {
  3330. if (!this.validate(c.SIZE_OF_FLOAT64)) return null;
  3331. var a = this.data.getFloat64(this.position, this.endian == b.LITTLE_ENDIAN);
  3332. return this.position += c.SIZE_OF_FLOAT64, a
  3333. }, c.prototype.readFloat = function() {
  3334. if (!this.validate(c.SIZE_OF_FLOAT32)) return null;
  3335. var a = this.data.getFloat32(this.position, this.endian == b.LITTLE_ENDIAN);
  3336. return this.position += c.SIZE_OF_FLOAT32, a
  3337. }, c.prototype.readInt = function() {
  3338. if (!this.validate(c.SIZE_OF_INT32)) return null;
  3339. var a = this.data.getInt32(this.position, this.endian == b.LITTLE_ENDIAN);
  3340. return this.position += c.SIZE_OF_INT32, a
  3341. }, c.prototype.readMultiByte = function(a) {
  3342. return this.validate(a) ? "" : null
  3343. }, c.prototype.readShort = function() {
  3344. if (!this.validate(c.SIZE_OF_INT16)) return null;
  3345. var a = this.data.getInt16(this.position, this.endian == b.LITTLE_ENDIAN);
  3346. return this.position += c.SIZE_OF_INT16, a
  3347. }, c.prototype.readUnsignedByte = function() {
  3348. return this.validate(c.SIZE_OF_UINT8) ? this.data.getUint8(this.position++) : null
  3349. }, c.prototype.readUnsignedInt = function() {
  3350. if (!this.validate(c.SIZE_OF_UINT32)) return null;
  3351. var a = this.data.getUint32(this.position, this.endian == b.LITTLE_ENDIAN);
  3352. return this.position += c.SIZE_OF_UINT32, a
  3353. }, c.prototype.readUnsignedShort = function() {
  3354. if (!this.validate(c.SIZE_OF_UINT16)) return null;
  3355. var a = this.data.getUint16(this.position, this.endian == b.LITTLE_ENDIAN);
  3356. return this.position += c.SIZE_OF_UINT16, a
  3357. }, c.prototype.readUTF = function() {
  3358. if (!this.validate(c.SIZE_OF_UINT16)) return null;
  3359. var a = this.data.getUint16(this.position, this.endian == b.LITTLE_ENDIAN);
  3360. return this.position += c.SIZE_OF_UINT16, a > 0 ? this.readUTFBytes(a) : ""
  3361. }, c.prototype.readUTFBytes = function(a) {
  3362. if (!this.validate(a)) return null;
  3363. var b = new Uint8Array(this.buffer, this.bufferOffset + this.position, a);
  3364. return this.position += a, this.decodeUTF8(b)
  3365. }, c.prototype.writeBoolean = function(a) {
  3366. this.validateBuffer(c.SIZE_OF_BOOLEAN), this.data.setUint8(this.position++, a ? 1 : 0)
  3367. }, c.prototype.writeByte = function(a) {
  3368. this.validateBuffer(c.SIZE_OF_INT8), this.data.setInt8(this.position++, a)
  3369. }, c.prototype.writeBytes = function(a, b, c) {
  3370. if (void 0 === b && (b = 0), void 0 === c && (c = 0), !(0 > b || 0 > c) && (c = 0 == c ? a.length - b : Math.min(a.length - b, c), c > 0)) {
  3371. this.validateBuffer(c), a = new DataView(a.buffer);
  3372. for (var d = b; c + b > d; d++) this.data.setUint8(this.position++, a.getUint8(d))
  3373. }
  3374. }, c.prototype.writeDouble = function(a) {
  3375. this.validateBuffer(c.SIZE_OF_FLOAT64), this.data.setFloat64(this.position, a, this.endian == b.LITTLE_ENDIAN), this.position += c.SIZE_OF_FLOAT64
  3376. }, c.prototype.writeFloat = function(a) {
  3377. this.validateBuffer(c.SIZE_OF_FLOAT32), this.data.setFloat32(this.position, a, this.endian == b.LITTLE_ENDIAN), this.position += c.SIZE_OF_FLOAT32
  3378. }, c.prototype.writeInt = function(a) {
  3379. this.validateBuffer(c.SIZE_OF_INT32), this.data.setInt32(this.position, a, this.endian == b.LITTLE_ENDIAN), this.position += c.SIZE_OF_INT32
  3380. }, c.prototype.writeShort = function(a) {
  3381. this.validateBuffer(c.SIZE_OF_INT16), this.data.setInt16(this.position, a, this.endian == b.LITTLE_ENDIAN), this.position += c.SIZE_OF_INT16
  3382. }, c.prototype.writeUnsignedInt = function(a) {
  3383. this.validateBuffer(c.SIZE_OF_UINT32), this.data.setUint32(this.position, a, this.endian == b.LITTLE_ENDIAN), this.position += c.SIZE_OF_UINT32
  3384. }, c.prototype.writeUTF = function(a) {
  3385. a = this.encodeUTF8(a);
  3386. var d = a.length;
  3387. this.validateBuffer(c.SIZE_OF_UINT16 + d), this.data.setUint16(this.position, d, this.endian === b.LITTLE_ENDIAN), this.position += c.SIZE_OF_UINT16, this._writeUint8Array(a, !1)
  3388. }, c.prototype.writeUTFBytes = function(a) {
  3389. this._writeUint8Array(this.encodeUTF8(a))
  3390. }, c.prototype.toString = function() {
  3391. return "[ByteArray] length:" + this.length + ", bytesAvailable:" + this.bytesAvailable
  3392. }, c.prototype._writeUint8Array = function(a, b) {
  3393. void 0 === b && (b = !0), b && this.validateBuffer(this.position + a.length);
  3394. for (var c = 0; c < a.length; c++) this.data.setUint8(this.position++, a[c])
  3395. }, c.prototype.validate = function(b) {
  3396. if (0 < this.data.byteLength && this._position + b <= this.data.byteLength) return !0;
  3397. throw a.getString(1025)
  3398. }, c.prototype.validateBuffer = function(a) {
  3399. this.write_position = a > this.write_position ? a : this.write_position, a += this._position, this.data.byteLength < a && (a = new Uint8Array(new ArrayBuffer(a + this.BUFFER_EXT_SIZE)), a.set(new Uint8Array(this.data.buffer)), this.buffer = a.buffer)
  3400. }, c.prototype.encodeUTF8 = function(a) {
  3401. var c, d, e, f, g, b = 0;
  3402. for (a = this.stringToCodePoints(a), c = []; a.length > b;)
  3403. if (d = a[b++], this.inRange(d, 55296, 57343)) this.encoderError(d);
  3404. else if (this.inRange(d, 0, 127)) c.push(d);
  3405. else
  3406. for (this.inRange(d, 128, 2047) ? (e = 1, f = 192) : this.inRange(d, 2048, 65535) ? (e = 2, f = 224) : this.inRange(d, 65536, 1114111) && (e = 3, f = 240), c.push(this.div(d, Math.pow(64, e)) + f); e > 0;) g = this.div(d, Math.pow(64, e - 1)), c.push(128 + g % 64), e -= 1;
  3407. return new Uint8Array(c)
  3408. }, c.prototype.decodeUTF8 = function(a) {
  3409. var b, c, d, e, f, g, h, i, j;
  3410. for (c = 0, d = "", e = 0, f = 0, g = 0, h = 0; a.length > c;) b = a[c++], b === this.EOF_byte ? b = 0 !== f ? this.decoderError(!1) : this.EOF_code_point : 0 === f ? this.inRange(b, 0, 127) || (this.inRange(b, 194, 223) ? (f = 1, h = 128, e = b - 192) : this.inRange(b, 224, 239) ? (f = 2, h = 2048, e = b - 224) : this.inRange(b, 240, 244) ? (f = 3, h = 65536, e = b - 240) : this.decoderError(!1), e *= Math.pow(64, f), b = null) : this.inRange(b, 128, 191) ? (g += 1, e += (b - 128) * Math.pow(64, f - g), g !== f ? b = null : (i = e, j = h, h = g = f = e = 0, b = this.inRange(i, j, 1114111) && !this.inRange(i, 55296, 57343) ? i : this.decoderError(!1, b))) : (h = g = f = e = 0, c--, b = this.decoderError(!1, b)), null !== b && b !== this.EOF_code_point && (65535 >= b ? b > 0 && (d += String.fromCharCode(b)) : (b -= 65536, d += String.fromCharCode(55296 + (1023 & b >> 10)), d += String.fromCharCode(56320 + (1023 & b))));
  3411. return d
  3412. }, c.prototype.encoderError = function(b) {
  3413. throw a.getString(1026, b)
  3414. }, c.prototype.decoderError = function(b, c) {
  3415. if (b) throw a.getString(1027);
  3416. return c || 65533
  3417. }, c.prototype.inRange = function(a, b, c) {
  3418. return a >= b && c >= a
  3419. }, c.prototype.div = function(a, b) {
  3420. return Math.floor(a / b)
  3421. }, c.prototype.stringToCodePoints = function(a) {
  3422. var b, c, d, e, f;
  3423. for (b = [], c = 0, d = a.length; c < a.length;) e = a.charCodeAt(c), this.inRange(e, 55296, 57343) ? this.inRange(e, 56320, 57343) ? b.push(65533) : c === d - 1 ? b.push(65533) : (f = a.charCodeAt(c + 1), this.inRange(f, 56320, 57343) ? (e &= 1023, f &= 1023, c += 1, b.push(65536 + (e << 10) + f)) : b.push(65533)) : b.push(e), c += 1;
  3424. return b
  3425. }, c.SIZE_OF_BOOLEAN = 1, c.SIZE_OF_INT8 = 1, c.SIZE_OF_INT16 = 2, c.SIZE_OF_INT32 = 4, c.SIZE_OF_UINT8 = 1, c.SIZE_OF_UINT16 = 2, c.SIZE_OF_UINT32 = 4, c.SIZE_OF_FLOAT32 = 4, c.SIZE_OF_FLOAT64 = 8, c
  3426. }(), a.ByteArray = c, c.prototype.__class__ = "egret.ByteArray"
  3427. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  3428. function c() {
  3429. this.constructor = a
  3430. }
  3431. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  3432. c.prototype = b.prototype, a.prototype = new c
  3433. },
  3434. function(a) {
  3435. var b = function(b) {
  3436. function c(a, c, d) {
  3437. b.call(this), this._target = null, this.loop = this.ignoreGlobalPause = this._useTicks = !1, this._actions = this._steps = this.pluginData = null, this.paused = !1, this.duration = 0, this._prevPos = -1, this.position = null, this._stepPosition = this._prevPosition = 0, this.passive = !1, this.initialize(a, c, d)
  3438. }
  3439. return __extends(c, b), c.get = function(a, b, d, e) {
  3440. return void 0 === b && (b = null), void 0 === d && (d = null), void 0 === e && (e = !1), e && c.removeTweens(a), new c(a, b, d)
  3441. }, c.removeTweens = function(a) {
  3442. if (a.tween_count) {
  3443. for (var b = c._tweens, d = b.length - 1; d >= 0; d--) b[d]._target == a && (b[d].paused = !0, b.splice(d, 1));
  3444. a.tween_count = 0
  3445. }
  3446. }, c.pauseTweens = function(b) {
  3447. if (b.tween_count)
  3448. for (var c = a.Tween._tweens, d = c.length - 1; d >= 0; d--) c[d]._target == b && (c[d].paused = !0)
  3449. }, c.resumeTweens = function(b) {
  3450. if (b.tween_count)
  3451. for (var c = a.Tween._tweens, d = c.length - 1; d >= 0; d--) c[d]._target == b && (c[d].paused = !1)
  3452. }, c.tick = function(a, b) {
  3453. var d, e, f;
  3454. for (void 0 === b && (b = !1), d = c._tweens.concat(), e = d.length - 1; e >= 0; e--) f = d[e], b && !f.ignoreGlobalPause || f.paused || f.tick(f._useTicks ? 1 : a)
  3455. }, c._register = function(b, d) {
  3456. var e = b._target,
  3457. f = c._tweens;
  3458. if (d) e && (e.tween_count = 0 < e.tween_count ? e.tween_count + 1 : 1), f.push(b), c._inited || (a.Ticker.getInstance().register(c.tick, null), c._inited = !0);
  3459. else
  3460. for (e && e.tween_count--, e = f.length; e--;)
  3461. if (f[e] == b) {
  3462. f.splice(e, 1);
  3463. break
  3464. }
  3465. }, c.removeAllTweens = function() {
  3466. var a, b, d, e;
  3467. for (a = c._tweens, b = 0, d = a.length; d > b; b++) e = a[b], e.paused = !0, e._target.tweenjs_count = 0;
  3468. a.length = 0
  3469. }, c.prototype.initialize = function(a, b, d) {
  3470. this._target = a, b && (this._useTicks = b.useTicks, this.ignoreGlobalPause = b.ignoreGlobalPause, this.loop = b.loop, b.onChange && this.addEventListener("change", b.onChange, b.onChangeObj), b.override && c.removeTweens(a)), this.pluginData = d || {}, this._curQueueProps = {}, this._initQueueProps = {}, this._steps = [], this._actions = [], b && b.paused ? this.paused = !0 : c._register(this, !0), b && null != b.position && this.setPosition(b.position, c.NONE)
  3471. }, c.prototype.setPosition = function(a, b) {
  3472. var c, d, e, f, g;
  3473. if (void 0 === b && (b = 1), 0 > a && (a = 0), c = a, d = !1, c >= this.duration && (this.loop ? c %= this.duration : (c = this.duration, d = !0)), c == this._prevPos) return d;
  3474. if (e = this._prevPos, this.position = this._prevPos = c, this._prevPosition = a, this._target)
  3475. if (d) this._updateTargetProps(null, 1);
  3476. else if (0 < this._steps.length) {
  3477. for (f = 0, g = this._steps.length; g > f && !(this._steps[f].t > c); f++);
  3478. f = this._steps[f - 1], this._updateTargetProps(f, (this._stepPosition = c - f.t) / f.d)
  3479. }
  3480. return 0 != b && 0 < this._actions.length && (this._useTicks ? this._runActions(c, c) : 1 == b && e > c ? (e != this.duration && this._runActions(e, this.duration), this._runActions(0, c, !0)) : this._runActions(e, c)), d && this.setPaused(!0), this.dispatchEventWith("change"), d
  3481. }, c.prototype._runActions = function(a, b, c) {
  3482. var d, e, f, g, h, i;
  3483. for (void 0 === c && (c = !1), d = a, e = b, f = -1, g = this._actions.length, h = 1, a > b && (d = b, e = a, f = g, g = h = -1);
  3484. (f += h) != g;) b = this._actions[f], i = b.t, (i == e || i > d && e > i || c && i == a) && b.f.apply(b.o, b.p)
  3485. }, c.prototype._updateTargetProps = function(a, b) {
  3486. var d, e, f, g, h, i, j, k, l;
  3487. if (a || 1 != b) {
  3488. if (this.passive = !!a.v) return;
  3489. a.e && (b = a.e(b, 0, 1, 1)), d = a.p0, e = a.p1
  3490. } else this.passive = !1, d = e = this._curQueueProps;
  3491. for (h in this._initQueueProps) {
  3492. if (null == (f = d[h]) && (d[h] = f = this._initQueueProps[h]), null == (g = e[h]) && (e[h] = g = f), f = f == g || 0 == b || 1 == b || "number" != typeof f ? 1 == b ? g : f : f + (g - f) * b, i = !1, g = c._plugins[h])
  3493. for (j = 0, k = g.length; k > j; j++) l = g[j].tween(this, h, f, d, e, b, !!a && d == e, !a), l == c.IGNORE ? i = !0 : f = l;
  3494. i || (this._target[h] = f)
  3495. }
  3496. }, c.prototype.setPaused = function(a) {
  3497. return this.paused = a, c._register(this, !a), this
  3498. }, c.prototype._cloneProps = function(a) {
  3499. var b, c = {};
  3500. for (b in a) c[b] = a[b];
  3501. return c
  3502. }, c.prototype._addStep = function(a) {
  3503. return 0 < a.d && (this._steps.push(a), a.t = this.duration, this.duration += a.d), this
  3504. }, c.prototype._appendQueueProps = function(a) {
  3505. var b, d, e, f, g, h;
  3506. for (h in a)
  3507. if (void 0 === this._initQueueProps[h]) {
  3508. if (d = this._target[h], b = c._plugins[h])
  3509. for (e = 0, f = b.length; f > e; e++) d = b[e].init(this, h, d);
  3510. this._initQueueProps[h] = this._curQueueProps[h] = void 0 === d ? null : d
  3511. }
  3512. for (h in a) {
  3513. if (d = this._curQueueProps[h], b = c._plugins[h])
  3514. for (g = g || {}, e = 0, f = b.length; f > e; e++) b[e].step && b[e].step(this, h, d, a[h], g);
  3515. this._curQueueProps[h] = a[h]
  3516. }
  3517. return g && this._appendQueueProps(g), this._curQueueProps
  3518. }, c.prototype._addAction = function(a) {
  3519. return a.t = this.duration, this._actions.push(a), this
  3520. }, c.prototype._set = function(a, b) {
  3521. for (var c in a) b[c] = a[c]
  3522. }, c.prototype.wait = function(a, b) {
  3523. if (null == a || 0 >= a) return this;
  3524. var c = this._cloneProps(this._curQueueProps);
  3525. return this._addStep({
  3526. d: a,
  3527. p0: c,
  3528. p1: c,
  3529. v: b
  3530. })
  3531. }, c.prototype.to = function(a, b, c) {
  3532. return void 0 === c && (c = void 0), (isNaN(b) || 0 > b) && (b = 0), this._addStep({
  3533. d: b || 0,
  3534. p0: this._cloneProps(this._curQueueProps),
  3535. e: c,
  3536. p1: this._cloneProps(this._appendQueueProps(a))
  3537. })
  3538. }, c.prototype.call = function(a, b, c) {
  3539. return void 0 === b && (b = void 0), void 0 === c && (c = void 0), this._addAction({
  3540. f: a,
  3541. p: c ? c : [],
  3542. o: b ? b : this._target
  3543. })
  3544. }, c.prototype.set = function(a, b) {
  3545. return void 0 === b && (b = null), this._addAction({
  3546. f: this._set,
  3547. o: this,
  3548. p: [a, b ? b : this._target]
  3549. })
  3550. }, c.prototype.play = function(a) {
  3551. return a || (a = this), this.call(a.setPaused, a, [!1])
  3552. }, c.prototype.pause = function(a) {
  3553. return a || (a = this), this.call(a.setPaused, a, [!0])
  3554. }, c.prototype.tick = function(a) {
  3555. this.paused || this.setPosition(this._prevPosition + a)
  3556. }, c.NONE = 0, c.LOOP = 1, c.REVERSE = 2, c._tweens = [], c.IGNORE = {}, c._plugins = {}, c._inited = !1, c
  3557. }(a.EventDispatcher);
  3558. a.Tween = b, b.prototype.__class__ = "egret.Tween"
  3559. }(egret || (egret = {})),
  3560. function(a) {
  3561. var b = function() {
  3562. function b() {
  3563. a.Logger.fatalWithErrorId(1014)
  3564. }
  3565. return b.get = function(a) {
  3566. return -1 > a && (a = -1), a > 1 && (a = 1),
  3567. function(b) {
  3568. return 0 == a ? b : 0 > a ? b * (b * -a + 1 + a) : b * ((2 - b) * a + (1 - a))
  3569. }
  3570. }, b.getPowIn = function(a) {
  3571. return function(b) {
  3572. return Math.pow(b, a)
  3573. }
  3574. }, b.getPowOut = function(a) {
  3575. return function(b) {
  3576. return 1 - Math.pow(1 - b, a)
  3577. }
  3578. }, b.getPowInOut = function(a) {
  3579. return function(b) {
  3580. return 1 > (b *= 2) ? .5 * Math.pow(b, a) : 1 - .5 * Math.abs(Math.pow(2 - b, a))
  3581. }
  3582. }, b.sineIn = function(a) {
  3583. return 1 - Math.cos(a * Math.PI / 2)
  3584. }, b.sineOut = function(a) {
  3585. return Math.sin(a * Math.PI / 2)
  3586. }, b.sineInOut = function(a) {
  3587. return -.5 * (Math.cos(Math.PI * a) - 1)
  3588. }, b.getBackIn = function(a) {
  3589. return function(b) {
  3590. return b * b * ((a + 1) * b - a)
  3591. }
  3592. }, b.getBackOut = function(a) {
  3593. return function(b) {
  3594. return --b * b * ((a + 1) * b + a) + 1
  3595. }
  3596. }, b.getBackInOut = function(a) {
  3597. return a *= 1.525,
  3598. function(b) {
  3599. return 1 > (b *= 2) ? .5 * b * b * ((a + 1) * b - a) : .5 * ((b -= 2) * b * ((a + 1) * b + a) + 2)
  3600. }
  3601. }, b.circIn = function(a) {
  3602. return -(Math.sqrt(1 - a * a) - 1)
  3603. }, b.circOut = function(a) {
  3604. return Math.sqrt(1 - --a * a)
  3605. }, b.circInOut = function(a) {
  3606. return 1 > (a *= 2) ? -.5 * (Math.sqrt(1 - a * a) - 1) : .5 * (Math.sqrt(1 - (a -= 2) * a) + 1)
  3607. }, b.bounceIn = function(a) {
  3608. return 1 - b.bounceOut(1 - a)
  3609. }, b.bounceOut = function(a) {
  3610. return 1 / 2.75 > a ? 7.5625 * a * a : 2 / 2.75 > a ? 7.5625 * (a -= 1.5 / 2.75) * a + .75 : 2.5 / 2.75 > a ? 7.5625 * (a -= 2.25 / 2.75) * a + .9375 : 7.5625 * (a -= 2.625 / 2.75) * a + .984375
  3611. }, b.bounceInOut = function(a) {
  3612. return .5 > a ? .5 * b.bounceIn(2 * a) : .5 * b.bounceOut(2 * a - 1) + .5
  3613. }, b.getElasticIn = function(a, b) {
  3614. var c = 2 * Math.PI;
  3615. return function(d) {
  3616. if (0 == d || 1 == d) return d;
  3617. var e = b / c * Math.asin(1 / a);
  3618. return -(a * Math.pow(2, 10 * (d -= 1)) * Math.sin((d - e) * c / b))
  3619. }
  3620. }, b.getElasticOut = function(a, b) {
  3621. var c = 2 * Math.PI;
  3622. return function(d) {
  3623. if (0 == d || 1 == d) return d;
  3624. var e = b / c * Math.asin(1 / a);
  3625. return a * Math.pow(2, -10 * d) * Math.sin((d - e) * c / b) + 1
  3626. }
  3627. }, b.getElasticInOut = function(a, b) {
  3628. var c = 2 * Math.PI;
  3629. return function(d) {
  3630. var e = b / c * Math.asin(1 / a);
  3631. return 1 > (d *= 2) ? -.5 * a * Math.pow(2, 10 * (d -= 1)) * Math.sin((d - e) * c / b) : .5 * a * Math.pow(2, -10 * (d -= 1)) * Math.sin((d - e) * c / b) + 1
  3632. }
  3633. }, b.quadIn = b.getPowIn(2), b.quadOut = b.getPowOut(2), b.quadInOut = b.getPowInOut(2), b.cubicIn = b.getPowIn(3), b.cubicOut = b.getPowOut(3), b.cubicInOut = b.getPowInOut(3), b.quartIn = b.getPowIn(4), b.quartOut = b.getPowOut(4), b.quartInOut = b.getPowInOut(4), b.quintIn = b.getPowIn(5), b.quintOut = b.getPowOut(5), b.quintInOut = b.getPowInOut(5), b.backIn = b.getBackIn(1.7), b.backOut = b.getBackOut(1.7), b.backInOut = b.getBackInOut(1.7), b.elasticIn = b.getElasticIn(1, .3), b.elasticOut = b.getElasticOut(1, .3), b.elasticInOut = b.getElasticInOut(1, .3 * 1.5), b
  3634. }();
  3635. a.Ease = b, b.prototype.__class__ = "egret.Ease"
  3636. }(egret || (egret = {})),
  3637. function(a) {
  3638. var b = function() {
  3639. function a() {
  3640. this.path = "", this.audio = null, this.type = a.EFFECT
  3641. }
  3642. return a.prototype.play = function(a) {
  3643. void 0 === a && (a = !1);
  3644. var b = this.audio;
  3645. b && (isNaN(b.duration) || (b.currentTime = 0), b.loop = a, b.play())
  3646. }, a.prototype.pause = function() {
  3647. var a = this.audio;
  3648. a && a.pause()
  3649. }, a.prototype.load = function() {
  3650. var a = this.audio;
  3651. a && a.load()
  3652. }, a.prototype.addEventListener = function(a, b) {
  3653. this.audio && this.audio.addEventListener(a, b, !1)
  3654. }, a.prototype.removeEventListener = function(a, b) {
  3655. this.audio && this.audio.removeEventListener(a, b, !1)
  3656. }, a.prototype.setVolume = function(a) {
  3657. var b = this.audio;
  3658. b && (b.volume = a)
  3659. }, a.prototype.getVolume = function() {
  3660. return this.audio ? this.audio.volume : 0
  3661. }, a.prototype.preload = function(a) {
  3662. this.type = a
  3663. }, a.prototype._setAudio = function(a) {
  3664. this.audio = a
  3665. }, a.MUSIC = "music", a.EFFECT = "effect", a
  3666. }();
  3667. a.Sound = b, b.prototype.__class__ = "egret.Sound"
  3668. }(egret || (egret = {})),
  3669. function(a) {
  3670. var b = function() {
  3671. function a() {}
  3672. return a.isNumber = function(a) {
  3673. return "number" == typeof a && !isNaN(a)
  3674. }, a.sin = function(a) {
  3675. return a = Math.round(a), a %= 360, 0 > a && (a += 360), 90 > a ? egret_sin_map[a] : 180 > a ? egret_cos_map[a - 90] : 270 > a ? -egret_sin_map[a - 180] : -egret_cos_map[a - 270]
  3676. }, a.cos = function(a) {
  3677. return a = Math.round(a), a %= 360, 0 > a && (a += 360), 90 > a ? egret_cos_map[a] : 180 > a ? -egret_sin_map[a - 90] : 270 > a ? -egret_cos_map[a - 180] : egret_sin_map[a - 270]
  3678. }, a
  3679. }();
  3680. a.NumberUtils = b, b.prototype.__class__ = "egret.NumberUtils"
  3681. }(egret || (egret = {}));
  3682. for (egret_sin_map = {}, egret_cos_map = {}, i = 0; 90 >= i; i++) egret_sin_map[i] = Math.sin(i * egret.Matrix.DEG_TO_RAD), egret_cos_map[i] = Math.cos(i * egret.Matrix.DEG_TO_RAD);
  3683. Function.prototype.bind || (Function.prototype.bind = function(a) {
  3684. if ("function" != typeof this) throw new TypeError(egret.getString(1029));
  3685. var b = Array.prototype.slice.call(arguments, 1),
  3686. c = this,
  3687. d = function() {},
  3688. e = function() {
  3689. return c.apply(this instanceof d && a ? this : a, b.concat(Array.prototype.slice.call(arguments)))
  3690. };
  3691. return d.prototype = this.prototype, e.prototype = new d, e
  3692. }), __extends = this.__extends || function(a, b) {
  3693. function c() {
  3694. this.constructor = a
  3695. }
  3696. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  3697. c.prototype = b.prototype, a.prototype = new c
  3698. },
  3699. function(a) {
  3700. var b = function(b) {
  3701. function c(a) {
  3702. void 0 === a && (a = 60), b.call(this), this.frameRate = a, this._time = 0, this._requestAnimationId = 0 / 0, this._isActivate = !0, 60 == a && (c.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame, c.cancelAnimationFrame = window.cancelAnimationFrame || window.msCancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.oCancelAnimationFrame || window.cancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.webkitCancelRequestAnimationFrame), c.requestAnimationFrame || (c.requestAnimationFrame = function(b) {
  3703. return window.setTimeout(b, 1e3 / a)
  3704. }), c.cancelAnimationFrame || (c.cancelAnimationFrame = function(a) {
  3705. return window.clearTimeout(a)
  3706. }), c.instance = this, this.registerListener()
  3707. }
  3708. return __extends(c, b), c.prototype.enterFrame = function() {
  3709. var b = c.instance,
  3710. d = c._thisObject,
  3711. e = c._callback,
  3712. f = a.getTimer(),
  3713. g = f - b._time;
  3714. b._requestAnimationId = c.requestAnimationFrame.call(window, c.prototype.enterFrame), e.call(d, g), b._time = f
  3715. }, c.prototype.executeMainLoop = function(a, b) {
  3716. c._callback = a, c._thisObject = b, this.enterFrame()
  3717. }, c.prototype.reset = function() {
  3718. var b = c.instance;
  3719. b._requestAnimationId && (b._time = a.getTimer(), c.cancelAnimationFrame.call(window, b._requestAnimationId), b.enterFrame())
  3720. }, c.prototype.registerListener = function() {
  3721. var g, h, b = this,
  3722. d = function() {
  3723. b._isActivate && (b._isActivate = !1, a.MainContext.instance.stage.dispatchEvent(new a.Event(a.Event.DEACTIVATE)))
  3724. },
  3725. e = function() {
  3726. b._isActivate || (b._isActivate = !0, c.instance.reset(), a.MainContext.instance.stage.dispatchEvent(new a.Event(a.Event.ACTIVATE)))
  3727. },
  3728. f = function() {
  3729. document[g] ? d() : e()
  3730. };
  3731. window.addEventListener("focus", e, !1), window.addEventListener("blur", d, !1), "undefined" != typeof document.hidden ? (g = "hidden", h = "visibilitychange") : "undefined" != typeof document.mozHidden ? (g = "mozHidden", h = "mozvisibilitychange") : "undefined" != typeof document.msHidden ? (g = "msHidden", h = "msvisibilitychange") : "undefined" != typeof document.webkitHidden ? (g = "webkitHidden", h = "webkitvisibilitychange") : "undefined" != typeof document.oHidden && (g = "oHidden", h = "ovisibilitychange"), "onpageshow" in window && "onpagehide" in window && (window.addEventListener("pageshow", e, !1), window.addEventListener("pagehide", d, !1)), g && h && document.addEventListener(h, f, !1)
  3732. }, c.instance = null, c.requestAnimationFrame = null, c.cancelAnimationFrame = null, c._thisObject = null, c._callback = null, c
  3733. }(a.DeviceContext);
  3734. a.HTML5DeviceContext = b, b.prototype.__class__ = "egret.HTML5DeviceContext"
  3735. }(egret || (egret = {})), ! function(a) {
  3736. a.getItem = function(a) {
  3737. return window.localStorage.getItem(a)
  3738. }, a.setItem = function(a, b) {
  3739. try {
  3740. return window.localStorage.setItem(a, b), !0
  3741. } catch (c) {
  3742. return egret.Logger.infoWithErrorId(1018, a, b), !1
  3743. }
  3744. }, a.removeItem = function(a) {
  3745. window.localStorage.removeItem(a)
  3746. }, a.clear = function() {
  3747. window.localStorage.clear()
  3748. }, a.init = function() {
  3749. for (var b in a) egret.localStorage[b] = a[b]
  3750. }
  3751. }(egret_html5_localStorage || (egret_html5_localStorage = {})), egret_html5_localStorage.init(), __extends = this.__extends || function(a, b) {
  3752. function c() {
  3753. this.constructor = a
  3754. }
  3755. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  3756. c.prototype = b.prototype, a.prototype = new c
  3757. },
  3758. function(a) {
  3759. var b = function(b) {
  3760. function c(a, c) {
  3761. void 0 === c && (c = !0), b.call(this), this.useCacheCanvas = c, this.canvas = a || this.createCanvas(), this.canvasContext = this.canvas.getContext("2d"), c ? (this._cacheCanvas = document.createElement("canvas"), this._cacheCanvas.width = this.canvas.width, this._cacheCanvas.height = this.canvas.height, this.drawCanvasContext = this._cacheCanvasContext = this._cacheCanvas.getContext("2d")) : this.drawCanvasContext = this.canvasContext, this.onResize();
  3762. var d = this.drawCanvasContext.setTransform,
  3763. e = this;
  3764. this.drawCanvasContext.setTransform = function(a, b, c, f, g, h) {
  3765. e._matrixA = a, e._matrixB = b, e._matrixC = c, e._matrixD = f, e._matrixTx = g, e._matrixTy = h, d.call(e.drawCanvasContext, a, b, c, f, g, h)
  3766. }, this._matrixA = 1, this._matrixC = this._matrixB = 0, this._matrixD = 1, this._transformTy = this._transformTx = this._matrixTy = this._matrixTx = 0, this.initBlendMode()
  3767. }
  3768. return __extends(c, b), c.prototype.createCanvas = function() {
  3769. var c, b = a.Browser.getInstance().$("#egretCanvas");
  3770. return b || (c = document.getElementById(a.StageDelegate.canvas_div_name), b = a.Browser.getInstance().$new("canvas"), b.id = "egretCanvas", c.appendChild(b)), a.MainContext.instance.stage.addEventListener(a.Event.RESIZE, this.onResize, this), b
  3771. }, c.prototype.onResize = function() {
  3772. if (this.canvas) {
  3773. var b = document.getElementById(a.StageDelegate.canvas_div_name);
  3774. this.canvas.width = a.MainContext.instance.stage.stageWidth, this.canvas.height = a.MainContext.instance.stage.stageHeight, this.canvas.style.width = b.style.width, this.canvas.style.height = b.style.height, this.useCacheCanvas && (this._cacheCanvas.width = this.canvas.width, this._cacheCanvas.height = this.canvas.height), this.drawCanvasContext.imageSmoothingEnabled = a.RendererContext.imageSmoothingEnabled, this.drawCanvasContext.webkitImageSmoothingEnabled = a.RendererContext.imageSmoothingEnabled, this.drawCanvasContext.mozImageSmoothingEnabled = a.RendererContext.imageSmoothingEnabled, this.drawCanvasContext.msImageSmoothingEnabled = a.RendererContext.imageSmoothingEnabled
  3775. }
  3776. }, c.prototype.clearScreen = function() {
  3777. var b, c, d, e;
  3778. for (b = a.RenderFilter.getInstance().getDrawAreaList(), c = 0, d = b.length; d > c; c++) e = b[c], this.clearRect(e.x, e.y, e.width, e.height);
  3779. b = a.MainContext.instance.stage, this.useCacheCanvas && this._cacheCanvasContext.clearRect(0, 0, b.stageWidth, b.stageHeight), this.renderCost = 0
  3780. }, c.prototype.clearRect = function(a, b, c, d) {
  3781. this.canvasContext.clearRect(a, b, c, d)
  3782. }, c.prototype.drawImage = function(c, d, e, f, g, h, i, j, k, l) {
  3783. var m, n;
  3784. void 0 === l && (l = void 0), m = c._bitmapData, h += this._transformTx, i += this._transformTy, n = a.getTimer(), void 0 === l ? this.drawCanvasContext.drawImage(m, d, e, f, g, h, i, j, k) : this.drawRepeatImage(c, d, e, f, g, h, i, j, k, l), b.prototype.drawImage.call(this, c, d, e, f, g, h, i, j, k, l), this.renderCost += a.getTimer() - n
  3785. }, c.prototype.drawRepeatImage = function(b, c, d, e, f, g, h, i, j, k) {
  3786. if (void 0 === b.pattern) {
  3787. var l = a.MainContext.instance.rendererContext._texture_scale_factor,
  3788. m = b._bitmapData,
  3789. n = m;
  3790. (m.width != e || m.height != f || 1 != l) && (n = document.createElement("canvas"), n.width = e * l, n.height = f * l, n.getContext("2d").drawImage(m, c, d, e, f, 0, 0, e * l, f * l)), c = this.drawCanvasContext.createPattern(n, k), b.pattern = c
  3791. }
  3792. this.drawCanvasContext.fillStyle = b.pattern, this.drawCanvasContext.translate(g, h), this.drawCanvasContext.fillRect(0, 0, i, j), this.drawCanvasContext.translate(-g, -h)
  3793. }, c.prototype.setTransform = function(a) {
  3794. 1 == a.a && 0 == a.b && 0 == a.c && 1 == a.d && 1 == this._matrixA && 0 == this._matrixB && 0 == this._matrixC && 1 == this._matrixD ? (this._transformTx = a.tx - this._matrixTx, this._transformTy = a.ty - this._matrixTy) : (this._transformTx = this._transformTy = 0, this._matrixA == a.a && this._matrixB == a.b && this._matrixC == a.c && this._matrixD == a.d && this._matrixTx == a.tx && this._matrixTy == a.ty || this.drawCanvasContext.setTransform(a.a, a.b, a.c, a.d, a.tx, a.ty))
  3795. }, c.prototype.setAlpha = function(b, c) {
  3796. this.drawCanvasContext.globalAlpha = b, c ? (this.blendValue = this.blendModes[c], this.drawCanvasContext.globalCompositeOperation = this.blendValue) : this.blendValue != a.BlendMode.NORMAL && (this.blendValue = this.blendModes[a.BlendMode.NORMAL], this.drawCanvasContext.globalCompositeOperation = this.blendValue)
  3797. }, c.prototype.initBlendMode = function() {
  3798. this.blendModes = {}, this.blendModes[a.BlendMode.NORMAL] = "source-over", this.blendModes[a.BlendMode.ADD] = "lighter", this.blendModes[a.BlendMode.ERASE] = "destination-in"
  3799. }, c.prototype.setupFont = function(a, b) {
  3800. void 0 === b && (b = null), b = b || {};
  3801. var c = null == b.size ? a._size : b.size,
  3802. d = null == b.fontFamily ? a._fontFamily : b.fontFamily,
  3803. e = this.drawCanvasContext,
  3804. f = (null == b.italic ? a._italic : b.italic) ? "italic " : "normal ",
  3805. f = f + ((null == b.bold ? a._bold : b.bold) ? "bold " : "normal ");
  3806. e.font = f + (c + "px " + d), e.textAlign = "left", e.textBaseline = "middle"
  3807. }, c.prototype.measureText = function(a) {
  3808. return this.drawCanvasContext.measureText(a).width
  3809. }, c.prototype.drawText = function(c, d, e, f, g, h) {
  3810. var i, j, k, l;
  3811. void 0 === h && (h = null), this.setupFont(c, h), h = h || {}, i = null != h.textColor ? a.toColorString(h.textColor) : c._textColorString, j = null != h.strokeColor ? a.toColorString(h.strokeColor) : c._strokeColorString, k = null != h.stroke ? h.stroke : c._stroke, l = this.drawCanvasContext, l.fillStyle = i, l.strokeStyle = j, k && (l.lineWidth = 2 * k, l.strokeText(d, e + this._transformTx, f + this._transformTy, g || 65535)), l.fillText(d, e + this._transformTx, f + this._transformTy, g || 65535), b.prototype.drawText.call(this, c, d, e, f, g, h)
  3812. }, c.prototype.strokeRect = function(a, b, c, d, e) {
  3813. this.drawCanvasContext.strokeStyle = e, this.drawCanvasContext.strokeRect(a, b, c, d)
  3814. }, c.prototype.pushMask = function(a) {
  3815. this.drawCanvasContext.save(), this.drawCanvasContext.beginPath(), this.drawCanvasContext.rect(a.x + this._transformTx, a.y + this._transformTy, a.width, a.height), this.drawCanvasContext.clip(), this.drawCanvasContext.closePath()
  3816. }, c.prototype.popMask = function() {
  3817. this.drawCanvasContext.restore(), this.drawCanvasContext.setTransform(1, 0, 0, 1, 0, 0)
  3818. }, c.prototype.onRenderStart = function() {
  3819. this.drawCanvasContext.save()
  3820. }, c.prototype.onRenderFinish = function() {
  3821. var b, c, d, e, f, g, h, i, j;
  3822. if (this.drawCanvasContext.restore(), this.drawCanvasContext.setTransform(1, 0, 0, 1, 0, 0), this.useCacheCanvas)
  3823. for (b = this._cacheCanvas.width, c = this._cacheCanvas.height, d = a.RenderFilter.getInstance().getDrawAreaList(), e = 0, f = d.length; f > e; e++) g = d[e], h = g.x, i = g.y, j = g.width, g = g.height, h + j > b && (j = b - h), i + g > c && (g = c - i), j > 0 && g > 0 && this.canvasContext.drawImage(this._cacheCanvas, h, i, j, g, h, i, j, g)
  3824. }, c
  3825. }(a.RendererContext);
  3826. a.HTML5CanvasRenderer = b, b.prototype.__class__ = "egret.HTML5CanvasRenderer"
  3827. }(egret || (egret = {})), ! function(a) {
  3828. a.beginFill = function(a, c) {
  3829. void 0 === c && (c = 1);
  3830. var d = "rgba(" + (a >> 16) + "," + ((65280 & a) >> 8) + "," + (255 & a) + "," + c + ")";
  3831. this.fillStyleColor = d, this._pushCommand(new b(this._setStyle, this, [d]))
  3832. }, a.drawRect = function(a, c, d, e) {
  3833. this._pushCommand(new b(function(a, b, c, d) {
  3834. var e = this.renderContext;
  3835. this.canvasContext.beginPath(), this.canvasContext.rect(e._transformTx + a, e._transformTy + b, c, d), this.canvasContext.closePath()
  3836. }, this, [a, c, d, e])), this._fill(), this.checkRect(a, c, d, e)
  3837. }, a.drawCircle = function(a, c, d) {
  3838. this._pushCommand(new b(function(a, b, c) {
  3839. var d = this.renderContext;
  3840. this.canvasContext.beginPath(), this.canvasContext.arc(d._transformTx + a, d._transformTy + b, c, 0, 2 * Math.PI), this.canvasContext.closePath()
  3841. }, this, [a, c, d])), this._fill(), this.checkRect(a - d, c - d, 2 * d, 2 * d)
  3842. }, a.drawRoundRect = function(a, c, d, e, f, g) {
  3843. this._pushCommand(new b(function(a, b, c, d, e, f) {
  3844. var g = this.renderContext;
  3845. a = g._transformTx + a, b = g._transformTy + b, e /= 2, f = f ? f / 2 : e, c = a + c, d = b + d, g = d - f, this.canvasContext.beginPath(), this.canvasContext.moveTo(c, g), this.canvasContext.quadraticCurveTo(c, d, c - e, d), this.canvasContext.lineTo(a + e, d), this.canvasContext.quadraticCurveTo(a, d, a, d - f), this.canvasContext.lineTo(a, b + f), this.canvasContext.quadraticCurveTo(a, b, a + e, b), this.canvasContext.lineTo(c - e, b), this.canvasContext.quadraticCurveTo(c, b, c, b + f), this.canvasContext.lineTo(c, g), this.canvasContext.closePath()
  3846. }, this, [a, c, d, e, f, g])), this._fill(), this.checkRect(a, c, d, e)
  3847. }, a.drawEllipse = function(a, c, d, e) {
  3848. this._pushCommand(new b(function(a, b, c, d) {
  3849. var f, e = this.renderContext;
  3850. this.canvasContext.save(), a = e._transformTx + a, b = e._transformTy + b, e = c > d ? c : d, f = c / e, d /= e, this.canvasContext.scale(f, d), this.canvasContext.beginPath(), this.canvasContext.moveTo((a + c) / f, b / d), this.canvasContext.arc(a / f, b / d, e, 0, 2 * Math.PI), this.canvasContext.closePath(), this.canvasContext.restore(), this.canvasContext.stroke()
  3851. }, this, [a, c, d, e])), this._fill(), this.checkRect(a - d, c - e, 2 * d, 2 * e)
  3852. }, a.lineStyle = function(a, c, d, e, f, g, h, i) {
  3853. void 0 === a && (a = 0 / 0), void 0 === c && (c = 0), void 0 === d && (d = 1), void 0 === e && (e = !1), void 0 === f && (f = "normal"), void 0 === g && (g = null), void 0 === h && (h = null), void 0 === i && (i = 3), this.strokeStyleColor && (this.createEndLineCommand(), this._pushCommand(this.endLineCommand)), this.strokeStyleColor = c = "rgba(" + (c >> 16) + "," + ((65280 & c) >> 8) + "," + (255 & c) + "," + d + ")", this._pushCommand(new b(function(a, b) {
  3854. this.canvasContext.lineWidth = a, this.canvasContext.strokeStyle = b, this.canvasContext.beginPath()
  3855. }, this, [a, c])), "undefined" == typeof this.lineX && (this.lineY = this.lineX = 0), this.moveTo(this.lineX, this.lineY)
  3856. }, a.lineTo = function(a, c) {
  3857. this._pushCommand(new b(function(a, b) {
  3858. var c = this.renderContext;
  3859. this.canvasContext.lineTo(c._transformTx + a, c._transformTy + b)
  3860. }, this, [a, c])), this.lineX = a, this.lineY = c, this.checkPoint(a, c)
  3861. }, a.curveTo = function(a, c, d, e) {
  3862. this._pushCommand(new b(function(a, b, c, d) {
  3863. var e = this.renderContext;
  3864. this.canvasContext.quadraticCurveTo(e._transformTx + a, e._transformTy + b, e._transformTx + c, e._transformTy + d)
  3865. }, this, [a, c, d, e])), this.lineX = d, this.lineY = e, this.checkPoint(a, c), this.checkPoint(d, e)
  3866. }, a.moveTo = function(a, c) {
  3867. this._pushCommand(new b(function(a, b) {
  3868. var c = this.renderContext;
  3869. this.canvasContext.moveTo(c._transformTx + a, c._transformTy + b)
  3870. }, this, [a, c])), this.checkPoint(a, c)
  3871. }, a.clear = function() {
  3872. this.lineY = this.lineX = this.commandQueue.length = 0, this.fillStyleColor = this.strokeStyleColor = null, this._dirty = !1, this._maxY = this._maxX = this._minY = this._minX = 0
  3873. }, a.createEndFillCommand = function() {
  3874. this.endFillCommand || (this.endFillCommand = new b(function() {
  3875. this.canvasContext.fill(), this.canvasContext.closePath()
  3876. }, this, null))
  3877. }, a.endFill = function() {
  3878. null != this.fillStyleColor && this._fill()
  3879. }, a._fill = function() {
  3880. this.fillStyleColor && (this.createEndFillCommand(), this._pushCommand(this.endFillCommand), this.fillStyleColor = null)
  3881. }, a.createEndLineCommand = function() {
  3882. this.endLineCommand || (this.endLineCommand = new b(function() {
  3883. this.canvasContext.stroke(), this.canvasContext.closePath()
  3884. }, this, null))
  3885. }, a._pushCommand = function(a) {
  3886. this.commandQueue.push(a), this._dirty = !0
  3887. }, a._draw = function(a) {
  3888. var c, d, b = this.commandQueue.length;
  3889. if (0 != b) {
  3890. for (this.renderContext = a, a = this.canvasContext = this.renderContext.drawCanvasContext, a.save(), this.strokeStyleColor && b > 0 && this.commandQueue[b - 1] != this.endLineCommand && (this.createEndLineCommand(), this._pushCommand(this.endLineCommand), b = this.commandQueue.length), c = 0; b > c; c++) d = this.commandQueue[c], d.method.apply(d.thisObject, d.args);
  3891. a.restore(), this._dirty = !1
  3892. }
  3893. };
  3894. var b = function() {
  3895. return function(a, b, c) {
  3896. this.method = a, this.thisObject = b, this.args = c
  3897. }
  3898. }();
  3899. b.prototype.__class__ = "egret_h5_graphics.Command", a._setStyle = function(a) {
  3900. this.canvasContext.fillStyle = a, this.canvasContext.beginPath()
  3901. }, a.init = function() {
  3902. for (var b in a) egret.Graphics.prototype[b] = a[b];
  3903. egret.RendererContext.createRendererContext = function(a) {
  3904. return new egret.HTML5CanvasRenderer(a, !1)
  3905. }
  3906. }
  3907. }(egret_h5_graphics || (egret_h5_graphics = {})), egret_h5_graphics.init(), __extends = this.__extends || function(a, b) {
  3908. function c() {
  3909. this.constructor = a
  3910. }
  3911. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  3912. c.prototype = b.prototype, a.prototype = new c
  3913. },
  3914. function(a) {
  3915. var b = function(b) {
  3916. function c(c) {
  3917. b.call(this), this.glID = this.gl = this.canvas = null, this.size = 2e3, this.vertices = null, this.vertSize = 5, this.indices = null, this.projectionY = this.projectionX = 0 / 0, this.shaderManager = null, this.contextLost = !1, this.glContextId = 0, this.currentBlendMode = "", this.currentBaseTexture = null, this.currentBatchSize = 0, this.worldTransform = null, this.worldAlpha = 1, this.maskList = [], this.maskDataFreeList = [], this.graphicsIndexBuffer = this.graphicsBuffer = this.graphicsIndices = this.graphicsPoints = this.filterType = this.colorTransformMatrix = null, this.graphicsStyle = {}, this.canvas = c || this.createCanvas(), this.canvas.addEventListener("webglcontextlost", this.handleContextLost.bind(this), !1), this.canvas.addEventListener("webglcontextrestored", this.handleContextRestored.bind(this), !1), this.html5Canvas = document.createElement("canvas"), this.canvasContext = new a.HTML5CanvasRenderer(this.html5Canvas), this.onResize(), this.projectionX = this.canvas.width / 2, this.projectionY = -this.canvas.height / 2, c = 6 * this.size, this.vertices = new Float32Array(4 * this.size * this.vertSize), this.indices = new Uint16Array(c);
  3918. for (var d = 0, e = 0; c > d; d += 6, e += 4) this.indices[d + 0] = e + 0, this.indices[d + 1] = e + 1, this.indices[d + 2] = e + 2, this.indices[d + 3] = e + 0, this.indices[d + 4] = e + 2, this.indices[d + 5] = e + 3;
  3919. this.initWebGL(), this.shaderManager = new a.WebGLShaderManager(this.gl), this.worldTransform = new a.Matrix, this.initAll()
  3920. }
  3921. return __extends(c, b), c.prototype.onRenderFinish = function() {
  3922. this._draw()
  3923. }, c.prototype.initAll = function() {
  3924. c.isInit || (c.isInit = !0, egret_webgl_graphics.init(), a.TextField.prototype._makeBitmapCache = function() {
  3925. var b, c, d, e, f, g;
  3926. return this.renderTexture || (this.renderTexture = new a.RenderTexture), b = this.getBounds(a.Rectangle.identity), 0 == b.width || 0 == b.height ? (this._texture_to_render = null, !1) : (this._bitmapData || (this._bitmapData = document.createElement("canvas"), this.renderContext = a.RendererContext.createRendererContext(this._bitmapData)), c = b.width, b = b.height, d = a.MainContext.instance.rendererContext._texture_scale_factor, b /= d, c = Math.round(c / d), b = Math.round(b), e = this._bitmapData, e.width = c, e.height = b, e.style.width = c + "px", e.style.height = b + "px", this.renderContext._cacheCanvas && (this.renderContext._cacheCanvas.width = c, this.renderContext._cacheCanvas.height = b), this._worldTransform.identity(), this._worldTransform.a = 1 / d, this._worldTransform.d = 1 / d, this.renderContext.setTransform(this._worldTransform), this.worldAlpha = 1, e = a.RenderFilter.getInstance(), f = e._drawAreaList.concat(), e._drawAreaList.length = 0, this.renderContext.clearScreen(), this.renderContext.onRenderStart(), a.RendererContext.deleteTexture(this.renderTexture), this._colorTransform && this.renderContext.setGlobalColorTransform(this._colorTransform.matrix), g = this.mask || this._scrollRect, g && this.renderContext.pushMask(g), this._render(this.renderContext), g && this.renderContext.popMask(), this._colorTransform && this.renderContext.setGlobalColorTransform(null), a.RenderTexture.identityRectangle.width = c, a.RenderTexture.identityRectangle.height = b, e.addDrawArea(a.RenderTexture.identityRectangle), this.renderContext.onRenderFinish(), e._drawAreaList = f, this.renderTexture._bitmapData = this._bitmapData, this.renderTexture._sourceWidth = c, this.renderTexture._sourceHeight = b, this.renderTexture._textureWidth = this.renderTexture._sourceWidth * d, this.renderTexture._textureHeight = this.renderTexture._sourceHeight * d, this._texture_to_render = this.renderTexture, !0)
  3927. }, a.TextField.prototype._draw = function(b) {
  3928. this.getDirty() && (this._texture_to_render = this.renderTexture, this._cacheAsBitmap = !0), a.DisplayObject.prototype._draw.call(this, b)
  3929. }, a.RenderTexture.prototype.init = function() {
  3930. this._bitmapData = document.createElement("canvas"), this.canvasContext = this._bitmapData.getContext("2d"), this._webglBitmapData = document.createElement("canvas"), this.renderContext = new a.WebGLRenderer(this._webglBitmapData)
  3931. }, a.RenderTexture.prototype.setSize = function(b, c) {
  3932. if (this._webglBitmapData) {
  3933. var d = this._webglBitmapData;
  3934. d.width = b, d.height = c, d.style.width = b + "px", d.style.height = c + "px", this.renderContext.projectionX = b / 2, this.renderContext.projectionY = -c / 2, this.renderContext.viewportScale = a.MainContext.instance.rendererContext._texture_scale_factor
  3935. }
  3936. }, a.RenderTexture.prototype.end = function() {}, a.RenderTexture.prototype.drawToTexture = function(b, c, d) {
  3937. var f, g, h, i, j, k, e = c || b.getBounds(a.Rectangle.identity);
  3938. if (0 == e.width || 0 == e.height || c && (0 == c.width || 0 == c.height)) return !1;
  3939. if ("undefined" == typeof d && (d = 1), this._bitmapData || (this._bitmapData = document.createElement("canvas"), this.canvasContext = this._bitmapData.getContext("2d"), a.RenderTexture.WebGLCanvas || (a.RenderTexture.WebGLCanvas = document.createElement("canvas"), a.RenderTexture.WebGLRenderer = new a.WebGLRenderer(a.RenderTexture.WebGLCanvas)), this._webglBitmapData = a.RenderTexture.WebGLCanvas, this.renderContext = a.RenderTexture.WebGLRenderer), f = e.x, g = e.y, c = e.width, e = e.height, e /= d, h = a.MainContext.instance.rendererContext._texture_scale_factor, c = Math.round(c / d), e = Math.round(e), this.setSize(c, e), i = this._bitmapData, j = c / h * d, k = e / h * d, i.width = j, i.height = k, i.style.width = j + "px", i.style.height = k + "px", this.begin(), b._worldTransform.identity(), i = b._anchorOffsetX, j = b._anchorOffsetY, (0 != b._anchorX || 0 != b._anchorY) && (i = b._anchorX * c, j = b._anchorY * e), this._offsetX = f + i, this._offsetY = g + j, b._worldTransform.append(1, 0, 0, 1, -this._offsetX, -this._offsetY), b.worldAlpha = 1, f = a.MainContext.__use_new_draw, a.MainContext.__use_new_draw = !1, b instanceof a.DisplayObjectContainer)
  3940. for (g = b._children, i = 0, j = g.length; j > i; i++) g[i]._updateTransform();
  3941. return this.renderContext.setTransform(b._worldTransform), g = a.RenderFilter.getInstance(), i = g._drawAreaList.concat(), g._drawAreaList.length = 0, j = this.renderContext.gl, j.viewport(0, 0, c, e), j.bindFramebuffer(j.FRAMEBUFFER, null), j.clearColor(0, 0, 0, 0), j.clear(j.COLOR_BUFFER_BIT), this.renderContext.onRenderStart(), a.RendererContext.deleteTexture(this), b._filter && this.renderContext.setGlobalFilter(b._filter), b._colorTransform && this.renderContext.setGlobalColorTransform(b._colorTransform.matrix), (j = b.mask || b._scrollRect) && this.renderContext.pushMask(j), b._render(this.renderContext), this.renderContext._draw(), a.MainContext.__use_new_draw = f, j && this.renderContext.popMask(), b._colorTransform && this.renderContext.setGlobalColorTransform(null), b._filter && this.renderContext.setGlobalFilter(null), a.RenderTexture.identityRectangle.width = c, a.RenderTexture.identityRectangle.height = e, g.addDrawArea(a.RenderTexture.identityRectangle), this.renderContext.onRenderFinish(), g._drawAreaList = i, this._sourceWidth = c / h * d, this._sourceHeight = e / h * d, this._textureWidth = c * d, this._textureHeight = e * d, this.canvasContext.drawImage(this._webglBitmapData, 0, 0, c, e, 0, 0, this._sourceWidth, this._sourceHeight), !0
  3942. })
  3943. }, c.prototype.createCanvas = function() {
  3944. var c, b = a.Browser.getInstance().$("#egretCanvas");
  3945. return b || (c = document.getElementById(a.StageDelegate.canvas_div_name), b = a.Browser.getInstance().$new("canvas"), b.id = "egretCanvas", c.appendChild(b)), a.MainContext.instance.stage.addEventListener(a.Event.RESIZE, this.onResize, this), b
  3946. }, c.prototype.onResize = function() {
  3947. var b = document.getElementById(a.StageDelegate.canvas_div_name);
  3948. this.canvas && (this.canvas.width = a.MainContext.instance.stage.stageWidth, this.canvas.height = a.MainContext.instance.stage.stageHeight, this.canvas.style.width = b.style.width, this.canvas.style.height = b.style.height, this.projectionX = this.canvas.width / 2, this.projectionY = -this.canvas.height / 2), this.html5Canvas && (this.html5Canvas.width = a.MainContext.instance.stage.stageWidth, this.html5Canvas.height = a.MainContext.instance.stage.stageHeight, this.html5Canvas.style.width = b.style.width, this.html5Canvas.style.height = b.style.height)
  3949. }, c.prototype.handleContextLost = function() {
  3950. this.contextLost = !0
  3951. }, c.prototype.handleContextRestored = function() {
  3952. this.initWebGL(), this.shaderManager.setContext(this.gl), this.contextLost = !1
  3953. }, c.prototype.initWebGL = function() {
  3954. for (var b, d = {}, e = ["experimental-webgl", "webgl"], f = 0; f < e.length; f++) {
  3955. try {
  3956. b = this.canvas.getContext(e[f], d)
  3957. } catch (g) {}
  3958. if (b) break
  3959. }
  3960. if (!b) throw Error(a.getString(1021));
  3961. c.glID++, this.glID = c.glID, this.setContext(b)
  3962. }, c.prototype.setContext = function(a) {
  3963. this.gl = a, a.id = this.glContextId++, this.vertexBuffer = a.createBuffer(), this.indexBuffer = a.createBuffer(), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.indexBuffer), a.bufferData(a.ELEMENT_ARRAY_BUFFER, this.indices, a.STATIC_DRAW), a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer), a.bufferData(a.ARRAY_BUFFER, this.vertices, a.DYNAMIC_DRAW), a.disable(a.DEPTH_TEST), a.disable(a.CULL_FACE), a.enable(a.BLEND), a.colorMask(!0, !0, !0, !0)
  3964. }, c.prototype.start = function() {
  3965. var a, b, c;
  3966. this.contextLost || (a = this.gl, a.activeTexture(a.TEXTURE0), a.bindBuffer(a.ARRAY_BUFFER, this.vertexBuffer), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.indexBuffer), b = this.colorTransformMatrix ? this.shaderManager.colorTransformShader : "blur" == this.filterType ? this.shaderManager.blurShader : this.shaderManager.defaultShader, this.shaderManager.activateShader(b), b.syncUniforms(), a.uniform2f(b.projectionVector, this.projectionX, this.projectionY), c = 4 * this.vertSize, a.vertexAttribPointer(b.aVertexPosition, 2, a.FLOAT, !1, c, 0), a.vertexAttribPointer(b.aTextureCoord, 2, a.FLOAT, !1, c, 8), a.vertexAttribPointer(b.colorAttribute, 2, a.FLOAT, !1, c, 16))
  3967. }, c.prototype.clearScreen = function() {
  3968. var c, d, e, f, b = this.gl;
  3969. for (b.colorMask(!0, !0, !0, !0), c = a.RenderFilter.getInstance().getDrawAreaList(), d = 0, e = c.length; e > d; d++) f = c[d], b.viewport(f.x, f.y, f.width, f.height), b.bindFramebuffer(b.FRAMEBUFFER, null), b.clearColor(0, 0, 0, 0), b.clear(b.COLOR_BUFFER_BIT);
  3970. c = a.MainContext.instance.stage, b.viewport(0, 0, c.stageWidth, c.stageHeight), this.renderCost = 0
  3971. }, c.prototype.setBlendMode = function(b) {
  3972. if (b || (b = a.BlendMode.NORMAL), this.currentBlendMode != b) {
  3973. var c = a.RendererContext.blendModesForGL[b];
  3974. c && (this._draw(), this.gl.blendFunc(c[0], c[1]), this.currentBlendMode = b)
  3975. }
  3976. }, c.prototype.drawRepeatImage = function(b, c, d, e, f, g, h, i, j, k) {
  3977. var l, m, n;
  3978. for (k = a.MainContext.instance.rendererContext._texture_scale_factor, e *= k, f *= k; i > g; g += e)
  3979. for (l = h; j > l; l += f) m = Math.min(e, i - g), n = Math.min(f, j - l), this.drawImage(b, c, d, m / k, n / k, g, l, m, n)
  3980. }, c.prototype.drawImage = function(a, b, c, d, e, f, g, h, i, j) {
  3981. var k, l, m, n, o, p, q, r;
  3982. void 0 === j && (j = void 0), this.contextLost || (void 0 !== j ? this.drawRepeatImage(a, b, c, d, e, f, g, h, i, j) : (this.createWebGLTexture(a), j = a._bitmapData.webGLTexture[this.glID], (j !== this.currentBaseTexture || this.currentBatchSize >= this.size - 1) && (this._draw(), this.currentBaseTexture = j), k = this.worldTransform, l = k.a, m = k.b, n = k.c, o = k.d, p = k.tx, q = k.ty, 0 == f && 0 == g || k.append(1, 0, 0, 1, f, g), 1 == d / h && 1 == e / i || k.append(h / d, 0, 0, i / e, 0, 0), f = k.a, g = k.b, h = k.c, i = k.d, j = k.tx, r = k.ty, k.a = l, k.b = m, k.c = n, k.d = o, k.tx = p, k.ty = q, l = a._sourceWidth, m = a._sourceHeight, a = d, k = e, b /= l, c /= m, d /= l, e /= m, l = this.vertices, m = 4 * this.currentBatchSize * this.vertSize, n = this.worldAlpha, l[m++] = j, l[m++] = r, l[m++] = b, l[m++] = c, l[m++] = n, l[m++] = f * a + j, l[m++] = g * a + r, l[m++] = d + b, l[m++] = c, l[m++] = n, l[m++] = f * a + h * k + j, l[m++] = i * k + g * a + r, l[m++] = d + b, l[m++] = e + c, l[m++] = n, l[m++] = h * k + j, l[m++] = i * k + r, l[m++] = b, l[m++] = e + c, l[m++] = n, this.currentBatchSize++))
  3983. }, c.prototype._draw = function() {
  3984. var b, c, d;
  3985. 0 == this.currentBatchSize || this.contextLost || (b = a.getTimer(), this.start(), c = this.gl, c.bindTexture(c.TEXTURE_2D, this.currentBaseTexture), d = this.vertices.subarray(0, 4 * this.currentBatchSize * this.vertSize), c.bufferSubData(c.ARRAY_BUFFER, 0, d), c.drawElements(c.TRIANGLES, 6 * this.currentBatchSize, c.UNSIGNED_SHORT, 0), this.currentBatchSize = 0, this.renderCost += a.getTimer() - b, a.Profiler.getInstance().onDrawImage())
  3986. }, c.prototype.setTransform = function(a) {
  3987. var b = this.worldTransform;
  3988. b.a = a.a, b.b = a.b, b.c = a.c, b.d = a.d, b.tx = a.tx, b.ty = a.ty
  3989. }, c.prototype.setAlpha = function(a, b) {
  3990. this.worldAlpha = a, this.setBlendMode(b)
  3991. }, c.prototype.createWebGLTexture = function(a) {
  3992. if (a = a._bitmapData, a.webGLTexture || (a.webGLTexture = {}), !a.webGLTexture[this.glID]) {
  3993. var b = this.gl;
  3994. a.webGLTexture[this.glID] = b.createTexture(), b.bindTexture(b.TEXTURE_2D, a.webGLTexture[this.glID]), b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0), b.texImage2D(b.TEXTURE_2D, 0, b.RGBA, b.RGBA, b.UNSIGNED_BYTE, a), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MAG_FILTER, b.LINEAR), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_MIN_FILTER, b.LINEAR), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_S, b.CLAMP_TO_EDGE), b.texParameteri(b.TEXTURE_2D, b.TEXTURE_WRAP_T, b.CLAMP_TO_EDGE), b.bindTexture(b.TEXTURE_2D, null)
  3995. }
  3996. }, c.prototype.pushMask = function(a) {
  3997. this._draw();
  3998. var b = this.gl;
  3999. 0 == this.maskList.length && b.enable(b.SCISSOR_TEST), a = this.getScissorRect(a), this.maskList.push(a), this.scissor(a.x, a.y, a.width, a.height)
  4000. }, c.prototype.getScissorRect = function(b) {
  4001. var c, d, e, f = this.maskList[this.maskList.length - 1];
  4002. return f ? f.intersects(f) ? (c = Math.max(b.x + this.worldTransform.tx, f.x), d = Math.max(b.y + this.worldTransform.ty, f.y), e = Math.min(b.x + this.worldTransform.tx + b.width, f.x + f.width) - c, b = Math.min(b.y + this.worldTransform.ty + b.height, f.y + f.height) - d) : b = e = d = c = 0 : (c = b.x + this.worldTransform.tx, d = b.y + this.worldTransform.ty, e = b.width, b = b.height), (f = this.maskDataFreeList.pop()) ? (f.x = c, f.y = d, f.width = e, f.height = b) : f = new a.Rectangle(c, d, e, b), f
  4003. }, c.prototype.popMask = function() {
  4004. this._draw();
  4005. var a = this.gl,
  4006. b = this.maskList.pop();
  4007. this.maskDataFreeList.push(b), b = this.maskList.length, 0 != b ? (b = this.maskList[b - 1], (0 < b.width || 0 < b.height) && this.scissor(b.x, b.y, b.width, b.height)) : a.disable(a.SCISSOR_TEST)
  4008. }, c.prototype.scissor = function(b, c, d, e) {
  4009. var f = this.gl;
  4010. 0 > d && (d = 0), 0 > e && (e = 0), f.scissor(b, -c + a.MainContext.instance.stage.stageHeight - e, d, e)
  4011. }, c.prototype.setGlobalColorTransform = function(a) {
  4012. if (this.colorTransformMatrix != a && (this._draw(), this.colorTransformMatrix = a)) {
  4013. a = a.concat();
  4014. var b = this.shaderManager.colorTransformShader;
  4015. b.uniforms.colorAdd.value.w = a.splice(19, 1)[0] / 255, b.uniforms.colorAdd.value.z = a.splice(14, 1)[0] / 255, b.uniforms.colorAdd.value.y = a.splice(9, 1)[0] / 255, b.uniforms.colorAdd.value.x = a.splice(4, 1)[0] / 255, b.uniforms.matrix.value = a
  4016. }
  4017. }, c.prototype.setGlobalFilter = function(a) {
  4018. this._draw(), this.setFilterProperties(a)
  4019. }, c.prototype.setFilterProperties = function(a) {
  4020. if (a) switch (this.filterType = a.type, a.type) {
  4021. case "blur":
  4022. var b = this.shaderManager.blurShader;
  4023. b.uniforms.blur.value.x = a.blurX, b.uniforms.blur.value.y = a.blurY
  4024. } else this.filterType = null
  4025. }, c.prototype.setupFont = function(a, b) {
  4026. void 0 === b && (b = null), this.canvasContext.setupFont(a, b)
  4027. }, c.prototype.measureText = function(a) {
  4028. return this.canvasContext.measureText(a)
  4029. }, c.prototype.renderGraphics = function(a) {
  4030. this._draw();
  4031. var b = this.gl,
  4032. c = this.shaderManager.primitiveShader;
  4033. this.graphicsPoints ? (this.graphicsPoints.length = 0, this.graphicsIndices.length = 0) : (this.graphicsPoints = [], this.graphicsIndices = [], this.graphicsBuffer = b.createBuffer(), this.graphicsIndexBuffer = b.createBuffer()), this.updateGraphics(a), this.shaderManager.activateShader(c), b.blendFunc(b.ONE, b.ONE_MINUS_SRC_ALPHA), b.uniformMatrix3fv(c.translationMatrix, !1, this.worldTransform.toArray(!0)), b.uniform2f(c.projectionVector, this.projectionX, -this.projectionY), b.uniform2f(c.offsetVector, 0, 0), b.uniform3fv(c.tintColor, [1, 1, 1]), b.uniform1f(c.alpha, this.worldAlpha), b.bindBuffer(b.ARRAY_BUFFER, this.graphicsBuffer), b.vertexAttribPointer(c.aVertexPosition, 2, b.FLOAT, !1, 24, 0), b.vertexAttribPointer(c.colorAttribute, 4, b.FLOAT, !1, 24, 8), b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, this.graphicsIndexBuffer), b.drawElements(b.TRIANGLE_STRIP, this.graphicsIndices.length, b.UNSIGNED_SHORT, 0), this.shaderManager.activateShader(this.shaderManager.defaultShader)
  4034. }, c.prototype.updateGraphics = function(a) {
  4035. var b = this.gl;
  4036. this.buildRectangle(a), b.bindBuffer(b.ARRAY_BUFFER, this.graphicsBuffer), b.bufferData(b.ARRAY_BUFFER, new Float32Array(this.graphicsPoints), b.STATIC_DRAW), b.bindBuffer(b.ELEMENT_ARRAY_BUFFER, this.graphicsIndexBuffer), b.bufferData(b.ELEMENT_ARRAY_BUFFER, new Uint16Array(this.graphicsIndices), b.STATIC_DRAW)
  4037. }, c.prototype.buildRectangle = function(a) {
  4038. var e, f, g, h, i, j, k, b = a.x,
  4039. c = a.y,
  4040. d = a.w;
  4041. a = a.h, e = this.graphicsStyle.a, f = this.graphicsStyle.r * e, g = this.graphicsStyle.g * e, h = this.graphicsStyle.b * e, i = this.graphicsPoints, j = this.graphicsIndices, k = i.length / 6, i.push(b, c), i.push(f, g, h, e), i.push(b + d, c), i.push(f, g, h, e), i.push(b, c + a), i.push(f, g, h, e), i.push(b + d, c + a), i.push(f, g, h, e), j.push(k, k, k + 1, k + 2, k + 3, k + 3)
  4042. }, c.prototype.setGraphicsStyle = function(a, b, c, d) {
  4043. this.graphicsStyle.r = a, this.graphicsStyle.g = b, this.graphicsStyle.b = c, this.graphicsStyle.a = d
  4044. }, c.glID = 0, c.isInit = !1, c
  4045. }(a.RendererContext);
  4046. a.WebGLRenderer = b, b.prototype.__class__ = "egret.WebGLRenderer"
  4047. }(egret || (egret = {})), ! function(a) {
  4048. a.beginFill = function(a, c) {
  4049. void 0 === c && (c = 1), this._pushCommand(new b(this._setStyle, this, [(a >> 16) / 255, ((65280 & a) >> 8) / 255, (255 & a) / 255, c]))
  4050. }, a.drawRect = function(a, c, d, e) {
  4051. this._pushCommand(new b(function(a) {
  4052. this.renderContext.renderGraphics(a)
  4053. }, this, [{
  4054. x: a,
  4055. y: c,
  4056. w: d,
  4057. h: e
  4058. }])), this.checkRect(a, c, d, e)
  4059. }, a.drawCircle = function() {}, a.drawRoundRect = function() {}, a.drawEllipse = function() {}, a.lineStyle = function() {}, a.lineTo = function() {}, a.curveTo = function() {}, a.moveTo = function() {}, a.clear = function() {
  4060. this._maxY = this._maxX = this._minY = this._minX = this.commandQueue.length = 0
  4061. }, a.endFill = function() {}, a._pushCommand = function(a) {
  4062. this.commandQueue.push(a)
  4063. }, a._draw = function(a) {
  4064. var c, b = this.commandQueue.length;
  4065. if (0 != b)
  4066. for (this.renderContext = a, a = 0; b > a; a++) c = this.commandQueue[a], c.method.apply(c.thisObject, c.args)
  4067. };
  4068. var b = function() {
  4069. return function(a, b, c) {
  4070. this.method = a, this.thisObject = b, this.args = c
  4071. }
  4072. }();
  4073. b.prototype.__class__ = "egret_webgl_graphics.Command", a._setStyle = function(a, b, c, d) {
  4074. this.renderContext.setGraphicsStyle(a, b, c, d)
  4075. }, a.init = function() {
  4076. for (var b in a) egret.Graphics.prototype[b] = a[b]
  4077. }
  4078. }(egret_webgl_graphics || (egret_webgl_graphics = {})),
  4079. function(a) {
  4080. var b = function() {
  4081. function b() {}
  4082. return b.compileProgram = function(c, d, e) {
  4083. e = b.compileFragmentShader(c, e), d = b.compileVertexShader(c, d);
  4084. var f = c.createProgram();
  4085. return c.attachShader(f, d), c.attachShader(f, e), c.linkProgram(f), c.getProgramParameter(f, c.LINK_STATUS) || a.Logger.infoWithErrorId(1020), f
  4086. }, b.compileFragmentShader = function(a, c) {
  4087. return b._compileShader(a, c, a.FRAGMENT_SHADER)
  4088. }, b.compileVertexShader = function(a, c) {
  4089. return b._compileShader(a, c, a.VERTEX_SHADER)
  4090. }, b._compileShader = function(b, c, d) {
  4091. return d = b.createShader(d), b.shaderSource(d, c), b.compileShader(d), b.getShaderParameter(d, b.COMPILE_STATUS) ? d : (a.Logger.info(b.getShaderInfoLog(d)), null)
  4092. }, b.checkCanUseWebGL = function() {
  4093. if (void 0 == b.canUseWebGL) try {
  4094. var a = document.createElement("canvas");
  4095. b.canUseWebGL = !(!window.WebGLRenderingContext || !a.getContext("webgl") && !a.getContext("experimental-webgl"))
  4096. } catch (c) {
  4097. b.canUseWebGL = !1
  4098. }
  4099. return b.canUseWebGL
  4100. }, b
  4101. }();
  4102. a.WebGLUtils = b, b.prototype.__class__ = "egret.WebGLUtils"
  4103. }(egret || (egret = {})),
  4104. function(a) {
  4105. var b = function() {
  4106. function b(a) {
  4107. this.defaultVertexSrc = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec2 aColor;\nuniform vec2 projectionVector;\nuniform vec2 offsetVector;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nconst vec2 center = vec2(-1.0, 1.0);\nvoid main(void) {\n gl_Position = vec4( ((aVertexPosition + offsetVector) / projectionVector) + center , 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n vColor = vec4(aColor.x, aColor.x, aColor.x, aColor.x);\n}", this.program = this.gl = null, this.fragmentSrc = "precision lowp float;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nuniform sampler2D uSampler;\nvoid main(void) {\ngl_FragColor = texture2D(uSampler, vTextureCoord) * vColor ;\n}", this.uniforms = null, this.gl = a, this.init()
  4108. }
  4109. return b.prototype.init = function() {
  4110. var d, b = this.gl,
  4111. c = a.WebGLUtils.compileProgram(b, this.defaultVertexSrc, this.fragmentSrc);
  4112. b.useProgram(c), this.uSampler = b.getUniformLocation(c, "uSampler"), this.projectionVector = b.getUniformLocation(c, "projectionVector"), this.offsetVector = b.getUniformLocation(c, "offsetVector"), this.dimensions = b.getUniformLocation(c, "dimensions"), this.aVertexPosition = b.getAttribLocation(c, "aVertexPosition"), this.aTextureCoord = b.getAttribLocation(c, "aTextureCoord"), this.colorAttribute = b.getAttribLocation(c, "aColor"), -1 === this.colorAttribute && (this.colorAttribute = 2), this.attributes = [this.aVertexPosition, this.aTextureCoord, this.colorAttribute];
  4113. for (d in this.uniforms) this.uniforms[d].uniformLocation = b.getUniformLocation(c, d);
  4114. this.initUniforms(), this.program = c
  4115. }, b.prototype.initUniforms = function() {
  4116. var a, b, c, d;
  4117. if (this.uniforms) {
  4118. c = this.gl;
  4119. for (b in this.uniforms) a = this.uniforms[b], d = a.type, "mat2" === d || "mat3" === d || "mat4" === d ? (a.glMatrix = !0, a.glValueLength = 1, "mat2" === d ? a.glFunc = c.uniformMatrix2fv : "mat3" === d ? a.glFunc = c.uniformMatrix3fv : "mat4" === d && (a.glFunc = c.uniformMatrix4fv)) : (a.glFunc = c["uniform" + d], a.glValueLength = "2f" === d || "2i" === d ? 2 : "3f" === d || "3i" === d ? 3 : "4f" === d || "4i" === d ? 4 : 1)
  4120. }
  4121. }, b.prototype.syncUniforms = function() {
  4122. if (this.uniforms) {
  4123. var a, b, c = this.gl;
  4124. for (b in this.uniforms) a = this.uniforms[b], 1 === a.glValueLength ? !0 === a.glMatrix ? a.glFunc.call(c, a.uniformLocation, a.transpose, a.value) : a.glFunc.call(c, a.uniformLocation, a.value) : 2 === a.glValueLength ? a.glFunc.call(c, a.uniformLocation, a.value.x, a.value.y) : 3 === a.glValueLength ? a.glFunc.call(c, a.uniformLocation, a.value.x, a.value.y, a.value.z) : 4 === a.glValueLength && a.glFunc.call(c, a.uniformLocation, a.value.x, a.value.y, a.value.z, a.value.w)
  4125. }
  4126. }, b
  4127. }();
  4128. a.EgretShader = b, b.prototype.__class__ = "egret.EgretShader"
  4129. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  4130. function c() {
  4131. this.constructor = a
  4132. }
  4133. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4134. c.prototype = b.prototype, a.prototype = new c
  4135. },
  4136. function(a) {
  4137. var b = function(a) {
  4138. function b(b) {
  4139. a.call(this, b), this.fragmentSrc = "precision mediump float;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nuniform float invert;\nuniform mat4 matrix;\nuniform vec4 colorAdd;\nuniform sampler2D uSampler;\nvoid main(void) {\nvec4 locColor = texture2D(uSampler, vTextureCoord) * matrix;\nif(locColor.a != 0.0){\nlocColor += colorAdd;\n}\ngl_FragColor = locColor;\n}", this.uniforms = {
  4140. matrix: {
  4141. type: "mat4",
  4142. value: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
  4143. },
  4144. colorAdd: {
  4145. type: "4f",
  4146. value: {
  4147. x: 0,
  4148. y: 0,
  4149. z: 0,
  4150. w: 0
  4151. }
  4152. }
  4153. }, this.init()
  4154. }
  4155. return __extends(b, a), b
  4156. }(a.EgretShader);
  4157. a.ColorTransformShader = b, b.prototype.__class__ = "egret.ColorTransformShader"
  4158. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  4159. function c() {
  4160. this.constructor = a
  4161. }
  4162. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4163. c.prototype = b.prototype, a.prototype = new c
  4164. },
  4165. function(a) {
  4166. var b = function(a) {
  4167. function b(b) {
  4168. a.call(this, b), this.fragmentSrc = "precision mediump float;uniform vec2 blur;uniform sampler2D uSampler;varying vec2 vTextureCoord;void main(){gl_FragColor = vec4(0.0);gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2(-0.028 * blur.x, -0.028 * blur.y))) * 0.0044299121055113265;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2(-0.024 * blur.x, -0.024 * blur.y))) * 0.00895781211794;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2(-0.020 * blur.x, -0.020 * blur.y))) * 0.0215963866053;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2(-0.016 * blur.x, -0.016 * blur.y))) * 0.0443683338718;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2(-0.012 * blur.x, -0.012 * blur.y))) * 0.0776744219933;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2(-0.008 * blur.x, -0.008 * blur.y))) * 0.115876621105;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2(-0.004 * blur.x, -0.004 * blur.y))) * 0.147308056121;gl_FragColor += texture2D(uSampler, vTextureCoord) * 0.159576912161;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2( 0.004 * blur.x, 0.004 * blur.y))) * 0.147308056121;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2( 0.008 * blur.x, 0.008 * blur.y))) * 0.115876621105;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2( 0.012 * blur.x, 0.012 * blur.y))) * 0.0776744219933;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2( 0.016 * blur.x, 0.016 * blur.y))) * 0.0443683338718;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2( 0.020 * blur.x, 0.020 * blur.y))) * 0.0215963866053;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2( 0.024 * blur.x, 0.024 * blur.y))) * 0.00895781211794;gl_FragColor += texture2D(uSampler, (vTextureCoord + vec2( 0.028 * blur.x, 0.028 * blur.y))) * 0.0044299121055113265;}", this.uniforms = {
  4169. blur: {
  4170. type: "2f",
  4171. value: {
  4172. x: 2,
  4173. y: 2
  4174. }
  4175. }
  4176. }, this.init()
  4177. }
  4178. return __extends(b, a), b
  4179. }(a.EgretShader);
  4180. a.BlurShader = b, b.prototype.__class__ = "egret.BlurShader"
  4181. }(egret || (egret = {})),
  4182. function(a) {
  4183. var b = function() {
  4184. function b(a) {
  4185. this.alpha = this.translationMatrix = this.attributes = this.colorAttribute = this.aVertexPosition = this.tintColor = this.offsetVector = this.projectionVector = this.program = this.gl = null, this.fragmentSrc = "precision mediump float;\nvarying vec4 vColor;\nvoid main(void) {\n gl_FragColor = vColor;\n}", this.vertexSrc = "attribute vec2 aVertexPosition;\nattribute vec4 aColor;\nuniform mat3 translationMatrix;\nuniform vec2 projectionVector;\nuniform vec2 offsetVector;\nuniform float alpha;\nuniform vec3 tint;\nvarying vec4 vColor;\nvoid main(void) {\n vec3 v = translationMatrix * vec3(aVertexPosition , 1.0);\n v -= offsetVector.xyx;\n gl_Position = vec4( v.x / projectionVector.x -1.0, v.y / -projectionVector.y + 1.0 , 0.0, 1.0);\n vColor = aColor * vec4(tint * alpha, alpha);\n}", this.gl = a, this.init()
  4186. }
  4187. return b.prototype.init = function() {
  4188. var b = this.gl,
  4189. c = a.WebGLUtils.compileProgram(b, this.vertexSrc, this.fragmentSrc);
  4190. b.useProgram(c), this.projectionVector = b.getUniformLocation(c, "projectionVector"), this.offsetVector = b.getUniformLocation(c, "offsetVector"), this.tintColor = b.getUniformLocation(c, "tint"), this.aVertexPosition = b.getAttribLocation(c, "aVertexPosition"), this.colorAttribute = b.getAttribLocation(c, "aColor"), this.attributes = [this.aVertexPosition, this.colorAttribute], this.translationMatrix = b.getUniformLocation(c, "translationMatrix"), this.alpha = b.getUniformLocation(c, "alpha"), this.program = c
  4191. }, b
  4192. }();
  4193. a.PrimitiveShader = b, b.prototype.__class__ = "egret.PrimitiveShader"
  4194. }(egret || (egret = {})),
  4195. function(a) {
  4196. var b = function() {
  4197. function b(a) {
  4198. this.gl = null, this.maxAttibs = 10, this.attribState = [], this.tempAttribState = [], this.blurShader = this.colorTransformShader = this.primitiveShader = this.defaultShader = this.currentShader = null;
  4199. for (var b = 0; b < this.maxAttibs; b++) this.attribState[b] = !1;
  4200. this.setContext(a)
  4201. }
  4202. return b.prototype.setContext = function(b) {
  4203. this.gl = b, this.primitiveShader = new a.PrimitiveShader(b), this.defaultShader = new a.EgretShader(b), this.colorTransformShader = new a.ColorTransformShader(b), this.blurShader = new a.BlurShader(b), this.activateShader(this.defaultShader)
  4204. }, b.prototype.activateShader = function(a) {
  4205. this.currentShader != a && (this.gl.useProgram(a.program), this.setAttribs(a.attributes), this.currentShader = a)
  4206. }, b.prototype.setAttribs = function(a) {
  4207. var b, c;
  4208. for (c = this.tempAttribState.length, b = 0; c > b; b++) this.tempAttribState[b] = !1;
  4209. for (c = a.length, b = 0; c > b; b++) this.tempAttribState[a[b]] = !0;
  4210. for (a = this.gl, c = this.attribState.length, b = 0; c > b; b++) this.attribState[b] !== this.tempAttribState[b] && (this.attribState[b] = this.tempAttribState[b], this.tempAttribState[b] ? a.enableVertexAttribArray(b) : a.disableVertexAttribArray(b))
  4211. }, b
  4212. }();
  4213. a.WebGLShaderManager = b, b.prototype.__class__ = "egret.WebGLShaderManager"
  4214. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  4215. function c() {
  4216. this.constructor = a
  4217. }
  4218. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4219. c.prototype = b.prototype, a.prototype = new c
  4220. },
  4221. function(a) {
  4222. var b = function(b) {
  4223. function c() {
  4224. b.call(this)
  4225. }
  4226. return __extends(c, b), c.prototype.proceed = function(b) {
  4227. function c() {
  4228. if (4 == e.readyState)
  4229. if (e.status != b._status && (b._status = e.status, a.HTTPStatusEvent.dispatchHTTPStatusEvent(b, e.status)), 400 <= e.status || 0 == e.status) a.IOErrorEvent.dispatchIOErrorEvent(b);
  4230. else {
  4231. switch (b.dataFormat) {
  4232. case a.URLLoaderDataFormat.TEXT:
  4233. b.data = e.responseText;
  4234. break;
  4235. case a.URLLoaderDataFormat.VARIABLES:
  4236. b.data = new a.URLVariables(e.responseText);
  4237. break;
  4238. case a.URLLoaderDataFormat.BINARY:
  4239. b.data = e.response;
  4240. break;
  4241. default:
  4242. b.data = e.responseText
  4243. }
  4244. a.__callAsync(a.Event.dispatchEvent, a.Event, b, a.Event.COMPLETE)
  4245. }
  4246. }
  4247. var d, e, f;
  4248. b.dataFormat == a.URLLoaderDataFormat.TEXTURE ? this.loadTexture(b) : b.dataFormat == a.URLLoaderDataFormat.SOUND ? this.loadSound(b) : (d = b._request, e = this.getXHR(), e.onreadystatechange = c, f = a.NetContext._getUrl(d), e.open(d.method, f, !0), this.setResponseType(e, b.dataFormat), d.method != a.URLRequestMethod.GET && d.data ? d.data instanceof a.URLVariables ? (e.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), e.send(d.data.toString())) : (e.setRequestHeader("Content-Type", "multipart/form-data"), e.send(d.data)) : e.send())
  4249. }, c.prototype.loadSound = function(b) {
  4250. function c(f) {
  4251. a.clearTimeout(e.__timeoutId), e.removeEventListener("canplaythrough", c, !1), e.removeEventListener("error", d, !1), f = new a.Sound, f._setAudio(e), b.data = f, a.__callAsync(a.Event.dispatchEvent, a.Event, b, a.Event.COMPLETE)
  4252. }
  4253. function d() {
  4254. a.clearTimeout(e.__timeoutId), e.removeEventListener("canplaythrough", c, !1), e.removeEventListener("error", d, !1), a.IOErrorEvent.dispatchIOErrorEvent(b)
  4255. }
  4256. var e = new Audio(b._request.url);
  4257. e.__timeoutId = a.setTimeout(c, this, 100), e.addEventListener("canplaythrough", c, !1), e.addEventListener("error", d, !1), e.load()
  4258. }, c.prototype.getXHR = function() {
  4259. return window.XMLHttpRequest ? new window.XMLHttpRequest : new ActiveXObject("MSXML2.XMLHTTP")
  4260. }, c.prototype.setResponseType = function(b, c) {
  4261. switch (c) {
  4262. case a.URLLoaderDataFormat.TEXT:
  4263. case a.URLLoaderDataFormat.VARIABLES:
  4264. b.responseType = a.URLLoaderDataFormat.TEXT;
  4265. break;
  4266. case a.URLLoaderDataFormat.BINARY:
  4267. b.responseType = "arraybuffer";
  4268. break;
  4269. default:
  4270. b.responseType = c
  4271. }
  4272. }, c.prototype.loadTexture = function(b) {
  4273. var c = b._request,
  4274. d = new Image;
  4275. d.onload = function(c) {
  4276. d.onerror = null, d.onload = null, c = new a.Texture, c._setBitmapData(d), b.data = c, a.__callAsync(a.Event.dispatchEvent, a.Event, b, a.Event.COMPLETE)
  4277. }, d.onerror = function() {
  4278. d.onerror = null, d.onload = null, a.IOErrorEvent.dispatchIOErrorEvent(b)
  4279. }, d.src = c.url
  4280. }, c
  4281. }(a.NetContext);
  4282. a.HTML5NetContext = b, b.prototype.__class__ = "egret.HTML5NetContext"
  4283. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  4284. function c() {
  4285. this.constructor = a
  4286. }
  4287. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4288. c.prototype = b.prototype, a.prototype = new c
  4289. },
  4290. function(a) {
  4291. var b = function(b) {
  4292. function c() {
  4293. b.call(this), this._isTouchDown = !1, this.rootDiv = null, this.rootDiv = document.getElementById(a.StageDelegate.canvas_div_name)
  4294. }
  4295. return __extends(c, b), c.prototype.prevent = function(a) {
  4296. a.stopPropagation(), 1 != a.isScroll && a.preventDefault()
  4297. }, c.prototype.run = function() {
  4298. var b = this;
  4299. window.navigator.msPointerEnabled ? (this.rootDiv.addEventListener("MSPointerDown", function(a) {
  4300. b._onTouchBegin(a), b.prevent(a)
  4301. }, !1), this.rootDiv.addEventListener("MSPointerMove", function(a) {
  4302. b._onTouchMove(a), b.prevent(a)
  4303. }, !1), this.rootDiv.addEventListener("MSPointerUp", function(a) {
  4304. b._onTouchEnd(a), b.prevent(a)
  4305. }, !1)) : a.MainContext.deviceType == a.MainContext.DEVICE_MOBILE ? this.addTouchListener() : a.MainContext.deviceType == a.MainContext.DEVICE_PC && (this.addTouchListener(), this.addMouseListener()), window.addEventListener("mousedown", function(a) {
  4306. b.inOutOfCanvas(a) ? b.dispatchLeaveStageEvent() : b._isTouchDown = !0
  4307. }), window.addEventListener("mouseup", function(a) {
  4308. b._isTouchDown && (b.inOutOfCanvas(a) ? b.dispatchLeaveStageEvent() : b._onTouchEnd(a)), b._isTouchDown = !1
  4309. })
  4310. }, c.prototype.addMouseListener = function() {
  4311. var a = this;
  4312. this.rootDiv.addEventListener("mousedown", function(b) {
  4313. a._onTouchBegin(b)
  4314. }), this.rootDiv.addEventListener("mousemove", function(b) {
  4315. a._onTouchMove(b)
  4316. }), this.rootDiv.addEventListener("mouseup", function(b) {
  4317. a._onTouchEnd(b)
  4318. })
  4319. }, c.prototype.addTouchListener = function() {
  4320. var a = this;
  4321. this.rootDiv.addEventListener("touchstart", function(b) {
  4322. for (var c = b.changedTouches.length, d = 0; c > d; d++) a._onTouchBegin(b.changedTouches[d]);
  4323. a.prevent(b)
  4324. }, !1), this.rootDiv.addEventListener("touchmove", function(b) {
  4325. for (var c = b.changedTouches.length, d = 0; c > d; d++) a._onTouchMove(b.changedTouches[d]);
  4326. a.prevent(b)
  4327. }, !1), this.rootDiv.addEventListener("touchend", function(b) {
  4328. for (var c = b.changedTouches.length, d = 0; c > d; d++) a._onTouchEnd(b.changedTouches[d]);
  4329. a.prevent(b)
  4330. }, !1), this.rootDiv.addEventListener("touchcancel", function(b) {
  4331. for (var c = b.changedTouches.length, d = 0; c > d; d++) a._onTouchEnd(b.changedTouches[d]);
  4332. a.prevent(b)
  4333. }, !1)
  4334. }, c.prototype.inOutOfCanvas = function(b) {
  4335. var d, c = this.getLocation(this.rootDiv, b);
  4336. return b = c.x, c = c.y, d = a.MainContext.instance.stage, 0 > b || 0 > c || b > d.stageWidth || c > d.stageHeight ? !0 : !1
  4337. }, c.prototype.dispatchLeaveStageEvent = function() {
  4338. this.touchingIdentifiers.length = 0, a.MainContext.instance.stage.dispatchEventWith(a.Event.LEAVE_STAGE)
  4339. }, c.prototype._onTouchBegin = function(a) {
  4340. var b = this.getLocation(this.rootDiv, a),
  4341. c = -1;
  4342. a.hasOwnProperty("identifier") && (c = a.identifier), this.onTouchBegan(b.x, b.y, c)
  4343. }, c.prototype._onTouchMove = function(a) {
  4344. var b = this.getLocation(this.rootDiv, a),
  4345. c = -1;
  4346. a.hasOwnProperty("identifier") && (c = a.identifier), this.onTouchMove(b.x, b.y, c)
  4347. }, c.prototype._onTouchEnd = function(a) {
  4348. var b = this.getLocation(this.rootDiv, a),
  4349. c = -1;
  4350. a.hasOwnProperty("identifier") && (c = a.identifier), this.onTouchEnd(b.x, b.y, c)
  4351. }, c.prototype.getLocation = function(b, c) {
  4352. var d, e, h, f = document.documentElement,
  4353. g = window;
  4354. return "function" == typeof b.getBoundingClientRect ? (e = b.getBoundingClientRect(), d = e.left, e = e.top) : e = d = 0, d += g.pageXOffset - f.clientLeft, e += g.pageYOffset - f.clientTop, null != c.pageX ? (f = c.pageX, g = c.pageY) : (d -= document.body.scrollLeft, e -= document.body.scrollTop, f = c.clientX, g = c.clientY), h = a.Point.identity, h.x = (f - d) / a.StageDelegate.getInstance().getScaleX(), h.y = (g - e) / a.StageDelegate.getInstance().getScaleY(), h
  4355. }, c
  4356. }(a.TouchContext);
  4357. a.HTML5TouchContext = b, b.prototype.__class__ = "egret.HTML5TouchContext"
  4358. }(egret || (egret = {})), __extends = this.__extends || function(a, b) {
  4359. function c() {
  4360. this.constructor = a
  4361. }
  4362. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4363. c.prototype = b.prototype, a.prototype = new c
  4364. },
  4365. function(a) {
  4366. var b = function(b) {
  4367. function c() {
  4368. b.call(this), this.inputElement = this.div = null, this._hasListeners = !1, this._inputType = "", this._isShow = !1, this.textValue = "", this._height = this._width = 0, this._styleInfoes = {};
  4369. var d = a.StageDelegate.getInstance().getScaleX(),
  4370. e = a.StageDelegate.getInstance().getScaleY(),
  4371. f = a.Browser.getInstance().$new("div");
  4372. f.position.x = 0, f.position.y = 0, f.scale.x = d, f.scale.y = e, f.transforms(), f.style[c.getTrans("transformOrigin")] = "0% 0% 0px", this.div = f, e = a.MainContext.instance.stage, d = e.stageWidth, e = e.stageHeight, f = new a.Shape, f.width = d, f.height = e, f.touchEnabled = !0, this._shape = f, this.getStageDelegateDiv().appendChild(this.div)
  4373. }
  4374. return __extends(c, b), c.getTrans = function(a) {
  4375. return "" == c.header && (c.header = c.getHeader()), c.header + a.substring(1, a.length)
  4376. }, c.getHeader = function() {
  4377. for (var a = document.createElement("div").style, b = ["t", "webkitT", "msT", "MozT", "OT"], c = 0; c < b.length; c++)
  4378. if (b[c] + "ransform" in a) return b[c];
  4379. return b[0]
  4380. }, c.prototype.getStageDelegateDiv = function() {
  4381. var b = a.Browser.getInstance().$("#StageDelegateDiv");
  4382. return b || (b = a.Browser.getInstance().$new("div"), b.id = "StageDelegateDiv", document.getElementById(a.StageDelegate.canvas_div_name).appendChild(b), b.transforms()), b
  4383. }, c.prototype._setMultiline = function(a) {
  4384. b.prototype._setMultiline.call(this, a), this.createInput()
  4385. }, c.prototype.callHandler = function(a) {
  4386. a.stopPropagation()
  4387. }, c.prototype._add = function() {
  4388. this.div && null == this.div.parentNode && this.getStageDelegateDiv().appendChild(this.div)
  4389. }, c.prototype._remove = function() {
  4390. this._shape && this._shape.parent && this._shape.parent.removeChild(this._shape), this.div && this.div.parentNode && this.div.parentNode.removeChild(this.div)
  4391. }, c.prototype._addListeners = function() {
  4392. this.inputElement && !this._hasListeners && (this._hasListeners = !0, this.inputElement.addEventListener("mousedown", this.callHandler), this.inputElement.addEventListener("touchstart", this.callHandler), this.inputElement.addEventListener("MSPointerDown", this.callHandler))
  4393. }, c.prototype._removeListeners = function() {
  4394. this.inputElement && this._hasListeners && (this._hasListeners = !1, this.inputElement.removeEventListener("mousedown", this.callHandler), this.inputElement.removeEventListener("touchstart", this.callHandler), this.inputElement.removeEventListener("MSPointerDown", this.callHandler))
  4395. }, c.prototype.createInput = function() {
  4396. var a = this._multiline ? "textarea" : "input";
  4397. this._inputType != a && (this._inputType = a, null != this.inputElement && (this._removeListeners(), this.div.removeChild(this.inputElement)), this._multiline ? (a = document.createElement("textarea"), a.style.resize = "none") : a = document.createElement("input"), this._styleInfoes = {}, a.type = "text", this.inputElement = a, this.inputElement.value = "", this.div.appendChild(a), this._addListeners(), this.setElementStyle("width", "0px"), this.setElementStyle("border", "none"), this.setElementStyle("margin", "0"), this.setElementStyle("padding", "0"), this.setElementStyle("outline", "medium"), this.setElementStyle("verticalAlign", "top"), this.setElementStyle("wordBreak", "break-all"), this.setElementStyle("overflow", "hidden"))
  4398. }, c.prototype._open = function() {}, c.prototype._setScale = function(c, d) {
  4399. b.prototype._setScale.call(this, c, d);
  4400. var e = a.StageDelegate.getInstance().getScaleX(),
  4401. f = a.StageDelegate.getInstance().getScaleY();
  4402. this.div.scale.x = e * c, this.div.scale.y = f * d, this.div.transforms()
  4403. }, c.prototype.changePosition = function(b, c) {
  4404. var d = a.StageDelegate.getInstance().getScaleX(),
  4405. e = a.StageDelegate.getInstance().getScaleY();
  4406. this.div.position.x = b * d, this.div.position.y = c * e, this.div.transforms()
  4407. }, c.prototype.setStyles = function() {
  4408. this.setElementStyle("fontStyle", this._italic ? "italic" : "normal"), this.setElementStyle("fontWeight", this._bold ? "bold" : "normal"), this.setElementStyle("textAlign", this._textAlign), this.setElementStyle("fontSize", this._size + "px"), this.setElementStyle("color", "#000000"), this.setElementStyle("width", this._width + "px"), this.setElementStyle("height", this._height + "px"), this.setElementStyle("display", "block")
  4409. }, c.prototype._show = function() {
  4410. var b, c;
  4411. a.MainContext.instance.stage._changeSizeDispatchFlag = !1, 0 < this._maxChars ? this.inputElement.setAttribute("maxlength", this._maxChars) : this.inputElement.removeAttribute("maxlength"), this._isShow = !0, b = this._getText(), this.inputElement.value = b, c = this, this.inputElement.oninput = function() {
  4412. c.textValue = c.inputElement.value, c.dispatchEvent(new a.Event("updateText"))
  4413. }, this.setStyles(), this.inputElement.focus(), this.inputElement.selectionStart = b.length, this.inputElement.selectionEnd = b.length, this._shape && null == this._shape.parent && a.MainContext.instance.stage.addChild(this._shape)
  4414. }, c.prototype._hide = function() {
  4415. if (a.MainContext.instance.stage._changeSizeDispatchFlag = !0, null != this.inputElement) {
  4416. this._isShow = !1, this.inputElement.oninput = function() {}, this.setElementStyle("border", "none"), this.setElementStyle("display", "none"), this.inputElement.value = "", this.setElementStyle("width", "0px"), window.scrollTo(0, 0);
  4417. var b = this;
  4418. a.setTimeout(function() {
  4419. b.inputElement.blur(), window.scrollTo(0, 0)
  4420. }, this, 50), this._shape && this._shape.parent && this._shape.parent.removeChild(this._shape)
  4421. }
  4422. }, c.prototype._getText = function() {
  4423. return this.textValue || (this.textValue = ""), this.textValue
  4424. }, c.prototype._setText = function(a) {
  4425. this.textValue = a, this.resetText()
  4426. }, c.prototype.resetText = function() {
  4427. this.inputElement && (this.inputElement.value = this.textValue)
  4428. }, c.prototype._setWidth = function(a) {
  4429. this._width = a
  4430. }, c.prototype._setHeight = function(a) {
  4431. this._height = a
  4432. }, c.prototype.setElementStyle = function(a, b) {
  4433. this.inputElement && this._styleInfoes[a] != b && (this.inputElement.style[a] = b, this._styleInfoes[a] = b)
  4434. }, c.header = "", c
  4435. }(a.StageText);
  4436. a.HTML5StageText = b, b.prototype.__class__ = "egret.HTML5StageText"
  4437. }(egret || (egret = {})), egret.StageText.create = function() {
  4438. return new egret.HTML5StageText
  4439. }, __extends = this.__extends || function(a, b) {
  4440. function c() {
  4441. this.constructor = a
  4442. }
  4443. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4444. c.prototype = b.prototype, a.prototype = new c
  4445. }, ! function(a) {
  4446. var b = function(a) {
  4447. function b(b, c, d) {
  4448. void 0 === c && (c = !1), void 0 === d && (d = !1), a.call(this, b, c, d), this.itemsTotal = this.itemsLoaded = 0, this.groupName = "", this.resItem = null
  4449. }
  4450. return __extends(b, a), b.dispatchResourceEvent = function(a, c, d, e, f, g) {
  4451. void 0 === d && (d = ""), void 0 === e && (e = null), void 0 === f && (f = 0), void 0 === g && (g = 0);
  4452. var h = egret.Event._getPropertyData(b);
  4453. h.groupName = d, h.resItem = e, h.itemsLoaded = f, h.itemsTotal = g, egret.Event._dispatchByTarget(b, a, c, h)
  4454. }, b.ITEM_LOAD_ERROR = "itemLoadError", b.CONFIG_COMPLETE = "configComplete", b.CONFIG_LOAD_ERROR = "configLoadError", b.GROUP_PROGRESS = "groupProgress", b.GROUP_COMPLETE = "groupComplete", b.GROUP_LOAD_ERROR = "groupLoadError", b
  4455. }(egret.Event);
  4456. a.ResourceEvent = b, b.prototype.__class__ = "RES.ResourceEvent"
  4457. }(RES || (RES = {})),
  4458. function(a) {
  4459. var b = function() {
  4460. function a(a, b, c) {
  4461. this.groupName = "", this.data = null, this._loaded = !1, this.name = a, this.url = b, this.type = c
  4462. }
  4463. return Object.defineProperty(a.prototype, "loaded", {
  4464. get: function() {
  4465. return this.data ? this.data.loaded : this._loaded
  4466. },
  4467. set: function(a) {
  4468. this.data && (this.data.loaded = a), this._loaded = a
  4469. },
  4470. enumerable: !0,
  4471. configurable: !0
  4472. }), a.prototype.toString = function() {
  4473. return '[ResourceItem name="' + this.name + '" url="' + this.url + '" type="' + this.type + '"]'
  4474. }, a.TYPE_XML = "xml", a.TYPE_IMAGE = "image", a.TYPE_BIN = "bin", a.TYPE_TEXT = "text", a.TYPE_JSON = "json", a.TYPE_SHEET = "sheet", a.TYPE_FONT = "font", a.TYPE_SOUND = "sound", a
  4475. }();
  4476. a.ResourceItem = b, b.prototype.__class__ = "RES.ResourceItem"
  4477. }(RES || (RES = {})),
  4478. function(a) {
  4479. var b = function() {
  4480. function b() {
  4481. this.keyMap = {}, this.groupDic = {}, a.configInstance = this
  4482. }
  4483. return b.prototype.getGroupByName = function(a) {
  4484. var c, d, b = [];
  4485. if (!this.groupDic[a]) return b;
  4486. for (a = this.groupDic[a], c = a.length, d = 0; c > d; d++) b.push(this.parseResourceItem(a[d]));
  4487. return b
  4488. }, b.prototype.getRawGroupByName = function(a) {
  4489. return this.groupDic[a] ? this.groupDic[a] : []
  4490. }, b.prototype.createGroup = function(a, b, c) {
  4491. var d, e, f, g, h, i, j;
  4492. if (void 0 === c && (c = !1), !c && this.groupDic[a] || !b || 0 == b.length) return !1;
  4493. for (c = this.groupDic, d = [], e = b.length, f = 0; e > f; f++)
  4494. if (g = b[f], h = c[g])
  4495. for (g = h.length, i = 0; g > i; i++) j = h[i], -1 == d.indexOf(j) && d.push(j);
  4496. else(j = this.keyMap[g]) ? -1 == d.indexOf(j) && d.push(j) : egret.Logger.warningWithErrorId(2e3, g);
  4497. return 0 == d.length ? !1 : (this.groupDic[a] = d, !0)
  4498. }, b.prototype.parseConfig = function(a, b) {
  4499. var c, d, e, f, g, h, i, j, k;
  4500. if (a) {
  4501. if (c = a.resources)
  4502. for (d = c.length, e = 0; d > e; e++) f = c[e], g = f.url, g && -1 == g.indexOf("://") && (f.url = b + g), this.addItemToKeyMap(f);
  4503. if (c = a.groups)
  4504. for (d = c.length, e = 0; d > e; e++) {
  4505. for (g = c[e], h = [], i = g.keys.split(","), j = i.length, k = 0; j > k; k++) f = i[k].trim(), (f = this.keyMap[f]) && -1 == h.indexOf(f) && h.push(f);
  4506. this.groupDic[g.name] = h
  4507. }
  4508. }
  4509. }, b.prototype.addSubkey = function(a, b) {
  4510. var c = this.keyMap[b];
  4511. c && !this.keyMap[a] && (this.keyMap[a] = c)
  4512. }, b.prototype.addItemToKeyMap = function(a) {
  4513. var b, c, d, e;
  4514. if (this.keyMap[a.name] || (this.keyMap[a.name] = a), a.hasOwnProperty("subkeys"))
  4515. for (b = a.subkeys.split(","), a.subkeys = b, c = b.length, d = 0; c > d; d++) e = b[d], null == this.keyMap[e] && (this.keyMap[e] = a)
  4516. }, b.prototype.getName = function(a) {
  4517. return (a = this.keyMap[a]) ? a.name : ""
  4518. }, b.prototype.getType = function(a) {
  4519. return (a = this.keyMap[a]) ? a.type : ""
  4520. }, b.prototype.getRawResourceItem = function(a) {
  4521. return this.keyMap[a]
  4522. }, b.prototype.getResourceItem = function(a) {
  4523. return (a = this.keyMap[a]) ? this.parseResourceItem(a) : null
  4524. }, b.prototype.parseResourceItem = function(b) {
  4525. var c = new a.ResourceItem(b.name, b.url, b.type);
  4526. return c.data = b, c
  4527. }, b
  4528. }();
  4529. a.ResourceConfig = b, b.prototype.__class__ = "RES.ResourceConfig"
  4530. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4531. function c() {
  4532. this.constructor = a
  4533. }
  4534. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4535. c.prototype = b.prototype, a.prototype = new c
  4536. },
  4537. function(a) {
  4538. var b = function(b) {
  4539. function c() {
  4540. b.call(this), this.thread = 2, this.loadingCount = 0, this.resInstance = this.callBack = null, this.groupTotalDic = {}, this.numLoadedDic = {}, this.itemListDic = {}, this.groupErrorDic = {}, this.retryTimesDic = {}, this.maxRetryTimes = 3, this.failedList = [], this.priorityQueue = {}, this.lazyLoadList = [], this.analyzerDic = {}, this.queueIndex = 0
  4541. }
  4542. return __extends(c, b), c.prototype.isGroupInLoading = function(a) {
  4543. return void 0 !== this.itemListDic[a]
  4544. }, c.prototype.loadGroup = function(b, c, d) {
  4545. if (void 0 === d && (d = 0), !this.itemListDic[c] && c)
  4546. if (b && 0 != b.length) {
  4547. this.priorityQueue[d] ? this.priorityQueue[d].push(c) : this.priorityQueue[d] = [c], this.itemListDic[c] = b, d = b.length;
  4548. for (var e = 0; d > e; e++) b[e].groupName = c;
  4549. this.groupTotalDic[c] = b.length, this.numLoadedDic[c] = 0, this.next()
  4550. } else egret.Logger.warningWithErrorId(2001, c), b = new a.ResourceEvent(a.ResourceEvent.GROUP_LOAD_ERROR), b.groupName = c, this.dispatchEvent(b)
  4551. }, c.prototype.loadItem = function(a) {
  4552. this.lazyLoadList.push(a), a.groupName = "", this.next()
  4553. }, c.prototype.next = function() {
  4554. for (var b, c; this.loadingCount < this.thread && (b = this.getOneResourceItem(), b);) this.loadingCount++, b.loaded ? this.onItemComplete(b) : (c = this.analyzerDic[b.type], c || (c = this.analyzerDic[b.type] = egret.Injector.getInstance(a.AnalyzerBase, b.type)), c.loadFile(b, this.onItemComplete, this))
  4555. }, c.prototype.getOneResourceItem = function() {
  4556. var a, b, c, d;
  4557. if (0 < this.failedList.length) return this.failedList.shift();
  4558. b = Number.NEGATIVE_INFINITY;
  4559. for (a in this.priorityQueue) b = Math.max(b, a);
  4560. if (b = this.priorityQueue[b], !b || 0 == b.length) return 0 == this.lazyLoadList.length ? null : this.lazyLoadList.pop();
  4561. for (a = b.length, d = 0; a > d && (this.queueIndex >= a && (this.queueIndex = 0), c = this.itemListDic[b[this.queueIndex]], !(0 < c.length)); d++) this.queueIndex++;
  4562. return 0 == c.length ? null : c.shift()
  4563. }, c.prototype.onItemComplete = function(b) {
  4564. var c, d, e;
  4565. if (this.loadingCount--, c = b.groupName, !b.loaded) {
  4566. if (d = this.retryTimesDic[b.name] || 1, !(d > this.maxRetryTimes)) return this.retryTimesDic[b.name] = d + 1, this.failedList.push(b), void this.next();
  4567. delete this.retryTimesDic[b.name], a.ResourceEvent.dispatchResourceEvent(this.resInstance, a.ResourceEvent.ITEM_LOAD_ERROR, c, b)
  4568. }
  4569. c ? (this.numLoadedDic[c]++, d = this.numLoadedDic[c], e = this.groupTotalDic[c], b.loaded || (this.groupErrorDic[c] = !0), a.ResourceEvent.dispatchResourceEvent(this.resInstance, a.ResourceEvent.GROUP_PROGRESS, c, b, d, e), d == e && (b = this.groupErrorDic[c], this.removeGroupName(c), delete this.groupTotalDic[c], delete this.numLoadedDic[c], delete this.itemListDic[c], delete this.groupErrorDic[c], b ? a.ResourceEvent.dispatchResourceEvent(this, a.ResourceEvent.GROUP_LOAD_ERROR, c) : a.ResourceEvent.dispatchResourceEvent(this, a.ResourceEvent.GROUP_COMPLETE, c))) : this.callBack.call(this.resInstance, b), this.next()
  4570. }, c.prototype.removeGroupName = function(a) {
  4571. var b, c, d, e, f, g;
  4572. for (b in this.priorityQueue) {
  4573. for (c = this.priorityQueue[b], d = c.length, e = 0, f = !1, d = c.length, g = 0; d > g; g++) {
  4574. if (c[g] == a) {
  4575. c.splice(e, 1), f = !0;
  4576. break
  4577. }
  4578. e++
  4579. }
  4580. if (f) {
  4581. 0 == c.length && delete this.priorityQueue[b];
  4582. break
  4583. }
  4584. }
  4585. }, c
  4586. }(egret.EventDispatcher);
  4587. a.ResourceLoader = b, b.prototype.__class__ = "RES.ResourceLoader"
  4588. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4589. function c() {
  4590. this.constructor = a
  4591. }
  4592. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4593. c.prototype = b.prototype, a.prototype = new c
  4594. },
  4595. function(a) {
  4596. var b = function(b) {
  4597. function c() {
  4598. b.call(this), this.resourceConfig = null, this.resourceConfig = a.configInstance
  4599. }
  4600. return __extends(c, b), c.prototype.addSubkey = function(a, b) {
  4601. this.resourceConfig.addSubkey(a, b)
  4602. }, c.prototype.loadFile = function() {}, c.prototype.getRes = function() {}, c.prototype.destroyRes = function() {
  4603. return !1
  4604. }, c.getStringPrefix = function(a) {
  4605. if (!a) return "";
  4606. var b = a.indexOf(".");
  4607. return -1 != b ? a.substring(0, b) : ""
  4608. }, c.getStringTail = function(a) {
  4609. if (!a) return "";
  4610. var b = a.indexOf(".");
  4611. return -1 != b ? a.substring(b + 1) : ""
  4612. }, c
  4613. }(egret.HashObject);
  4614. a.AnalyzerBase = b, b.prototype.__class__ = "RES.AnalyzerBase"
  4615. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4616. function c() {
  4617. this.constructor = a
  4618. }
  4619. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4620. c.prototype = b.prototype, a.prototype = new c
  4621. },
  4622. function(a) {
  4623. var b = function(a) {
  4624. function b() {
  4625. a.call(this), this.fileDic = {}, this.resItemDic = [], this._dataFormat = egret.URLLoaderDataFormat.BINARY, this.recycler = new egret.Recycler
  4626. }
  4627. return __extends(b, a), b.prototype.loadFile = function(a, b, c) {
  4628. if (this.fileDic[a.name]) b.call(c, a);
  4629. else {
  4630. var d = this.getLoader();
  4631. this.resItemDic[d.hashCode] = {
  4632. item: a,
  4633. func: b,
  4634. thisObject: c
  4635. }, d.load(new egret.URLRequest(a.url))
  4636. }
  4637. }, b.prototype.getLoader = function() {
  4638. var a = this.recycler.pop();
  4639. return a || (a = new egret.URLLoader, a.addEventListener(egret.Event.COMPLETE, this.onLoadFinish, this), a.addEventListener(egret.IOErrorEvent.IO_ERROR, this.onLoadFinish, this)), a.dataFormat = this._dataFormat, a
  4640. }, b.prototype.onLoadFinish = function(a) {
  4641. var d, e, b = a.target,
  4642. c = this.resItemDic[b.hashCode];
  4643. delete this.resItemDic[b.hashCode], d = c.item, e = c.func, d.loaded = a.type == egret.Event.COMPLETE, d.loaded && this.analyzeData(d, b.data), this.recycler.push(b), e.call(c.thisObject, d)
  4644. }, b.prototype.analyzeData = function(a, b) {
  4645. var c = a.name;
  4646. !this.fileDic[c] && b && (this.fileDic[c] = b)
  4647. }, b.prototype.getRes = function(a) {
  4648. return this.fileDic[a]
  4649. }, b.prototype.hasRes = function(a) {
  4650. return null != this.getRes(a)
  4651. }, b.prototype.destroyRes = function(a) {
  4652. return this.fileDic[a] ? (delete this.fileDic[a], !0) : !1
  4653. }, b
  4654. }(a.AnalyzerBase);
  4655. a.BinAnalyzer = b, b.prototype.__class__ = "RES.BinAnalyzer"
  4656. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4657. function c() {
  4658. this.constructor = a
  4659. }
  4660. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4661. c.prototype = b.prototype, a.prototype = new c
  4662. },
  4663. function(a) {
  4664. var b = function(a) {
  4665. function b() {
  4666. a.call(this), this._dataFormat = egret.URLLoaderDataFormat.TEXTURE
  4667. }
  4668. return __extends(b, a), b.prototype.analyzeData = function(a, b) {
  4669. var c = a.name;
  4670. !this.fileDic[c] && b && (this.fileDic[c] = b, (c = a.data) && c.scale9grid && (c = c.scale9grid.split(","), b.scale9Grid = new egret.Rectangle(parseInt(c[0]), parseInt(c[1]), parseInt(c[2]), parseInt(c[3]))))
  4671. }, b
  4672. }(a.BinAnalyzer);
  4673. a.ImageAnalyzer = b, b.prototype.__class__ = "RES.ImageAnalyzer"
  4674. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4675. function c() {
  4676. this.constructor = a
  4677. }
  4678. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4679. c.prototype = b.prototype, a.prototype = new c
  4680. },
  4681. function(a) {
  4682. var b = function(a) {
  4683. function b() {
  4684. a.call(this), this._dataFormat = egret.URLLoaderDataFormat.TEXT
  4685. }
  4686. return __extends(b, a), b.prototype.analyzeData = function(a, b) {
  4687. var c = a.name;
  4688. if (!this.fileDic[c] && b) try {
  4689. this.fileDic[c] = JSON.parse(b)
  4690. } catch (d) {
  4691. egret.Logger.warningWithErrorId(1017, a.url, b)
  4692. }
  4693. }, b
  4694. }(a.BinAnalyzer);
  4695. a.JsonAnalyzer = b, b.prototype.__class__ = "RES.JsonAnalyzer"
  4696. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4697. function c() {
  4698. this.constructor = a
  4699. }
  4700. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4701. c.prototype = b.prototype, a.prototype = new c
  4702. },
  4703. function(a) {
  4704. var b = function(a) {
  4705. function b() {
  4706. a.call(this), this._dataFormat = egret.URLLoaderDataFormat.TEXT
  4707. }
  4708. return __extends(b, a), b
  4709. }(a.BinAnalyzer);
  4710. a.TextAnalyzer = b, b.prototype.__class__ = "RES.TextAnalyzer"
  4711. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4712. function c() {
  4713. this.constructor = a
  4714. }
  4715. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4716. c.prototype = b.prototype, a.prototype = new c
  4717. },
  4718. function(a) {
  4719. var b = function(b) {
  4720. function c() {
  4721. b.call(this), this.sheetMap = {}, this.textureMap = {}, this._dataFormat = egret.URLLoaderDataFormat.TEXT
  4722. }
  4723. return __extends(c, b), c.prototype.getRes = function(b) {
  4724. var c = this.fileDic[b];
  4725. return c || (c = this.textureMap[b]), !c && (c = a.AnalyzerBase.getStringPrefix(b), c = this.fileDic[c]) && (b = a.AnalyzerBase.getStringTail(b), c = c.getTexture(b)), c
  4726. }, c.prototype.onLoadFinish = function(a) {
  4727. var d, e, b = a.target,
  4728. c = this.resItemDic[b.hashCode];
  4729. if (delete this.resItemDic[b.hashCode], d = c.item, e = c.func, d.loaded = a.type == egret.Event.COMPLETE, d.loaded)
  4730. if ("string" == typeof b.data) {
  4731. if (d.loaded = !1, a = this.analyzeConfig(d, b.data)) return d.url = a, this._dataFormat = egret.URLLoaderDataFormat.TEXTURE, this.loadFile(d, e, c.thisObject), void(this._dataFormat = egret.URLLoaderDataFormat.TEXT)
  4732. } else this.analyzeBitmap(d, b.data);
  4733. d.url = d.data.url, this.recycler.push(b), e.call(c.thisObject, d)
  4734. }, c.prototype.analyzeConfig = function(a, b) {
  4735. var c, d = a.name,
  4736. e = "";
  4737. try {
  4738. c = JSON.parse(b)
  4739. } catch (f) {
  4740. egret.Logger.warningWithErrorId(1017, a.url, b)
  4741. }
  4742. return c && (this.sheetMap[d] = c, e = this.getRelativePath(a.url, c.file)), e
  4743. }, c.prototype.analyzeBitmap = function(a, b) {
  4744. var d, c = a.name;
  4745. !this.fileDic[c] && b && (d = this.sheetMap[c], delete this.sheetMap[c], d = this.parseSpriteSheet(b, d, a.data && a.data.subkeys ? "" : c), this.fileDic[c] = d)
  4746. }, c.prototype.getRelativePath = function(a, b) {
  4747. a = a.split("\\").join("/");
  4748. var c = a.lastIndexOf("/");
  4749. return a = -1 != c ? a.substring(0, c + 1) + b : b
  4750. }, c.prototype.parseSpriteSheet = function(a, b, c) {
  4751. var d, e, f, g;
  4752. if (b = b.frames, !b) return null;
  4753. e = new egret.SpriteSheet(a), f = this.textureMap;
  4754. for (d in b) g = b[d], a = e.createTexture(d, g.x, g.y, g.w, g.h, g.offX, g.offY, g.sourceW, g.sourceH), g.scale9grid && (g = g.scale9grid.split(","), a.scale9Grid = new egret.Rectangle(parseInt(g[0]), parseInt(g[1]), parseInt(g[2]), parseInt(g[3]))), null == f[d] && (f[d] = a, c && this.addSubkey(d, c));
  4755. return e
  4756. }, c.prototype.destroyRes = function(a) {
  4757. var c, b = this.fileDic[a];
  4758. if (b) {
  4759. delete this.fileDic[a];
  4760. for (c in b._textureMap) this.textureMap[c] && delete this.textureMap[c];
  4761. return !0
  4762. }
  4763. return !1
  4764. }, c
  4765. }(a.BinAnalyzer);
  4766. a.SheetAnalyzer = b, b.prototype.__class__ = "RES.SheetAnalyzer"
  4767. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4768. function c() {
  4769. this.constructor = a
  4770. }
  4771. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4772. c.prototype = b.prototype, a.prototype = new c
  4773. },
  4774. function(a) {
  4775. var b = function(a) {
  4776. function b() {
  4777. a.call(this)
  4778. }
  4779. return __extends(b, a), b.prototype.analyzeConfig = function(a, b) {
  4780. var c, d = a.name,
  4781. e = "";
  4782. try {
  4783. c = JSON.parse(b)
  4784. } catch (f) {}
  4785. return c ? e = this.getRelativePath(a.url, c.file) : (c = b, e = this.getTexturePath(a.url, c)), this.sheetMap[d] = c, e
  4786. }, b.prototype.analyzeBitmap = function(a, b) {
  4787. var d, c = a.name;
  4788. !this.fileDic[c] && b && (d = this.sheetMap[c], delete this.sheetMap[c], d = new egret.BitmapFont(b, d), this.fileDic[c] = d)
  4789. }, b.prototype.getTexturePath = function(a, b) {
  4790. var c = "",
  4791. d = b.split("\n")[2],
  4792. e = d.indexOf('file="');
  4793. return -1 != e && (d = d.substring(e + 6), e = d.indexOf('"'), c = d.substring(0, e)), a = a.split("\\").join("/"), e = a.lastIndexOf("/"), a = -1 != e ? a.substring(0, e + 1) + c : c
  4794. }, b.prototype.destroyRes = function(a) {
  4795. return this.fileDic[a] ? (delete this.fileDic[a], !0) : !1
  4796. }, b
  4797. }(a.SheetAnalyzer);
  4798. a.FontAnalyzer = b, b.prototype.__class__ = "RES.FontAnalyzer"
  4799. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4800. function c() {
  4801. this.constructor = a
  4802. }
  4803. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4804. c.prototype = b.prototype, a.prototype = new c
  4805. },
  4806. function(a) {
  4807. var b = function(a) {
  4808. function b() {
  4809. a.call(this), this._dataFormat = egret.URLLoaderDataFormat.SOUND
  4810. }
  4811. return __extends(b, a), b.prototype.analyzeData = function(a, b) {
  4812. var c = a.name;
  4813. !this.fileDic[c] && b && (this.fileDic[c] = b, b.preload((c = a.data) && c.soundType ? c.soundType : egret.Sound.EFFECT))
  4814. }, b
  4815. }(a.BinAnalyzer);
  4816. a.SoundAnalyzer = b, b.prototype.__class__ = "RES.SoundAnalyzer"
  4817. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4818. function c() {
  4819. this.constructor = a
  4820. }
  4821. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4822. c.prototype = b.prototype, a.prototype = new c
  4823. },
  4824. function(a) {
  4825. var b = function(a) {
  4826. function b() {
  4827. a.call(this), this._dataFormat = egret.URLLoaderDataFormat.TEXT
  4828. }
  4829. return __extends(b, a), b.prototype.analyzeData = function(a, b) {
  4830. var d, c = a.name;
  4831. if (!this.fileDic[c] && b) try {
  4832. d = egret.XML.parse(b), this.fileDic[c] = d
  4833. } catch (e) {}
  4834. }, b
  4835. }(a.BinAnalyzer);
  4836. a.XMLAnalyzer = b, b.prototype.__class__ = "RES.XMLAnalyzer"
  4837. }(RES || (RES = {})), __extends = this.__extends || function(a, b) {
  4838. function c() {
  4839. this.constructor = a
  4840. }
  4841. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  4842. c.prototype = b.prototype, a.prototype = new c
  4843. },
  4844. function(a) {
  4845. var b, c;
  4846. a.loadConfig = function(a, b, d) {
  4847. void 0 === b && (b = ""), void 0 === d && (d = "json"), c.loadConfig(a, b, d)
  4848. }, a.loadGroup = function(a, b) {
  4849. void 0 === b && (b = 0), c.loadGroup(a, b)
  4850. }, a.isGroupLoaded = function(a) {
  4851. return c.isGroupLoaded(a)
  4852. }, a.getGroupByName = function(a) {
  4853. return c.getGroupByName(a)
  4854. }, a.createGroup = function(a, b, d) {
  4855. return void 0 === d && (d = !1), c.createGroup(a, b, d)
  4856. }, a.hasRes = function(a) {
  4857. return c.hasRes(a)
  4858. }, a.parseConfig = function(a, b) {
  4859. void 0 === b && (b = ""), c.parseConfig(a, b)
  4860. }, a.getRes = function(a) {
  4861. return c.getRes(a)
  4862. }, a.getResAsync = function(a, b, d) {
  4863. c.getResAsync(a, b, d)
  4864. }, a.getResByUrl = function(a, b, d, e) {
  4865. void 0 === e && (e = ""), c.getResByUrl(a, b, d, e)
  4866. }, a.destroyRes = function(a) {
  4867. return c.destroyRes(a)
  4868. }, a.setMaxLoadingThread = function(a) {
  4869. c.setMaxLoadingThread(a)
  4870. }, a.addEventListener = function(a, b, d, e, f) {
  4871. void 0 === e && (e = !1), void 0 === f && (f = 0), c.addEventListener(a, b, d, e, f)
  4872. }, a.removeEventListener = function(a, b, d, e) {
  4873. void 0 === e && (e = !1), c.removeEventListener(a, b, d, e)
  4874. }, b = function(b) {
  4875. function c() {
  4876. b.call(this), this.analyzerDic = {}, this.configItemList = [], this.configComplete = this.callLaterFlag = !1, this.loadedGroups = [], this.groupNameList = [], this.asyncDic = {}, this.init()
  4877. }
  4878. return __extends(c, b), c.prototype.getAnalyzerByType = function(b) {
  4879. var c = this.analyzerDic[b];
  4880. return c || (c = this.analyzerDic[b] = egret.Injector.getInstance(a.AnalyzerBase, b)), c
  4881. }, c.prototype.init = function() {
  4882. egret.Injector.hasMapRule(a.AnalyzerBase, a.ResourceItem.TYPE_BIN) || egret.Injector.mapClass(a.AnalyzerBase, a.BinAnalyzer, a.ResourceItem.TYPE_BIN), egret.Injector.hasMapRule(a.AnalyzerBase, a.ResourceItem.TYPE_IMAGE) || egret.Injector.mapClass(a.AnalyzerBase, a.ImageAnalyzer, a.ResourceItem.TYPE_IMAGE), egret.Injector.hasMapRule(a.AnalyzerBase, a.ResourceItem.TYPE_TEXT) || egret.Injector.mapClass(a.AnalyzerBase, a.TextAnalyzer, a.ResourceItem.TYPE_TEXT), egret.Injector.hasMapRule(a.AnalyzerBase, a.ResourceItem.TYPE_JSON) || egret.Injector.mapClass(a.AnalyzerBase, a.JsonAnalyzer, a.ResourceItem.TYPE_JSON), egret.Injector.hasMapRule(a.AnalyzerBase, a.ResourceItem.TYPE_SHEET) || egret.Injector.mapClass(a.AnalyzerBase, a.SheetAnalyzer, a.ResourceItem.TYPE_SHEET), egret.Injector.hasMapRule(a.AnalyzerBase, a.ResourceItem.TYPE_FONT) || egret.Injector.mapClass(a.AnalyzerBase, a.FontAnalyzer, a.ResourceItem.TYPE_FONT), egret.Injector.hasMapRule(a.AnalyzerBase, a.ResourceItem.TYPE_SOUND) || egret.Injector.mapClass(a.AnalyzerBase, a.SoundAnalyzer, a.ResourceItem.TYPE_SOUND), egret.Injector.hasMapRule(a.AnalyzerBase, a.ResourceItem.TYPE_XML) || egret.Injector.mapClass(a.AnalyzerBase, a.XMLAnalyzer, a.ResourceItem.TYPE_XML), this.resConfig = new a.ResourceConfig, this.resLoader = new a.ResourceLoader, this.resLoader.callBack = this.onResourceItemComp, this.resLoader.resInstance = this, this.resLoader.addEventListener(a.ResourceEvent.GROUP_COMPLETE, this.onGroupComp, this), this.resLoader.addEventListener(a.ResourceEvent.GROUP_LOAD_ERROR, this.onGroupError, this)
  4883. }, c.prototype.loadConfig = function(a, b, c) {
  4884. void 0 === c && (c = "json"), this.configItemList.push({
  4885. url: a,
  4886. resourceRoot: b,
  4887. type: c
  4888. }), this.callLaterFlag || (egret.callLater(this.startLoadConfig, this), this.callLaterFlag = !0)
  4889. }, c.prototype.startLoadConfig = function() {
  4890. var b, d, e, f, g;
  4891. for (this.callLaterFlag = !1, b = this.configItemList, this.configItemList = [], this.loadingConfigList = b, d = b.length, e = [], f = 0; d > f; f++) g = b[f], g = new a.ResourceItem(g.url, g.url, g.type), e.push(g);
  4892. this.resLoader.loadGroup(e, c.GROUP_CONFIG, Number.MAX_VALUE)
  4893. }, c.prototype.isGroupLoaded = function(a) {
  4894. return -1 != this.loadedGroups.indexOf(a)
  4895. }, c.prototype.getGroupByName = function(a) {
  4896. return this.resConfig.getGroupByName(a)
  4897. }, c.prototype.loadGroup = function(b, c) {
  4898. if (void 0 === c && (c = 0), -1 != this.loadedGroups.indexOf(b)) a.ResourceEvent.dispatchResourceEvent(this, a.ResourceEvent.GROUP_COMPLETE, b);
  4899. else if (!this.resLoader.isGroupInLoading(b))
  4900. if (this.configComplete) {
  4901. var d = this.resConfig.getGroupByName(b);
  4902. this.resLoader.loadGroup(d, b, c)
  4903. } else this.groupNameList.push({
  4904. name: b,
  4905. priority: c
  4906. })
  4907. }, c.prototype.createGroup = function(a, b, c) {
  4908. if (void 0 === c && (c = !1), c) {
  4909. var d = this.loadedGroups.indexOf(a); - 1 != d && this.loadedGroups.splice(d, 1)
  4910. }
  4911. return this.resConfig.createGroup(a, b, c)
  4912. }, c.prototype.onGroupComp = function(b) {
  4913. var d, e, f, g;
  4914. if (b.groupName == c.GROUP_CONFIG) {
  4915. for (b = this.loadingConfigList.length, d = 0; b > d; d++) e = this.loadingConfigList[d], f = this.getAnalyzerByType(e.type), g = f.getRes(e.url), f.destroyRes(e.url), this.resConfig.parseConfig(g, e.resourceRoot);
  4916. this.configComplete = !0, this.loadingConfigList = null, a.ResourceEvent.dispatchResourceEvent(this, a.ResourceEvent.CONFIG_COMPLETE), this.loadDelayGroups()
  4917. } else this.loadedGroups.push(b.groupName), this.dispatchEvent(b)
  4918. }, c.prototype.loadDelayGroups = function() {
  4919. var b, c, d, a = this.groupNameList;
  4920. for (this.groupNameList = [], b = a.length, c = 0; b > c; c++) d = a[c], this.loadGroup(d.name, d.priority)
  4921. }, c.prototype.onGroupError = function(b) {
  4922. b.groupName == c.GROUP_CONFIG ? (this.loadingConfigList = null, a.ResourceEvent.dispatchResourceEvent(this, a.ResourceEvent.CONFIG_LOAD_ERROR)) : this.dispatchEvent(b)
  4923. }, c.prototype.hasRes = function(b) {
  4924. var c = this.resConfig.getType(b);
  4925. return "" == c && (b = a.AnalyzerBase.getStringPrefix(b), c = this.resConfig.getType(b), "" == c) ? !1 : !0
  4926. }, c.prototype.parseConfig = function(a, b) {
  4927. this.resConfig.parseConfig(a, b), this.configComplete || this.loadingConfigList || (this.configComplete = !0, this.loadDelayGroups())
  4928. }, c.prototype.getRes = function(b) {
  4929. var c = this.resConfig.getType(b);
  4930. return "" == c && (c = a.AnalyzerBase.getStringPrefix(b), c = this.resConfig.getType(c), "" == c) ? null : this.getAnalyzerByType(c).getRes(b)
  4931. }, c.prototype.getResAsync = function(b, c, d) {
  4932. var e = this.resConfig.getType(b),
  4933. f = this.resConfig.getName(b);
  4934. return "" == e && (f = a.AnalyzerBase.getStringPrefix(b), e = this.resConfig.getType(f), "" == e) ? void c.call(d, null) : void((e = this.getAnalyzerByType(e).getRes(b)) ? c.call(d, e) : (b = {
  4935. key: b,
  4936. compFunc: c,
  4937. thisObject: d
  4938. }, this.asyncDic[f] ? this.asyncDic[f].push(b) : (this.asyncDic[f] = [b], f = this.resConfig.getResourceItem(f), this.resLoader.loadItem(f))))
  4939. }, c.prototype.getResByUrl = function(b, c, d, e) {
  4940. if (void 0 === e && (e = ""), b) {
  4941. e || (e = this.getTypeByUrl(b));
  4942. var f = this.getAnalyzerByType(e).getRes(b);
  4943. f ? c.call(d, f) : (c = {
  4944. key: b,
  4945. compFunc: c,
  4946. thisObject: d
  4947. }, this.asyncDic[b] ? this.asyncDic[b].push(c) : (this.asyncDic[b] = [c], b = new a.ResourceItem(b, b, e), this.resLoader.loadItem(b)))
  4948. } else c.call(d, null)
  4949. }, c.prototype.getTypeByUrl = function(b) {
  4950. switch ((b = b.substr(b.lastIndexOf(".") + 1)) && (b = b.toLowerCase()), b) {
  4951. case a.ResourceItem.TYPE_XML:
  4952. case a.ResourceItem.TYPE_JSON:
  4953. case a.ResourceItem.TYPE_SHEET:
  4954. break;
  4955. case "png":
  4956. case "jpg":
  4957. case "gif":
  4958. case "jpeg":
  4959. case "bmp":
  4960. b = a.ResourceItem.TYPE_IMAGE;
  4961. break;
  4962. case "fnt":
  4963. b = a.ResourceItem.TYPE_FONT;
  4964. break;
  4965. case "txt":
  4966. b = a.ResourceItem.TYPE_TEXT;
  4967. break;
  4968. case "mp3":
  4969. case "ogg":
  4970. case "mpeg":
  4971. case "wav":
  4972. case "m4a":
  4973. case "mp4":
  4974. case "aiff":
  4975. case "wma":
  4976. case "mid":
  4977. b = a.ResourceItem.TYPE_SOUND;
  4978. break;
  4979. default:
  4980. b = a.ResourceItem.TYPE_BIN
  4981. }
  4982. return b
  4983. }, c.prototype.onResourceItemComp = function(a) {
  4984. var c, d, e, f, b = this.asyncDic[a.name];
  4985. for (delete this.asyncDic[a.name], a = this.getAnalyzerByType(a.type), c = b.length, d = 0; c > d; d++) e = b[d], f = a.getRes(e.key), e.compFunc.call(e.thisObject, f, e.key)
  4986. }, c.prototype.destroyRes = function(a) {
  4987. var c, d, e, b = this.resConfig.getRawGroupByName(a);
  4988. if (b) {
  4989. for (c = this.loadedGroups.indexOf(a), -1 != c && this.loadedGroups.splice(c, 1), a = b.length, d = 0; a > d; d++) c = b[d], c.loaded = !1, e = this.getAnalyzerByType(c.type), e.destroyRes(c.name);
  4990. return !0
  4991. }
  4992. return b = this.resConfig.getType(a), "" == b ? !1 : (c = this.resConfig.getRawResourceItem(a), c.loaded = !1, e = this.getAnalyzerByType(b), e.destroyRes(a))
  4993. }, c.prototype.setMaxLoadingThread = function(a) {
  4994. 1 > a && (a = 1), this.resLoader.thread = a
  4995. }, c.GROUP_CONFIG = "RES__CONFIG", c
  4996. }(egret.EventDispatcher), b.prototype.__class__ = "RES.Resource", c = new b
  4997. }(RES || (RES = {})), ! function(a) {
  4998. a = a.Data || (a.Data = {}), a.GameMain, a.StageWidth, a.StageHeight, a.DesginWidth, a.DesginHeight
  4999. }(Fw || (Fw = {})),
  5000. function(a) {
  5001. ! function(a) {
  5002. a.createBitmap = function(a, b, c) {
  5003. return void 0 === c && (c = !1), a = new egret.Bitmap, a.texture = RES.getRes(b), a.name = b, a.touchEnabled = c, a
  5004. }, a.drawRectangular = function(a, b, c, d, e, f, g, h, i, j, k) {
  5005. return void 0 === i && (i = null), void 0 === j && (j = null), void 0 === k && (k = null), a = new egret.Shape, a.graphics.beginFill(f, g), h ? a.graphics.drawRoundRect(b, c, d, e, h, h) : a.graphics.drawRect(b, c, d, e), i && a.graphics.lineStyle(j, i, k), a.graphics.endFill(), a
  5006. }, a.drawCircle = function(a, b, c, d, e, f, g, h, i) {
  5007. return void 0 === g && (g = null), void 0 === h && (h = null), void 0 === i && (i = null), a = new egret.Shape, a.graphics.beginFill(e, f), a.graphics.drawCircle(b, c, d), g && a.graphics.lineStyle(h, g, i), a.graphics.endFill(), a
  5008. }, a.FPS_SHOW = function() {
  5009. egret.Profiler.getInstance().run()
  5010. }, a.Drive = function() {
  5011. for (var a = navigator.userAgent.toString(), b = "PC", c = "Android;iPhone;SymbianOS;Windows Phone;iPad;iPod".split(";"), d = !0, e = 0; e < c.length; e++)
  5012. if (0 < a.indexOf(c[e])) {
  5013. d = !1, b = c[e];
  5014. break
  5015. }
  5016. return c = !1, "MicroMessenger" == a.match(/MicroMessenger/i) && (c = !0), {
  5017. isPC: d,
  5018. isWX: c,
  5019. DeviceType: b
  5020. }
  5021. }, a.createSound = function(a, b) {
  5022. return new egret.Sound, a = RES.getRes(b)
  5023. }, a.createTextLabel = function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
  5024. return void 0 === b && (b = 0), void 0 === c && (c = "left"), void 0 === d && (d = "none"), void 0 === e && (e = 14), void 0 === f && (f = 0), void 0 === g && (g = 0), void 0 === h && (h = 0), void 0 === i && (i = 0), void 0 === j && (j = 0), void 0 === k && (k = 0), void 0 === l && (l = 0), void 0 === m && (m = 0), a = new egret.TextField, a.textColor = b, a.textAlign = c, a.text = d, a.size = e, 0 != f && (a.width = f), 0 != g && (a.height = g), 0 != h && 0 != i && (a.strokeColor = h, a.stroke = i), a.rotation = l, 0 != m && (a.skewX = m), a.x = j, a.y = k, a
  5025. }, a.GET = function(a) {
  5026. return a = new RegExp("(^|&)" + a + "=([^&]*)(&|$)", "i"), a = location.search.substr(1).match(a), null != a ? decodeURI(decodeURIComponent(decodeURI(a[2]))) : null
  5027. }, a.localStorage = function(a, b, c) {
  5028. switch (void 0 === b && (b = "StorageInit"), void 0 === c && (c = ""), a) {
  5029. case "read":
  5030. return egret.localStorage.getItem(b);
  5031. case "write":
  5032. return egret.localStorage.setItem(b, c), !0;
  5033. case "delete":
  5034. return egret.localStorage.removeItem(b), !0;
  5035. case "clear":
  5036. return egret.localStorage.clear(), !0;
  5037. default:
  5038. return !1
  5039. }
  5040. }, a.getbodybackground = function() {
  5041. return document.body.style.background
  5042. }, a.setbodybackground = function(a) {
  5043. document.body.style.background = a
  5044. }, a.URLEncode = function(a) {
  5045. var d, e, b = "",
  5046. c = 0;
  5047. for (a = a.toString(), d = /(^[a-zA-Z0-9-_.]*)/; c < a.length;) e = d.exec(a.substr(c)), null != e && 1 < e.length && "" != e[1] ? (b += e[1], c += e[1].length) : (" " == a.substr(c, 1) ? b += "+" : (e = a.charCodeAt(c).toString(16), b += "%" + (2 > e.length ? "0" : "") + e.toUpperCase()), c++);
  5048. return b
  5049. }
  5050. }(a.tools || (a.tools = {}))
  5051. }(Fw || (Fw = {})),
  5052. function(a) {
  5053. ! function(b) {
  5054. b.StageAlign = function(b, c) {
  5055. var d = b.anchorX,
  5056. e = b.anchorY,
  5057. f = Math.abs(b.scaleX),
  5058. g = b.scaleY,
  5059. h = c.offsetX ? c.offsetX : 0,
  5060. i = c.offsetY ? c.offsetY : 0;
  5061. c.left && (b.x = b.width * d + h), c.right && (b.x = a.Data.StageWidth - b.width + b.width * d * f + b.width * (1 - f) + h), c.top && (b.y = b.height * e + i), c.bottom && (b.y = a.Data.StageHeight - b.height + b.height * (1 - g) + b.height * g * e + i), c.centerX && (b.x = (a.Data.StageWidth - b.width) / 2 + b.width * (1 - f) / 2 + b.width * f * d + h), c.centerY && (b.y = (a.Data.StageHeight - b.height) / 2 + b.height * (1 - g) / 2 + b.height * g * e + i)
  5062. }, b.RelativeAlign = function(a, b, c) {
  5063. var d = a.x - a.width * Math.abs(a.scaleX) * a.anchorX,
  5064. e = a.y - a.height * Math.abs(a.scaleY) * a.anchorY,
  5065. f = b.anchorX,
  5066. g = b.anchorY,
  5067. h = Math.abs(b.scaleX),
  5068. i = b.scaleY,
  5069. j = c.offsetX ? c.offsetX : 0,
  5070. k = c.offsetY ? c.offsetY : 0;
  5071. c.left && (b.x = d + b.width * f + j), c.right && (b.x = d + a.width - b.width + b.width * f * h + b.width * (1 - h) + j), c.top && (b.y = e + b.height * b.scaleY * g + k), c.bottom && (b.y = e + a.height - b.height * b.scaleY + b.height * b.scaleY * b.anchorY), c.centerX && (b.x = d + (a.width * Math.abs(h) - Math.abs(b.width * b.scaleX)) / 2 + b.width * b.scaleX * b.anchorX), c.centerY && (b.y = e + (a.height * Math.abs(i) - Math.abs(b.height * b.scaleY)) / 2 + b.height * b.scaleY * b.anchorY)
  5072. }, b.percent_Y = function(b) {
  5073. return b / a.Data.DesginHeight * a.Data.StageHeight
  5074. }, b.percent_X = function(b) {
  5075. return b / a.Data.DesginWidth * a.Data.StageWidth
  5076. }, b.Scale = function() {
  5077. var b = 0,
  5078. b = a.Data.StageHeight / a.Data.DesginHeight;
  5079. return 1 >= b ? b : 1
  5080. }, b.setScale = function(b, c, d) {
  5081. void 0 === c && (c = a.L_Positioning.Scale()), void 0 === d && (d = a.L_Positioning.Scale()), b.scaleX = c, b.scaleY = d
  5082. }
  5083. }(a.L_Positioning || (a.L_Positioning = {}))
  5084. }(Fw || (Fw = {})), GameData = function() {
  5085. function a() {}
  5086. return a.getNeed = function(a) {
  5087. return 6 > a ? 19 : a > 5 && 12 > a ? 59 : a >= 12 && 17 > a ? 102 : a >= 17 && 20 >= a ? 122 : a > 20 && 25 > a ? 161 : 206
  5088. }, a.save = function() {
  5089. Fw.tools.localStorage("write", "a0c4d2a2c12CDC0ZZAF2SDFFglod", a.glod.toString()), Fw.tools.localStorage("write", "a0c4d2a2c12CDC0ZZAF2SDFFscore", a.score.toString()), Fw.tools.localStorage("write", "a0c4d2a2c12CDC0ZZAF2SDFFlevelLock", a.levelLock.toString())
  5090. }, a.read = function() {
  5091. var c, b = Fw.tools.localStorage("read", "a0c4d2a2c12CDC0ZZAF2SDFFglod");
  5092. if (null != b && (a.glod = Number(b)), b = Fw.tools.localStorage("read", "a0c4d2a2c12CDC0ZZAF2SDFFscore"), null != b && (a.score = Number(b)), b = Fw.tools.localStorage("read", "a0c4d2a2c12CDC0ZZAF2SDFFlevelLock"), null != b)
  5093. for (b = b.split(","), c = 0; c < b.length; c++) a.levelLock[c] = Number(b[c])
  5094. }, a.resultRotation = function(a) {
  5095. 360 < a.rotation ? a.rotation -= 360 : 0 > a.rotation && (a.rotation = 360 + a.rotation)
  5096. }, a.setRotation = function(a) {
  5097. return a > 360 ? a -= 360 : 0 > a && (a = 360 + a), a
  5098. }, a.RotationChange = function(a, b, c) {
  5099. var e, d = [];
  5100. for (console.log(a, b), a = this.setRotation(a), b = this.setRotation(b), 0 > b - c ? (e = b - c, d.push(new egret.Point(360 + e, 360)), d.push(new egret.Point(0, c + e))) : d.push(new egret.Point(b - c, b)), b + c > 360 ? (b = b + c - 360, d.push(new egret.Point(360 - b, 360)), d.push(new egret.Point(0, c - b))) : d.push(new egret.Point(b, b + c)), c = 0; c < d.length; c++)
  5101. if (a >= d[c].x && a <= d[c].y) return !0;
  5102. return !1
  5103. }, a.language = ["Use", "Skip level", "You need more diamonds", "Get them for free"], a.levelLock = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], a.isSound = !0, a.moregamesUrl = "", a.glod = 0, a.score = 0, a.yY = 180, a.addGlod = 10, a
  5104. }(), GameData.prototype.__class__ = "GameData", __extends = this.__extends || function(a, b) {
  5105. function c() {
  5106. this.constructor = a
  5107. }
  5108. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5109. c.prototype = b.prototype, a.prototype = new c
  5110. }, Drag = function(a) {
  5111. function b() {
  5112. a.call(this), this.offsetY = this.offsetX = 0, this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this)
  5113. }
  5114. return __extends(b, a), b.prototype.onAddToStage = function() {}, b.prototype.start = function(a, b, c) {
  5115. void 0 === b && (b = 0), void 0 === c && (c = 0), this.offsetX = b, this.offsetY = c, this.dragObject = a, this.dragObject.touchEnabled = !0, this.dragObject.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.stage.addEventListener(egret.TouchEvent.TOUCH_END, this.onTouchEend, this)
  5116. }, b.prototype.onTouchEend = function() {
  5117. this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE, this.onTouchMove, this)
  5118. }, b.prototype.onTouchBegin = function() {
  5119. this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE, this.onTouchMove, this)
  5120. }, b.prototype.onTouchMove = function(a) {
  5121. this.dragObject ? (this.dragObject.x = a.stageX - this.dragObject.width * this.dragObject.scaleX / 2 - this.dragObject.anchorX * this.dragObject.width * this.dragObject.scaleX + this.offsetX, this.dragObject.y = a.stageY - this.dragObject.height * this.dragObject.scaleY / 2 + this.dragObject.anchorY * this.dragObject.height * this.dragObject.scaleY + this.offsetY) : this.stop()
  5122. }, b.prototype.stop = function() {
  5123. this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE, this.onTouchMove, this), this.stage.removeEventListener(egret.TouchEvent.TOUCH_END, this.onTouchEend, this), this.dragObject.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this)
  5124. }, b
  5125. }(egret.Sprite), Drag.prototype.__class__ = "Drag", __extends = this.__extends || function(a, b) {
  5126. function c() {
  5127. this.constructor = a
  5128. }
  5129. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5130. c.prototype = b.prototype, a.prototype = new c
  5131. }, L_StateButton = function(a) {
  5132. function b(b) {
  5133. var c, d;
  5134. for (a.call(this), this.list = [], c = this.currentState = 0; c < b.length; c++) d = Fw.tools.createBitmap(d, b[c]), this.addChild(d), d.visible = !1, this.list.push(d);
  5135. this.list[0].visible = !0
  5136. }
  5137. return __extends(b, a), Object.defineProperty(b.prototype, "changeState", {
  5138. get: function() {
  5139. return this.currentState
  5140. },
  5141. set: function(a) {
  5142. this.change(a)
  5143. },
  5144. enumerable: !0,
  5145. configurable: !0
  5146. }), b.prototype.change = function(a) {
  5147. for (var b = 0; b < this.list.length; b++) this.list[b].visible = a == b ? !0 : !1;
  5148. this.currentState = a
  5149. }, b
  5150. }(egret.Sprite), L_StateButton.prototype.__class__ = "L_StateButton", __extends = this.__extends || function(a, b) {
  5151. function c() {
  5152. this.constructor = a
  5153. }
  5154. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5155. c.prototype = b.prototype, a.prototype = new c
  5156. }, glodAnimation = function(a) {
  5157. function b() {
  5158. a.call(this), this.ViewFx = Fw.tools.createBitmap(this.ViewFx, "ViewFx"), this.addChild(this.ViewFx);
  5159. var b;
  5160. b = Fw.tools.createBitmap(b, "glod"), this.addChild(b), Fw.L_Positioning.RelativeAlign(this.ViewFx, b, {
  5161. centerX: !0,
  5162. centerY: !0
  5163. })
  5164. }
  5165. return __extends(b, a), b
  5166. }(egret.Sprite), glodAnimation.prototype.__class__ = "glodAnimation", __extends = this.__extends || function(a, b) {
  5167. function c() {
  5168. this.constructor = a
  5169. }
  5170. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5171. c.prototype = b.prototype, a.prototype = new c
  5172. }, levellistbar = function(a) {
  5173. function b(b, c) {
  5174. a.call(this), this.state = 0, this.txtColor = [6061713, 9646763, 13867010], this.touchEnabled = !0, this.name = "levelBox_" + c.toString(), this.state = b, this.bg = Fw.tools.createBitmap(this.bg, "icon_" + b.toString()), this.addChild(this.bg), this.txt = Fw.tools.createTextLabel(this.txt, this.txtColor[this.state], "center", c.toString(), 40, this.bg.width), this.addChild(this.txt), Fw.L_Positioning.RelativeAlign(this.bg, this.txt, {
  5175. centerX: !0,
  5176. centerY: !0,
  5177. offsetX: -4
  5178. })
  5179. }
  5180. return __extends(b, a), b.prototype.change = function(a) {
  5181. this.removeChild(this.bg), this.state = a, this.bg = Fw.tools.createBitmap(this.bg, "icon_" + a.toString()), this.addChild(this.bg), this.addChildAt(this.txt, this.numChildren - 1), this.txt.textColor = this.txtColor[this.state]
  5182. }, b
  5183. }(egret.Sprite), levellistbar.prototype.__class__ = "levellistbar", __extends = this.__extends || function(a, b) {
  5184. function c() {
  5185. this.constructor = a
  5186. }
  5187. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5188. c.prototype = b.prototype, a.prototype = new c
  5189. }, Game = function(a) {
  5190. function b() {
  5191. a.call(this), this.currentLvel = -1, this.endNum = 0, this.levelContainer = [null, new level_1, new level_2, new level_7, new level_8, new level_3, new level_9, new level_10, new level_4, new level_13, new level_14, new level_19, new level_5, new level_20, new level_15, new level_16, new level_21, new level_22, new level_6, new level_11, new level_18, new level_12, new level_23, new level_24, new level_25, new level_26, new level_17, new level_27, new level_28, new level_29, new level_30], b._This = this, this.out = new outlevel, this.getad = new getAd, this.getend = new getEnd, this.getad.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onGetAD, this), this.out.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onOutTap, this), this.getend.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onEndTap, this), b.GameEnterFrame.addEventListener(egret.TimerEvent.TIMER, this.onGameEnterFrame, this)
  5192. }
  5193. return __extends(b, a), b.prototype.start = function(a) {
  5194. SG_Hooks.start(), this.currentLvel = a, this.addChild(this.levelContainer[this.currentLvel]), this.levelContainer[this.currentLvel].start(), this.levelContainer[this.currentLvel].addEventListener("gamewin", this.gamewin, this), this.levelContainer[this.currentLvel].addEventListener("gamelose", this.gamelose, this)
  5195. }, b.prototype.gamewin = function(a) {
  5196. UI._This.addChild(UI._This.bg), UI._This.addChild(UI._This.vwin), UI._This.vwin.add(), a = 0, 1 == GameData.levelLock[this.currentLvel - 1] && (a = this.levelContainer[this.currentLvel].cNum + 1), GameData.levelLock[this.currentLvel - 1] = 2, 0 == GameData.levelLock[this.currentLvel] && (GameData.levelLock[this.currentLvel] = 1), UI._This.vwin.glodTxt.text = "+" + a.toString(), GameData.glod += a, console.log(a), console.log("当前关数:" + this.currentLvel + ",本关获得:" + a + ",当前金币共:" + GameData.glod), this.endNum = 0, UI._This.TopBar.change(), GameData.save()/*, updateShare(this.currentLvel, GameData.glod)*///, Play68.setRankingLevelScoreDesc(this.currentLvel, GameData.glod)
  5197. }, b.prototype.gamelose = function(a) {
  5198. if (void 0 === a && (a = null), 5 <= this.endNum && 0 == GameData.levelLock[this.currentLvel] && SG_Hooks.isEnabledIncentiviseButton()) {
  5199. this.endNum = 0;
  5200. var c;
  5201. c = Fw.tools.drawRectangular(c, 0, 0, Fw.Data.StageWidth, Fw.Data.StageHeight, 16777215, 0), c.alpha = .5, c.touchEnabled = !0, this.stage.addChild(c), egret.Tween.get(c).to({
  5202. alpha: 0
  5203. }, 1e3).call(function() {
  5204. b._This.stage.addChild(b._This.out), b._This.out.anchorX = b._This.out.anchorY = .5, Fw.L_Positioning.StageAlign(b._This.out, {
  5205. centerX: !0,
  5206. centerY: !0
  5207. }), b._This.out.scaleX = b._This.out.scaleY = .5, b._This.out.alpha = 0;
  5208. var a = GameData.getNeed(b._This.currentLvel);
  5209. b._This.out.init(GameData.language[0], "X" + a.toString(), GameData.language[1]), egret.Tween.get(b._This.out).to({
  5210. scaleX: 1,
  5211. scaleY: 1,
  5212. alpha: 1
  5213. }, 150), b._This.stage.removeChild(c)
  5214. })
  5215. } else this.endNum += 1, UI._This.addChild(UI._This.bg), UI._This.addChild(UI._This.vlose), UI._This.vlose.add()
  5216. }, b.prototype.onOutTap = function(a) {
  5217. var c, d, e;
  5218. UI._This.isStop || ("toOutLevel_yes" == a.target.name ? GameData.glod >= GameData.getNeed(this.currentLvel) ? (GameData.glod -= GameData.getNeed(this.currentLvel), GameData.save(), UI._This.TopBar.change(), this.stage.removeChild(this.out), 30 > this.currentLvel ? (c = Fw.tools.createBitmap(c, "outlevelbar"), this.addChild(c), Fw.L_Positioning.StageAlign(c, {
  5219. centerX: !0,
  5220. centerY: !0,
  5221. offsetY: -50
  5222. }), d = Fw.tools.createTextLabel(d, 16777215, "center", (this.currentLvel + 1).toString(), 36, 80), this.addChild(d), d.x = 435, Fw.L_Positioning.RelativeAlign(c, d, {
  5223. centerY: !0
  5224. }), e = Fw.tools.createBitmap(e, "nextLevelBtn"), e.scaleX = e.scaleY = .8, this.addChild(e), e.x = 122, e.y = c.y + 22, egret.Tween.get(e).to({
  5225. x: 340
  5226. }, 1e3).call(function() {
  5227. b._This.removeChild(c), b._This.removeChild(d), b._This.removeChild(e), GameData.levelLock[b._This.currentLvel] = 1, b._This.nextLevel(), GameData.save()
  5228. })) : UI._This.endlevel()) : (this.stage.addChild(this.getad), this.getad.init(GameData.language[2] + ",\n" + GameData.language[3]), this.getad.anchorX = this.getad.anchorY = .5, Fw.L_Positioning.StageAlign(this.getad, {
  5229. centerX: !0,
  5230. centerY: !0
  5231. }), this.getad.scaleX = this.getad.scaleY = .5, this.getad.alpha = 0, egret.Tween.get(this.getad).to({
  5232. scaleX: 1,
  5233. scaleY: 1,
  5234. alpha: 1
  5235. }, 150)) : "toOutLevel_no" == a.target.name && (this.stage.removeChild(this.out), this.gamelose(null)))
  5236. }, b.prototype.onGetAD = function(a) {
  5237. "getAd_yes" == a.target.name ? SG_Hooks.triggerIncentivise(b.LookAdEnd) : "getAd_no" == a.target.name && this.stage.removeChild(this.getad)
  5238. }, b.LookAdEnd = function() {
  5239. b._This.stage.addChild(b._This.getend), egret.Tween.get(b._This.getend).to({
  5240. scaleX: 1,
  5241. scaleY: 1,
  5242. alpha: 1
  5243. }, 150), b._This.getend.anchorX = b._This.getend.anchorY = .5, Fw.L_Positioning.StageAlign(b._This.getend, {
  5244. centerX: !0,
  5245. centerY: !0
  5246. }), b._This.getend.init("+" + GameData.addGlod.toString())
  5247. }, b.prototype.onEndTap = function() {
  5248. var a, c = new glodAnimation;
  5249. a = Fw.tools.drawRectangular(a, 0, 0, Fw.Data.StageWidth, Fw.Data.StageHeight, 0, .5), a.touchEnabled = !0, b._This.stage.addChild(a), b._This.stage.addChild(c), c.anchorX = c.anchorY = .5, Fw.L_Positioning.StageAlign(c, {
  5250. centerX: !0,
  5251. centerY: !0
  5252. }), egret.Tween.get(c).to({
  5253. y: 60,
  5254. x: 150
  5255. }, 2e3).call(function() {
  5256. GameData.glod += GameData.addGlod, UI._This.TopBar.change(), b._This.getend.alpha = 0, GameData.save(), b._This.stage.removeChild(a), b._This.stage.removeChild(c), b._This.stage.removeChild(b._This.getend), b._This.stage.removeChild(b._This.getad)
  5257. })
  5258. }, b.prototype.remove = function() {
  5259. this.removeChild(this.levelContainer[this.currentLvel])
  5260. }, b.prototype.stop = function() {
  5261. this.levelContainer[this.currentLvel].stop()
  5262. }, b.prototype.next = function() {
  5263. this.levelContainer[this.currentLvel].next()
  5264. }, b.prototype.nextLevel = function() {
  5265. this.removeChild(this.levelContainer[this.currentLvel]), this.currentLvel += 1, UI._This.TopBar.levelTxt.text = this.currentLvel.toString(), this.start(this.currentLvel)
  5266. }, b.prototype.rstart = function() {
  5267. this.start(this.currentLvel)
  5268. }, b.prototype.onGameEnterFrame = function() {
  5269. UI._This.isStop || this.levelContainer[this.currentLvel].enterFrame()
  5270. }, b.GameEnterFrame = new egret.Timer(1e3 / 60), b
  5271. }(egret.Sprite), Game.prototype.__class__ = "Game", __extends = this.__extends || function(a, b) {
  5272. function c() {
  5273. this.constructor = a
  5274. }
  5275. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5276. c.prototype = b.prototype, a.prototype = new c
  5277. }, GameBGView = function(a) {
  5278. function b(b) {
  5279. var c, d;
  5280. switch (void 0 === b && (b = 1), a.call(this), this.currentNum = 0, this.list = [], c = Fw.tools.createBitmap(c, "gamecontainer"), this.addChild(c), this.currentNum = b, b) {
  5281. case 1:
  5282. d = Fw.tools.createBitmap(d, "numPoint"), this.addChild(d), Fw.L_Positioning.RelativeAlign(c, d, {
  5283. centerX: !0
  5284. }), d.y = 295, this.list.push(d);
  5285. break;
  5286. case 2:
  5287. d = Fw.tools.createBitmap(d, "numPoint"), this.addChild(d), Fw.L_Positioning.RelativeAlign(c, d, {
  5288. centerX: !0
  5289. }), d.x -= d.width, d.y = 295, this.list.push(d), d = Fw.tools.createBitmap(d, "numPoint"), this.addChild(d), Fw.L_Positioning.RelativeAlign(c, d, {
  5290. centerX: !0
  5291. }), d.x += d.width, d.y = 295, this.list.push(d);
  5292. break;
  5293. case 3:
  5294. for (b = 0; 3 > b; b++) d = Fw.tools.createBitmap(d, "numPoint"), this.addChild(d), this.list.push(d), d.y = 295;
  5295. Fw.L_Positioning.RelativeAlign(c, this.list[1], {
  5296. centerX: !0
  5297. }), this.list[0].x = this.list[1].x - this.list[1].width, this.list[2].x = this.list[1].x + this.list[1].width;
  5298. break;
  5299. case 4:
  5300. for (b = 0; 4 > b; b++) d = Fw.tools.createBitmap(d, "numPoint"), this.addChild(d), d.y = 295, d.x = 70 + 45 * b, this.list.push(d)
  5301. }
  5302. }
  5303. return __extends(b, a), b.prototype.init = function() {
  5304. for (var a = 0; a < this.list.length; a++) this.list[a].visible = !0;
  5305. this.currentNum = this.list.length
  5306. }, b.prototype.remove = function() {
  5307. return 0 < this.currentNum - 1 ? (this.list[this.currentNum - 1].visible = !1, this.currentNum -= 1, !0) : this.list[0].visible = !1
  5308. }, b
  5309. }(egret.Sprite), GameBGView.prototype.__class__ = "GameBGView", Methods = function() {
  5310. function a() {}
  5311. return a.init = function(b) {
  5312. a.stage = b, a.drag = new Drag, b.addChild(a.drag)
  5313. }, a
  5314. }(), Methods.prototype.__class__ = "Methods", __extends = this.__extends || function(a, b) {
  5315. function c() {
  5316. this.constructor = a
  5317. }
  5318. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5319. c.prototype = b.prototype, a.prototype = new c
  5320. }, getAd = function(a) {
  5321. function b() {
  5322. var b, c, d, e, f;
  5323. a.call(this), this.textColor = 12040887, b = Fw.tools.createBitmap(b, "bg", !0), b.touchEnabled = !0, b.alpha = 0, this.addChild(b), c = Fw.tools.createBitmap(c, "cloud"), Fw.L_Positioning.StageAlign(c, {
  5324. centerX: !0
  5325. }), c.y = 330, this.addChild(c), d = Fw.tools.createBitmap(d, "movie"), this.addChild(d), d.x = 160, d.y = c.y + 55, this.txt = Fw.tools.createTextLabel(this.txt, this.textColor, "center", "需要更多钻石,\n免费获取?", 24, 212, 120), this.addChild(this.txt), this.txt.x = 220, this.txt.y = c.y + 41, e = Fw.tools.createBitmap(e, "yes", !0), e.name = "getAd_yes", this.addChild(e), e.x = 200, e.y = 480, e.touchEnabled = !0, f = Fw.tools.createBitmap(f, "no", !0), f.name = "getAd_no", this.addChild(f), f.touchEnabled = !0, f.x = 380, f.y = 480
  5326. }
  5327. return __extends(b, a), b.prototype.init = function(a) {
  5328. this.txt.text = a
  5329. }, b
  5330. }(egret.Sprite), getAd.prototype.__class__ = "getAd", __extends = this.__extends || function(a, b) {
  5331. function c() {
  5332. this.constructor = a
  5333. }
  5334. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5335. c.prototype = b.prototype, a.prototype = new c
  5336. }, getEnd = function(a) {
  5337. function b() {
  5338. var b, c, d, e, f;
  5339. a.call(this), this.textColor = 16736513, b = Fw.tools.createBitmap(b, "bg", !0), b.touchEnabled = !0, b.alpha = 0, this.addChild(b), c = Fw.tools.createBitmap(c, "cloud"), Fw.L_Positioning.StageAlign(c, {
  5340. centerX: !0
  5341. }), c.y = 330, this.addChild(c), d = Fw.tools.createBitmap(d, "ViewFx"), this.addChild(d), d.x = 160, d.y = c.y + 10, e = Fw.tools.createBitmap(e, "glod"), Fw.L_Positioning.RelativeAlign(d, e, {
  5342. centerX: !0,
  5343. centerY: !0
  5344. }), this.addChild(e), this.txt = Fw.tools.createTextLabel(this.txt, this.textColor, "left", "+10", 60, 120, 60), this.addChild(this.txt), this.txt.x = 290, this.txt.y = c.y + 56, f = Fw.tools.createBitmap(f, "yes", !0), f.name = "getEnd_yes", this.addChild(f), Fw.L_Positioning.RelativeAlign(c, f, {
  5345. centerX: !0
  5346. }), f.y = 480
  5347. }
  5348. return __extends(b, a), b.prototype.init = function(a) {
  5349. this.txt.text = a
  5350. }, b
  5351. }(egret.Sprite), getEnd.prototype.__class__ = "getEnd", __extends = this.__extends || function(a, b) {
  5352. function c() {
  5353. this.constructor = a
  5354. }
  5355. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5356. c.prototype = b.prototype, a.prototype = new c
  5357. }, overPlan = function(a) {
  5358. function b() {
  5359. var b, c, d;
  5360. a.call(this), this.p = new egret.Sprite, b = Fw.tools.createBitmap(b, "overPlan"), this.p.addChild(b), c = Fw.tools.createBitmap(c, "levelMenuBtn", !0), c.name = "levelMenuBtn_lose", this.p.addChild(c), c.x = 145, c.y = 160, d = Fw.tools.createBitmap(d, "RstartBtn", !0), this.p.addChild(d), d.name = "RstartBtn_lose", d.x = 285, d.y = 160
  5361. }
  5362. return __extends(b, a), b.prototype.add = function() {
  5363. this.addChild(this.p), Fw.L_Positioning.StageAlign(this.p, {
  5364. centerX: !0
  5365. }), this.p.y = -this.p.height, egret.Tween.get(this.p).wait(1e3).to({
  5366. y: 250
  5367. }, 200)
  5368. }, b.prototype.remove = function(a) {
  5369. var b = this;
  5370. egret.Tween.get(this.p).to({
  5371. y: -b.p.height
  5372. }, 200).call(function() {
  5373. b.removeChild(b.p), a()
  5374. })
  5375. }, b
  5376. }(egret.Sprite), overPlan.prototype.__class__ = "overPlan", __extends = this.__extends || function(a, b) {
  5377. function c() {
  5378. this.constructor = a
  5379. }
  5380. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5381. c.prototype = b.prototype, a.prototype = new c
  5382. }, stopPlan = function(a) {
  5383. function b() {
  5384. var b, c, d, e;
  5385. a.call(this), this.p = new egret.Sprite, b = Fw.tools.createBitmap(b, "stopPlan"), this.p.addChild(b), c = Fw.tools.createBitmap(c, "NextBtn", !0), this.p.addChild(c), c.y = 35, c.x = 142, d = Fw.tools.createBitmap(d, "RstartBtn", !0), this.p.addChild(d), d.x = 248, d.y = 35, e = Fw.tools.createBitmap(e, "levelMenuBtn", !0), this.p.addChild(e), e.x = 34, e.y = 35, this.soundBtn = new L_StateButton(["soundPlay", "soundStop"]), this.soundBtn.touchEnabled = !0, this.soundBtn.name = "soundbtn", this.p.addChild(this.soundBtn), this.soundBtn.y = 16, this.soundBtn.x = 332
  5386. }
  5387. return __extends(b, a), b.prototype.add = function() {
  5388. this.soundBtn.changeState = GameData.isSound ? 0 : 1, this.addChild(this.p), Fw.L_Positioning.StageAlign(this.p, {
  5389. centerX: !0
  5390. }), this.p.y = -this.p.height, egret.Tween.get(this.p).to({
  5391. y: 300
  5392. }, 200)
  5393. }, b.prototype.remove = function(a) {
  5394. var b = this;
  5395. egret.Tween.get(this.p).to({
  5396. y: -b.p.height
  5397. }, 200).call(function() {
  5398. b.removeChild(b.p), a()
  5399. })
  5400. }, b
  5401. }(egret.Sprite), stopPlan.prototype.__class__ = "stopPlan", __extends = this.__extends || function(a, b) {
  5402. function c() {
  5403. this.constructor = a
  5404. }
  5405. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5406. c.prototype = b.prototype, a.prototype = new c
  5407. }, topbar = function(a) {
  5408. function b() {
  5409. a.call(this), this.glodBg = Fw.tools.createBitmap(this.glodBg, "glodbg"), this.addChild(this.glodBg), this.glodBg.x = 80, this.glodBg.y = 30, this.glodTxt = Fw.tools.createTextLabel(this.glodTxt, 16777215, "center", GameData.glod.toString(), 36, 100), this.addChild(this.glodTxt), this.glodAdd = Fw.tools.createBitmap(this.glodAdd, "glodaddbtn"), this.glodAdd.touchEnabled = !0, this.glodAdd.name = "glodadd", SG_Hooks.isEnabledIncentiviseButton() && this.addChild(this.glodAdd), this.glodAdd.x = this.glodBg.x, this.glodAdd.y = this.glodBg.y, this.glodTxt.x = this.glodBg.x + 62, Fw.L_Positioning.RelativeAlign(this.glodBg, this.glodTxt, {
  5410. centerY: !0
  5411. }), this.scoreBg = Fw.tools.createBitmap(this.scoreBg, "scorebg"), this.addChild(this.scoreBg), this.scoreTxt = Fw.tools.createTextLabel(this.scoreTxt, 16777215, "center", GameData.score.toString(), 36, 100), this.addChild(this.scoreTxt), this.scoreBg.x = 270, this.scoreBg.y = 30, this.scoreTxt.x = this.scoreBg.x + 62, Fw.L_Positioning.RelativeAlign(this.scoreBg, this.scoreTxt, {
  5412. centerY: !0
  5413. }), this.GameStop = Fw.tools.createBitmap(this.GameStop, "StopBtn", !0), this.addChild(this.GameStop), this.GameStop.x = 490, this.GameStop.y = 30, this.soundBtn = new L_StateButton(["soundPlay", "soundStop"]), this.soundBtn.touchEnabled = !0, this.soundBtn.name = "soundbtn", this.addChild(this.soundBtn), this.soundBtn.x = 440, this.soundBtn.y = 15, this.soundBtn.scaleX = this.soundBtn.scaleY = .85, this.retunIndex = Fw.tools.createBitmap(this.retunIndex, "returnIndex", !0), this.addChild(this.retunIndex), this.retunIndex.y = 30, this.retunIndex.scaleX = this.retunIndex.scaleY = .85, this.retunIndex.x = 550, this.levelBar = new egret.Sprite;
  5414. var b;
  5415. b = Fw.tools.createBitmap(b, "levelIcon"), this.levelBar.addChild(b), this.levelTxt = Fw.tools.createTextLabel(this.levelTxt, 16777215, "center", "0", 36, 72), this.levelBar.addChild(this.levelTxt), Fw.L_Positioning.RelativeAlign(b, this.levelTxt, {
  5416. centerX: !0,
  5417. centerY: !0
  5418. }), this.addChild(this.levelBar), this.levelBar.x = 30, this.levelBar.y = 30
  5419. }
  5420. return __extends(b, a), b.prototype.stopBtnVisible = function(a) {
  5421. this.GameStop.visible = a, this.retunIndex.visible = !a, this.soundBtn.visible = !a, (this.levelBar.visible = a) ? (this.scoreBg.x = 350, this.scoreTxt.x = this.scoreBg.x + 50, this.glodBg.x = 100) : (this.scoreBg.x = 270, this.scoreTxt.x = this.scoreBg.x + 50, this.glodBg.x = 20), this.glodTxt.x = this.glodBg.x + 62, this.glodAdd.x = this.glodBg.x, this.glodAdd.y = this.glodBg.y, this.soundBtn.changeState = GameData.isSound ? 0 : 1
  5422. }, b.prototype.change = function() {
  5423. this.glodTxt.text = GameData.glod.toString();
  5424. for (var a = 0, b = 0; b < GameData.levelLock.length; b++) 2 == GameData.levelLock[b] && (a += 1);
  5425. this.scoreTxt.text = a.toString(), GameData.score = a
  5426. }, b
  5427. }(egret.Sprite), topbar.prototype.__class__ = "topbar", __extends = this.__extends || function(a, b) {
  5428. function c() {
  5429. this.constructor = a
  5430. }
  5431. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5432. c.prototype = b.prototype, a.prototype = new c
  5433. }, v_selectLevel = function(a) {
  5434. function b() {
  5435. var b, c, d, e;
  5436. for (a.call(this), this.levelList = [], this.pContainer = new egret.Sprite, this.maxWidth = Fw.Data.StageWidth - 120, b = 0, c = 0; 30 > c; c++) 0 == c % 5 && (b += 100), d = c % 5 * (this.maxWidth / 5), e = new levellistbar(GameData.levelLock[c], c + 1), this.pContainer.addChild(e), e.x = d, e.y = b + 100, this.levelList.push(e)
  5437. }
  5438. return __extends(b, a), b.prototype.init = function() {
  5439. for (var a = 0; 30 > a; a++) GameData.levelLock[a] != this.levelList[a].state && this.levelList[a].change(GameData.levelLock[a])
  5440. }, b.prototype.add = function() {
  5441. this.init(), this.addChild(this.pContainer), this.pContainer.alpha = 1, this.pContainer.y = 20, this.pContainer.x = -this.pContainer.width, egret.Tween.get(this.pContainer).to({
  5442. x: 70
  5443. }, 200), console.log("rrun")
  5444. }, b.prototype.remove = function(a) {
  5445. var b = this;
  5446. egret.Tween.get(this.pContainer).to({
  5447. alpha: 0
  5448. }, 300).call(function() {
  5449. b.removeChild(b.pContainer), a()
  5450. })
  5451. }, b
  5452. }(egret.Sprite), v_selectLevel.prototype.__class__ = "v_selectLevel", __extends = this.__extends || function(a, b) {
  5453. function c() {
  5454. this.constructor = a
  5455. }
  5456. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5457. c.prototype = b.prototype, a.prototype = new c
  5458. }, v_start = function(a) {
  5459. function b() {
  5460. a.call(this), this.logo = Fw.tools.createBitmap(this.logo, "logo"), this.startBtn = Fw.tools.createBitmap(this.startBtn, "startBtn", !0), this.fxBitmap = Fw.tools.createBitmap(this.fxBitmap, "ViewFx"), this.moregame = Fw.tools.createBitmap(this.moregame, "moregame", !0), this.moregame.scaleX = this.moregame.scaleY = .9, this.fxBitmap.anchorX = .5, this.fxBitmap.anchorY = .5, this.fxBitmap.width = this.fxBitmap.height = 1.5 * Fw.Data.StageWidth, this.soundbtn = new L_StateButton(["soundPlay", "soundStop"]), this.soundbtn.touchEnabled = !0, this.soundbtn.name = "soundbtn", this.addChild(this.soundbtn), this.soundbtn.x = 490, this.soundbtn.y = 0
  5461. }
  5462. return __extends(b, a), b.prototype.add = function() {
  5463. this.soundbtn.changeState = GameData.isSound ? 0 : 1, this.addChild(this.logo), this.addChild(this.startBtn), this.addChild(this.moregame), this.soundbtn.visible = !0, Fw.L_Positioning.StageAlign(this.moregame, {
  5464. centerX: !0
  5465. }), console.log("this.run"), Fw.L_Positioning.StageAlign(this.logo, {
  5466. centerX: !0
  5467. }), this.logo.y = -this.logo.height, Fw.L_Positioning.StageAlign(this.startBtn, {
  5468. centerX: !0
  5469. }), this.startBtn.y = Fw.Data.StageHeight, egret.Tween.get(this.logo).to({
  5470. y: 142
  5471. }, 200), egret.Tween.get(this.startBtn).to({
  5472. y: 550
  5473. }, 200), egret.Tween.get(this.moregame).to({
  5474. y: 700
  5475. }, 200), this.addChild(this.fxBitmap);
  5476. var a = this;
  5477. setTimeout(function() {
  5478. Fw.L_Positioning.RelativeAlign(a.startBtn, a.fxBitmap, {
  5479. centerX: !0,
  5480. centerY: !0
  5481. }), a.addChildAt(a.startBtn, a.numChildren - 1), a.addChildAt(a.moregame, a.numChildren - 1), egret.Tween.get(a.fxBitmap, {
  5482. loop: !0
  5483. }).to({
  5484. rotation: 360
  5485. }, 2e3)
  5486. }, 200)
  5487. }, b.prototype.remove = function(a) {
  5488. this.soundbtn.visible = !1;
  5489. var b = this;
  5490. egret.Tween.removeTweens(this.fxBitmap), this.removeChild(this.fxBitmap), egret.Tween.get(this.logo).to({
  5491. y: -this.logo.height
  5492. }, 200).call(function() {
  5493. b.removeChild(b.logo)
  5494. }), egret.Tween.get(this.moregame).to({
  5495. y: Fw.Data.StageHeight
  5496. }, 200).call(function() {
  5497. b.removeChild(b.moregame)
  5498. }), egret.Tween.get(this.startBtn).to({
  5499. y: Fw.Data.StageHeight
  5500. }, 200).call(function() {
  5501. b.removeChild(b.startBtn), a()
  5502. })
  5503. }, b
  5504. }(egret.Sprite), v_start.prototype.__class__ = "v_start", __extends = this.__extends || function(a, b) {
  5505. function c() {
  5506. this.constructor = a
  5507. }
  5508. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5509. c.prototype = b.prototype, a.prototype = new c
  5510. }, winPlan = function(a) {
  5511. function b() {
  5512. var b, c, d, e;
  5513. a.call(this), this.p = new egret.Sprite, b = Fw.tools.createBitmap(b, "winPlan"), this.p.addChild(b), c = Fw.tools.createBitmap(c, "nextLevelBtn", !0), this.p.addChild(c), c.y = 246, c.x = 311, d = Fw.tools.createBitmap(d, "RstartBtn", !0), d.name = "RstartBtn_win", d.y = 246, d.x = 205, this.p.addChild(d), e = Fw.tools.createBitmap(e, "levelMenuBtn", !0), e.name = "levelMenuBtn_win", this.p.addChild(e), e.y = 246, e.x = 97, this.moregame = Fw.tools.createBitmap(this.moregame, "moregameMini", !0), this.moregame.name = "moregame", this.p.addChild(this.moregame), this.moregame.y = 246, this.moregame.x = 417, this.glodTxt = Fw.tools.createTextLabel(this.glodTxt, 16777215, "center", "00", 30, 110, 30), this.p.addChild(this.glodTxt), this.glodTxt.x = 250, this.glodTxt.y = 186
  5514. }
  5515. return __extends(b, a), b.prototype.add = function() {
  5516. this.addChild(this.p), Fw.L_Positioning.StageAlign(this.p, {
  5517. centerX: !0
  5518. }), this.p.y = -this.p.height, egret.Tween.get(this.p).to({
  5519. y: 200
  5520. }, 200).wait(300)
  5521. }, b.prototype.remove = function(a) {
  5522. var b = this;
  5523. egret.Tween.get(this.p).to({
  5524. y: -b.p.height
  5525. }, 200).call(function() {
  5526. b.removeChild(b.p), a()
  5527. })
  5528. }, b
  5529. }(egret.Sprite), winPlan.prototype.__class__ = "winPlan", __extends = this.__extends || function(a, b) {
  5530. function c() {
  5531. this.constructor = a
  5532. }
  5533. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5534. c.prototype = b.prototype, a.prototype = new c
  5535. }, help = function(a) {
  5536. function b() {
  5537. a.call(this), this.isDown = !1, this.timer = new egret.Timer(500), this.timer.addEventListener(egret.TimerEvent.TIMER, this.onTimer, this), this.down = Fw.tools.createBitmap(this.down, "sdown"), this.addChild(this.down), this.down.visible = !1, this.up = Fw.tools.createBitmap(this.up, "sup"), this.addChild(this.up), this.timer.start()
  5538. }
  5539. return __extends(b, a), b.prototype.onTimer = function() {
  5540. this.down.visible = !this.isDown, this.up.visible = this.isDown, this.isDown = !this.isDown
  5541. }, b
  5542. }(egret.Sprite), help.prototype.__class__ = "help", __extends = this.__extends || function(a, b) {
  5543. function c() {
  5544. this.constructor = a
  5545. }
  5546. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5547. c.prototype = b.prototype, a.prototype = new c
  5548. }, Container = function(a) {
  5549. function b(b, c, d, e) {
  5550. a.call(this), this.rotations = 0, this.speed = 4, this.isPlay = !0, this.bg = new GameBGView(b), this.addChild(this.bg), this.cNum = 0, this.b = Fw.tools.createBitmap(this.b, c, !1), this.b.anchorX = this.b.anchorY = .5, this.b.y = this.bg.y + GameData.yY, Fw.L_Positioning.RelativeAlign(this.bg, this.b, {
  5551. centerX: !0
  5552. }), this.d = Fw.tools.createBitmap(this.d, d), this.d.anchorX = this.d.anchorY = .5, this.d.x = this.b.x, this.d.y = this.b.y, this.r = Fw.tools.createBitmap(this.r, e), this.r.anchorX = this.r.anchorY = .5, this.r.x = this.d.x, this.r.y = this.d.y, this.addChild(this.b), this.addChild(this.d), this.addChild(this.r)
  5553. }
  5554. return __extends(b, a), b
  5555. }(egret.Sprite), Container.prototype.__class__ = "Container", settings = function() {
  5556. function a() {}
  5557. return a.level13_18 = {
  5558. sy: 140,
  5559. xy: 520
  5560. }, a
  5561. }(), settings.prototype.__class__ = "settings",
  5562. function(a) {
  5563. var b = function() {
  5564. function b() {}
  5565. return b.init = function(b, c, d) {
  5566. a.Data.GameMain = b, a.Data.StageWidth = b.stage.stageWidth, a.Data.StageHeight = b.stage.stageHeight, a.Data.DesginWidth = c, a.Data.DesginHeight = d
  5567. }, b
  5568. }();
  5569. a.Pretreatment = b, b.prototype.__class__ = "Fw.Pretreatment"
  5570. }(Fw || (Fw = {})), __extends = this.__extends || function(a, b) {
  5571. function c() {
  5572. this.constructor = a
  5573. }
  5574. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5575. c.prototype = b.prototype, a.prototype = new c
  5576. }, L_ScreenRotating = function(a) {
  5577. function b(b, c, d) {
  5578. a.call(this), this.isVertical = !0, this.showBackground = "#e0e0e0", this.showBackground_n = 14737632, this.bg = new egret.Shape, this.isStart = !1, this.timer = new egret.Timer(1e3), this.type = b, this.start = c, this.stop = d, this.isVertical = "vertical" == b, b += "Icon", this.bg = Fw.tools.drawRectangular(this.bg, 0, 0, Fw.Data.StageWidth, Fw.Data.StageHeight, this.showBackground_n, 1), this.bg.touchEnabled = !0, this.currentBackground = Fw.tools.getbodybackground(), this.icon = Fw.tools.createBitmap(this.icon, b), this.timer.addEventListener(egret.TimerEvent.TIMER, this.onFrame, this), this.timer.start()
  5579. }
  5580. return __extends(b, a), b.prototype.onFrame = function(a) {
  5581. a = document.documentElement.clientWidth;
  5582. var b = document.documentElement.clientHeight;
  5583. this.isStart ? (this.isVertical && b > a && (this.changeImage(!1), this.timer.delay = 1e3, this.isStart = !1, this.stop()), !this.isVertical && a > b && (this.changeImage(!1), this.timer.delay = 1e3, this.isStart = !1, this.stop())) : this.isVertical ? a > b && (console.log("-----竖屏游戏旋转提示-----"), this.changeImage(!0), this.isStart = !0, this.timer.delay = 1e3 / 30, this.start()) : b > a && (console.log("-----横屏游戏旋转提示-----"), this.changeImage(!0), this.isStart = !0, this.timer.delay = 1e3 / 30, this.start())
  5584. }, b.prototype.changeImage = function(a) {
  5585. a ? (Methods.stage.addChild(this.bg), Methods.stage.addChild(this.icon), Fw.L_Positioning.StageAlign(this.icon, {
  5586. centerX: !0,
  5587. centerY: !0
  5588. }), Fw.tools.setbodybackground(this.showBackground)) : (Methods.stage.removeChild(this.bg), Methods.stage.removeChild(this.icon), Fw.tools.setbodybackground(this.currentBackground))
  5589. }, b
  5590. }(egret.Sprite), L_ScreenRotating.prototype.__class__ = "L_ScreenRotating", __extends = this.__extends || function(a, b) {
  5591. function c() {
  5592. this.constructor = a
  5593. }
  5594. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5595. c.prototype = b.prototype, a.prototype = new c
  5596. }, UI = function(a) {
  5597. function b() {
  5598. a.call(this), this.sound = new egret.Sound, this.getad = new getAd, this.getend = new getEnd, this.isStop = this.adstart = this.gamestart = !1, b._This = this, this.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchTap, this), this.vstart = new v_start, this.vselect = new v_selectLevel, this.TopBar = new topbar, this.game = new Game, this.vstop = new stopPlan, this.vwin = new winPlan, this.vlose = new overPlan, this.addChild(this.vstart), this.vstart.add(), this.isf = !1, this.sound = Fw.tools.createSound(this.sound, "sound");
  5599. var c = this;
  5600. musicFlag = null, getScope = function() {
  5601. return c
  5602. }, checkForSoundAndTurnOff = function() {
  5603. c.sound.setVolume(0)
  5604. }, turnSounddOnAgain = function() {
  5605. c.sound.setVolume(1)
  5606. }, window.onblur = function() {}, window.onfocus = function() {}, this.bg = Fw.tools.drawRectangular(this.bg, 0, 0, Fw.Data.StageWidth, Fw.Data.StageHeight, 16777215, .5), this.bg.touchEnabled = !0
  5607. }
  5608. return __extends(b, a), b.prototype.endlevel = function() {
  5609. b._This.game.remove(), b._This.removeChild(b._This.game), b._This.removeChild(b._This.bg), b._This.TopBar.stopBtnVisible(!1), b._This.addChild(b._This.vselect), b._This.vselect.add()
  5610. }, b.prototype.gameStop = function() {
  5611. b._This.isStop = !0
  5612. }, b.prototype.gamenext = function() {
  5613. b._This.isStop = !1
  5614. }, b.prototype.onTouchTap = function(a) {
  5615. var c, d, e, f;
  5616. if (!b._This.isStop) {
  5617. switch ("levelBox_" == String(a.target.name).substr(0, 9) && 0 < a.target.state && (c = a.target.name, d = Number(c.substr(9, c.length - 1)), console.log("用户选择了关卡进行游戏," + d.toString()), this.gamestart = !0, this.TopBar.levelTxt.text = d.toString(), this.vselect.remove(function() {
  5618. b._This.addChild(b._This.game), b._This.game.start(d), b._This.TopBar.stopBtnVisible(!0), SG_Hooks.start(), GameData.isSound && b._This.sound.play(!0)
  5619. })), a.target.name) {
  5620. case "startBtn":
  5621. GameData.isSound && b._This.sound.play(!0), this.vstart.remove(function() {
  5622. b._This.removeChild(b._This.vstart), b._This.addChild(b._This.vselect), b._This.vselect.add(), b._This.addChild(b._This.TopBar), b._This.TopBar.stopBtnVisible(!1)
  5623. });
  5624. break;
  5625. case "StopBtn":
  5626. this.addChild(this.bg), this.addChild(this.vstop), this.vstop.add(), this.game.stop(), this.gamestart = !1;
  5627. break;
  5628. case "NextBtn":
  5629. this.vstop.remove(function() {
  5630. b._This.game.next(), b._This.removeChild(b._This.vstop), b._This.removeChild(b._This.bg), b._This.gamestart = !0
  5631. });
  5632. break;
  5633. case "levelMenuBtn":
  5634. this.vstop.remove(function() {
  5635. b._This.game.remove(), b._This.removeChild(b._This.game), b._This.TopBar.stopBtnVisible(!1), b._This.removeChild(b._This.vstop), b._This.removeChild(b._This.bg), b._This.addChild(b._This.vselect), b._This.vselect.add(), b._This.gamestart = !1
  5636. });
  5637. break;
  5638. case "RstartBtn":
  5639. this.vstop.remove(function() {
  5640. b._This.removeChild(b._This.vstop), b._This.removeChild(b._This.bg), b._This.game.rstart(), SG_Hooks.gameOver(GameData.score, GameData.glod), b._This.gamestart = !0
  5641. });
  5642. break;
  5643. case "nextLevelBtn":
  5644. this.vwin.remove(function() {
  5645. 30 < b._This.game.currentLvel + 1 ? (b._This.removeChild(b._This.vwin), b._This.endlevel(), b._This.gamestart = !1) : (b._This.removeChild(b._This.vwin), b._This.removeChild(b._This.bg), b._This.game.nextLevel(), b._This.gamestart = !0)
  5646. });
  5647. break;
  5648. case "RstartBtn_win":
  5649. this.vwin.remove(function() {
  5650. b._This.removeChild(b._This.vwin), b._This.removeChild(b._This.bg), b._This.game.rstart(), b._This.gamestart = !0
  5651. });
  5652. break;
  5653. case "levelMenuBtn_win":
  5654. this.vwin.remove(function() {
  5655. b._This.game.remove(), b._This.removeChild(b._This.game), b._This.removeChild(b._This.vwin), b._This.removeChild(b._This.bg), b._This.TopBar.stopBtnVisible(!1), b._This.addChild(b._This.vselect), b._This.vselect.add(), b._This.gamestart = !1
  5656. });
  5657. break;
  5658. case "levelMenuBtn_lose":
  5659. this.vlose.remove(function() {
  5660. b._This.game.remove(), b._This.removeChild(b._This.game), b._This.removeChild(b._This.vlose), b._This.removeChild(b._This.bg), b._This.TopBar.stopBtnVisible(!1), b._This.addChild(b._This.vselect), b._This.vselect.add(), b._This.gamestart = !1
  5661. });
  5662. break;
  5663. case "RstartBtn_lose":
  5664. this.vlose.remove(function() {
  5665. b._This.removeChild(b._This.vlose), b._This.removeChild(b._This.bg), b._This.game.rstart(), b._This.gamestart = !0
  5666. });
  5667. break;
  5668. case "returnIndex":
  5669. this.removeChild(this.TopBar), this.vselect.remove(function() {
  5670. b._This.addChild(b._This.vstart), b._This.vstart.add()
  5671. });
  5672. break;
  5673. case "moregame":
  5674. //Play68.goHome();
  5675. break;
  5676. case "soundbtn":
  5677. 0 == a.target.changeState ? (a.target.changeState = 1, GameData.isSound = !1, this.sound.pause()) : (a.target.changeState = 0, GameData.isSound = !0, this.sound.play(!0));
  5678. break;
  5679. case "glodadd":
  5680. this.gamestart ? (this.game.stop(), this.adstart = !0, this.gamestart = !1) : this.adstart = !1, this.addChild(this.getad), this.getad.anchorX = this.getad.anchorY = .5, Fw.L_Positioning.StageAlign(this.getad, {
  5681. centerX: !0,
  5682. centerY: !0
  5683. }), this.getad.scaleX = this.getad.scaleY = .5, this.getad.alpha = 0, this.getad.init(GameData.language[2] + ",\n" + GameData.language[3]), egret.Tween.get(this.getad).to({
  5684. scaleX: 1,
  5685. scaleY: 1,
  5686. alpha: 1
  5687. }, 150);
  5688. break;
  5689. case "getAd_yes":
  5690. break;
  5691. case "getAd_no":
  5692. this.removeChild(this.getad), this.adstart && (this.game.next(), this.gamestart = !0);
  5693. break;
  5694. case "getEnd_yes":
  5695. f = new glodAnimation, e = Fw.tools.drawRectangular(e, 0, 0, Fw.Data.StageWidth, Fw.Data.StageHeight, 0, .5), e.touchEnabled = !0, b._This.stage.addChild(e), b._This.stage.addChild(f), f.anchorX = f.anchorY = .5, Fw.L_Positioning.StageAlign(f, {
  5696. centerX: !0,
  5697. centerY: !0
  5698. }), egret.Tween.get(f).to({
  5699. y: 60,
  5700. x: 150
  5701. }, 2e3).call(function() {
  5702. GameData.glod += GameData.addGlod, b._This.TopBar.change(), Game._This.getend.alpha = 0, GameData.save(), b._This.stage.removeChild(e), b._This.stage.removeChild(f), b._This.removeChild(b._This.getend), b._This.removeChild(b._This.getad), b._This.adstart && (b._This.game.next(), b._This.gamestart = !0)
  5703. })
  5704. }
  5705. console.log(a.target.name)
  5706. }
  5707. }, b.getadend = function() {
  5708. b._This.addChild(b._This.getend), b._This.getend.touchEnabled = !0, b._This.getend.name = "getend", egret.Tween.get(b._This.getend).to({
  5709. scaleX: 1,
  5710. scaleY: 1,
  5711. alpha: 1
  5712. }, 150), b._This.getend.anchorX = b._This.getend.anchorY = .5, Fw.L_Positioning.StageAlign(b._This.getend, {
  5713. centerX: !0,
  5714. centerY: !0
  5715. }), Game._This.getend.init("+" + GameData.addGlod.toString())
  5716. }, b
  5717. }(egret.Sprite), UI.prototype.__class__ = "UI", __extends = this.__extends || function(a, b) {
  5718. function c() {
  5719. this.constructor = a
  5720. }
  5721. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5722. c.prototype = b.prototype, a.prototype = new c
  5723. }, loading = function(a) {
  5724. function b() {
  5725. var b, c, d;
  5726. a.call(this), b = Fw.tools.createBitmap(b, "logo"), Fw.L_Positioning.StageAlign(b, {
  5727. centerX: !0,
  5728. offsetX: 10
  5729. }), b.y = 100, this.addChild(b), c = Fw.tools.createBitmap(c, "loadingbg"), this.addChild(c), this.w = c.width, c.y = 530, Fw.L_Positioning.StageAlign(c, {
  5730. centerX: !0
  5731. }), this.loadingBar = Fw.tools.createBitmap(this.loadingBar, "loadingbar"), this.addChild(this.loadingBar), this.loadingBar.x = c.x, this.loadingBar.y = c.y, this.loadingBar.width = 1, d = Fw.tools.createBitmap(d, "68_logo", !0), this.addChild(d), Fw.L_Positioning.StageAlign(d, {
  5732. centerX: !0
  5733. }), d.y = 570, d.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTap, this)
  5734. }
  5735. return __extends(b, a), b.prototype.onTap = function() {
  5736. window.location.href = GameData.moregamesUrl
  5737. }, b.prototype.Set = function(a) {
  5738. this.loadingBar.width = this.w * a
  5739. }, b
  5740. }(egret.Sprite), loading.prototype.__class__ = "loading", __extends = this.__extends || function(a, b) {
  5741. function c() {
  5742. this.constructor = a
  5743. }
  5744. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5745. c.prototype = b.prototype, a.prototype = new c
  5746. }, Main = function(a) {
  5747. function b() {
  5748. a.call(this), this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this)
  5749. }
  5750. return __extends(b, a), b.prototype.onAddToStage = function() {
  5751. Fw.Pretreatment.init(this, 640, 960), Methods.init(this.stage), RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this), RES.loadConfig("resource/resource.json", "resource/"), GameData.read()
  5752. }, b.prototype.onConfigComplete = function() {
  5753. RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this), RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this), RES.addEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this), RES.loadGroup("loading", 99), RES.loadGroup("runNeed", 10)
  5754. }, b.prototype.onResourceLoadComplete = function(a) {
  5755. var b, c;
  5756. "runNeed" == a.groupName && (RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this), RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS, this.onResourceProgress, this), this.stage.removeChild(this.loadingview), this.ui = new UI, this.stage.addChild(this.ui), SG_Hooks.setPauseHandler(function() {
  5757. UI._This.gameStop()
  5758. }), SG_Hooks.setUnpauseHandler(function() {
  5759. UI._This.gamenext()
  5760. })), "loading" == a.groupName && (a = SG_Hooks.getLanguage("en de es fr it pt ru tr nl pl".split(" ")), b = RES.getRes("doc"), GameData.language = b[a], c = Fw.tools.createBitmap(c, "bg"), this.stage.addChild(c), this.loadingview = new loading, this.stage.addChild(this.loadingview), Fw.tools.Drive().isPC || (new L_ScreenRotating("vertical", function() {
  5761. UI._This.gameStop()
  5762. }, function() {
  5763. UI._This.gamenext()
  5764. }), SG_Hooks.setOrientationHandler(function() {}), SG_Hooks.setResizeHandler(function() {})))
  5765. }, b.prototype.onResourceProgress = function(a) {
  5766. "runNeed" == a.groupName && this.loadingview.Set(Number(a.itemsLoaded) / Number(a.itemsTotal))
  5767. }, b
  5768. }(egret.DisplayObjectContainer), Main.prototype.__class__ = "Main", __extends = this.__extends || function(a, b) {
  5769. function c() {
  5770. this.constructor = a
  5771. }
  5772. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5773. c.prototype = b.prototype, a.prototype = new c
  5774. }, level_1 = function(a) {
  5775. function b() {
  5776. a.call(this), this.rotations = 0, this.speed = 2, this.isTs = !1, this.Mask = Fw.tools.drawRectangular(this.Mask, 0, 0, Fw.Data.StageWidth, Fw.Data.StageHeight, 0, .6), this.addChild(this.Mask), this.Mask.visible = !1, this.bg = new GameBGView(4), this.addChild(this.bg), Fw.L_Positioning.StageAlign(this.bg, {
  5777. centerX: !0,
  5778. centerY: !0
  5779. }), this.cNum = 0, this.b = Fw.tools.createBitmap(this.b, "y0", !1), this.b.anchorX = this.b.anchorY = .5, this.b.y = this.bg.y + GameData.yY, Fw.L_Positioning.RelativeAlign(this.bg, this.b, {
  5780. centerX: !0
  5781. }), this.d = Fw.tools.createBitmap(this.d, "ed0"), this.d.anchorX = this.d.anchorY = .5, this.d.x = this.b.x, this.d.y = this.b.y, this.r = Fw.tools.createBitmap(this.r, "es0"), this.r.anchorX = this.r.anchorY = .5, this.r.x = this.d.x, this.r.y = this.d.y, this.addChild(this.b), this.addChild(this.d), this.addChild(this.r), this.Help = new help, this.addChild(this.Help), this.Help.x = this.d.x, this.Help.y = this.d.y
  5782. }
  5783. return __extends(b, a), b.prototype.onTouchBegin = function() {
  5784. if (!UI._This.isStop)
  5785. if (GameData.RotationChange(this.r.rotation, this.d.rotation, 10)) {
  5786. switch (this.cNum) {
  5787. case 0:
  5788. this.d.rotation = Math.floor(60 * Math.random()) + 180, this.Mask.visible = !1, this.Help.visible = !1, this.bg.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.isTs = !0;
  5789. break;
  5790. case 1:
  5791. this.d.rotation = Math.floor(60 * Math.random()) + 90, this.Mask.visible = !1, this.Help.visible = !1, this.bg.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.isTs = !0, this.speed = 4;
  5792. break;
  5793. case 2:
  5794. this.win(), this.Mask.visible = !1, this.Help.visible = !1
  5795. }
  5796. this.cNum += 1, this.createFx(this.d.x, this.d.y)
  5797. } else this.createFx_Over(this.d.x, this.d.y), this.over()
  5798. }, b.prototype.createFx = function(a, b) {
  5799. var d, c = Fw.tools.createBitmap(c, "runFx");
  5800. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  5801. scaleX: 8,
  5802. scaleY: 8,
  5803. rotation: 360,
  5804. alpha: 0
  5805. }, 500).call(function() {
  5806. d.removeChild(c)
  5807. })
  5808. }, b.prototype.createFx_Over = function(a, b) {
  5809. var d, c = Fw.tools.createBitmap(c, "loseFx");
  5810. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  5811. alpha: 0
  5812. }, 100).wait(100).to({
  5813. alpha: .6
  5814. }, 100).wait(100).to({
  5815. alpha: 0
  5816. }, 100).call(function() {
  5817. d.removeChild(c)
  5818. })
  5819. }, b.prototype.start = function() {
  5820. this.bg.init(), this.isTs = !0, this.rotations = this.cNum = 0, this.speed = 2, this.d.rotation = 90, this.r.rotation = 0, this.Mask.visible = !1, this.Help.visible = !1, this.bg.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.next()
  5821. }, b.prototype.stop = function() {
  5822. Game.GameEnterFrame.stop()
  5823. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  5824. this.isTs && (this.r.rotation += this.speed, GameData.resultRotation(this.r), this.rotations += this.speed), 10 > Math.abs(this.d.rotation - this.r.rotation) && this.isTs && (this.isTs = !1, this.Mask.visible = !0, this.Help.visible = !0, this.bg.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), console.log("aaaaaa")), 360 <= this.rotations && (this.bg.remove() || this.over(), this.rotations = 0)
  5825. }, b.prototype.next = function() {
  5826. this.bg.touchEnabled = !0, Game.GameEnterFrame.start()
  5827. }, b.prototype.over = function() {
  5828. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  5829. }, b.prototype.win = function() {
  5830. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  5831. }, b
  5832. }(egret.Sprite), level_1.prototype.__class__ = "level_1", __extends = this.__extends || function(a, b) {
  5833. function c() {
  5834. this.constructor = a
  5835. }
  5836. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5837. c.prototype = b.prototype, a.prototype = new c
  5838. }, level_10 = function(a) {
  5839. function b() {
  5840. a.call(this), this.cNum = 0, this.left = new Container(2, "y3", "ed3", "es3"), this.addChild(this.left), Fw.L_Positioning.StageAlign(this.left, {
  5841. centerY: !0
  5842. }), this.left.name = "left", this.left.touchEnabled = !0, this.right = new Container(2, "y4", "ed4", "es4"), this.addChild(this.right), Fw.L_Positioning.StageAlign(this.right, {
  5843. centerY: !0
  5844. }), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.name = "right", this.right.touchEnabled = !0
  5845. }
  5846. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  5847. if (!UI._This.isStop) {
  5848. if ("left" == a.target.name && a.target.isPlay) {
  5849. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  5850. switch (this.left.cNum) {
  5851. case 0:
  5852. this.left.d.rotation = 130, this.left.speed = 4;
  5853. break;
  5854. case 1:
  5855. this.left.d.rotation = 220, this.left.speed = -4;
  5856. break;
  5857. case 2:
  5858. this.left.d.rotation = Math.floor(60 * Math.random()) + 150, this.left.speed = 5;
  5859. break;
  5860. case 3:
  5861. this.left.isPlay = !1, this.left.alpha = .5
  5862. }
  5863. this.left.rotations = 0, this.left.bg.init(), this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  5864. } else if ("right" == a.target.name && a.target.isPlay) {
  5865. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  5866. switch (this.right.cNum) {
  5867. case 0:
  5868. this.right.d.rotation = 130, this.right.speed = 4;
  5869. break;
  5870. case 1:
  5871. this.right.d.rotation = 220, this.right.speed = -4;
  5872. break;
  5873. case 2:
  5874. this.right.d.rotation = Math.floor(60 * Math.random()) + 150, this.right.speed = 5;
  5875. break;
  5876. case 3:
  5877. this.right.isPlay = !1, this.right.alpha = .5
  5878. }
  5879. this.right.rotations = 0, this.right.bg.init(), this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  5880. }
  5881. this.cNum = this.left.cNum + this.right.cNum, 8 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || (this.left.isPlay = this.right.isPlay = !0, this.left.alpha = this.right.alpha = 1)
  5882. }
  5883. }, b.prototype.createFx = function(a, b) {
  5884. var d, c = Fw.tools.createBitmap(c, "runFx");
  5885. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  5886. scaleX: 8,
  5887. scaleY: 8,
  5888. rotation: 360,
  5889. alpha: 0
  5890. }, 500).call(function() {
  5891. d.removeChild(c)
  5892. })
  5893. }, b.prototype.createFx_Over = function(a, b) {
  5894. var d, c = Fw.tools.createBitmap(c, "loseFx");
  5895. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  5896. alpha: 0
  5897. }, 100).wait(100).to({
  5898. alpha: .6
  5899. }, 100).wait(100).to({
  5900. alpha: 0
  5901. }, 100).call(function() {
  5902. d.removeChild(c)
  5903. })
  5904. }, b.prototype.start = function() {
  5905. this.left.alpha = 1, this.right.alpha = 1, this.left.bg.init(), this.right.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !0, this.left.speed = 4, this.right.speed = -4, this.left.r.rotation = 30, this.right.r.rotation = 330, this.left.d.rotation = 0, this.right.d.rotation = 250, this.next()
  5906. }, b.prototype.stop = function() {
  5907. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  5908. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  5909. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed))
  5910. }, b.prototype.next = function() {
  5911. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  5912. }, b.prototype.over = function() {
  5913. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  5914. }, b.prototype.win = function() {
  5915. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  5916. }, b
  5917. }(egret.Sprite), level_10.prototype.__class__ = "level_10", __extends = this.__extends || function(a, b) {
  5918. function c() {
  5919. this.constructor = a
  5920. }
  5921. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  5922. c.prototype = b.prototype, a.prototype = new c
  5923. }, level_11 = function(a) {
  5924. function b() {
  5925. a.call(this), this.cNum = 0, this.left = new Container(1, "y5", "ed5", "es5"), this.addChild(this.left), Fw.L_Positioning.StageAlign(this.left, {
  5926. centerY: !0
  5927. }), this.left.name = "left", this.left.touchEnabled = !0, this.right = new Container(1, "y6", "ed6", "es6"), this.addChild(this.right), Fw.L_Positioning.StageAlign(this.right, {
  5928. centerY: !0
  5929. }), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.name = "right", this.right.touchEnabled = !0
  5930. }
  5931. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  5932. if (!UI._This.isStop) {
  5933. if ("left" == a.target.name && a.target.isPlay) {
  5934. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  5935. switch (this.left.cNum) {
  5936. case 0:
  5937. this.left.isPlay = !1, this.left.alpha = .5, this.right.isPlay = !0, this.right.alpha = 1, this.left.d.rotation = this.left.r.rotation + Math.floor(60 * Math.random()) + 40, this.left.speed = -5;
  5938. break;
  5939. case 1:
  5940. this.left.d.rotation = 45, this.left.r.rotation = 0, this.left.speed = -4, this.left.bg.init(), this.left.rotations = 0, this.right.isPlay = !0, this.right.alpha = 1;
  5941. break;
  5942. case 2:
  5943. this.left.isPlay = !1, this.left.alpha = .5
  5944. }
  5945. this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  5946. } else if ("right" == a.target.name && a.target.isPlay) {
  5947. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  5948. switch (this.right.cNum) {
  5949. case 0:
  5950. this.left.isPlay = !0, this.right.isPlay = !1, this.right.alpha = .5, this.left.alpha = 1, this.left.rotations = 0, this.left.bg.init(), this.right.r.rotation = 200, this.right.d.rotation = 300, this.right.speed = 6;
  5951. break;
  5952. case 1:
  5953. this.right.d.rotation = 250, this.right.r.rotation = 330, this.right.speed = 4, this.right.rotations = 0, this.right.bg.init();
  5954. break;
  5955. case 2:
  5956. this.right.isPlay = !1, this.right.alpha = .5
  5957. }
  5958. this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  5959. }
  5960. this.cNum = this.left.cNum + this.right.cNum, 6 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || (this.left.isPlay = this.right.isPlay = !0, this.left.alpha = this.right.alpha = 1)
  5961. }
  5962. }, b.prototype.createFx = function(a, b) {
  5963. var d, c = Fw.tools.createBitmap(c, "runFx");
  5964. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  5965. scaleX: 8,
  5966. scaleY: 8,
  5967. rotation: 360,
  5968. alpha: 0
  5969. }, 500).call(function() {
  5970. d.removeChild(c)
  5971. })
  5972. }, b.prototype.createFx_Over = function(a, b) {
  5973. var d, c = Fw.tools.createBitmap(c, "loseFx");
  5974. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  5975. alpha: 0
  5976. }, 100).wait(100).to({
  5977. alpha: .6
  5978. }, 100).wait(100).to({
  5979. alpha: 0
  5980. }, 100).call(function() {
  5981. d.removeChild(c)
  5982. })
  5983. }, b.prototype.start = function() {
  5984. this.left.alpha = 1, this.right.alpha = .5, this.left.bg.init(), this.right.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !1, this.left.speed = 6, this.right.speed = -5, this.left.r.rotation = 30, this.right.r.rotation = 330, this.left.d.rotation = 0, this.right.d.rotation = 110, this.next()
  5985. }, b.prototype.stop = function() {
  5986. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  5987. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  5988. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed))
  5989. }, b.prototype.next = function() {
  5990. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  5991. }, b.prototype.over = function() {
  5992. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  5993. }, b.prototype.win = function() {
  5994. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  5995. }, b
  5996. }(egret.Sprite), level_11.prototype.__class__ = "level_11", __extends = this.__extends || function(a, b) {
  5997. function c() {
  5998. this.constructor = a
  5999. }
  6000. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6001. c.prototype = b.prototype, a.prototype = new c
  6002. }, level_12 = function(a) {
  6003. function b() {
  6004. a.call(this), this.cNum = 0, this.left = new Container(1, "y7", "ed7", "es7"), this.addChild(this.left), Fw.L_Positioning.StageAlign(this.left, {
  6005. centerY: !0
  6006. }), this.left.name = "left", this.left.touchEnabled = !0, this.right = new Container(2, "y8", "ed8", "es8"), this.addChild(this.right), Fw.L_Positioning.StageAlign(this.right, {
  6007. centerY: !0
  6008. }), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.name = "right", this.right.touchEnabled = !0
  6009. }
  6010. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6011. if (!UI._This.isStop) {
  6012. if ("left" == a.target.name && a.target.isPlay) {
  6013. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  6014. switch (this.left.cNum) {
  6015. case 0:
  6016. this.left.bg.init(), this.left.d.rotation = 90, this.left.r.rotation = 50, this.right.isPlay = !0, this.left.rotations = 0;
  6017. break;
  6018. case 1:
  6019. this.left.d.rotation = 45, this.left.r.rotation = 0, this.left.speed = -4, this.left.bg.init(), this.left.rotations = 0, this.right.isPlay = !0, this.right.alpha = 1;
  6020. break;
  6021. case 2:
  6022. this.left.isPlay = !1, this.left.alpha = .5, this.left.bg.init(), this.left.d.rotation = 270, this.left.r.rotation = 30, this.left.speed = -4, this.left.rotations = 0;
  6023. break;
  6024. case 3:
  6025. this.left.isPlay = !1, this.left.cNum += 1
  6026. }
  6027. this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  6028. } else if ("right" == a.target.name && a.target.isPlay) {
  6029. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  6030. switch (this.right.cNum) {
  6031. case 0:
  6032. this.right.d.rotation = 50, this.right.r.rotation = 30, this.right.bg.init();
  6033. break;
  6034. case 1:
  6035. this.right.d.rotation = 250, this.right.r.rotation = 330, this.right.speed = 4, this.right.rotations = 0, this.right.bg.init();
  6036. break;
  6037. case 2:
  6038. this.right.isPlay = !1, this.right.alpha = .5, this.left.alpha = 1, this.left.isPlay = !0
  6039. }
  6040. this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  6041. }
  6042. this.cNum = this.left.cNum + this.right.cNum, 8 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || (this.left.isPlay = this.right.isPlay = !0, this.left.alpha = this.right.alpha = 1)
  6043. }
  6044. }, b.prototype.createFx = function(a, b) {
  6045. var d, c = Fw.tools.createBitmap(c, "runFx");
  6046. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6047. scaleX: 8,
  6048. scaleY: 8,
  6049. rotation: 360,
  6050. alpha: 0
  6051. }, 500).call(function() {
  6052. d.removeChild(c)
  6053. })
  6054. }, b.prototype.createFx_Over = function(a, b) {
  6055. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6056. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6057. alpha: 0
  6058. }, 100).wait(100).to({
  6059. alpha: .6
  6060. }, 100).wait(100).to({
  6061. alpha: 0
  6062. }, 100).call(function() {
  6063. d.removeChild(c)
  6064. })
  6065. }, b.prototype.start = function() {
  6066. this.left.alpha = 1, this.right.alpha = 1, this.left.bg.init(), this.right.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !0, this.left.speed = 6, this.right.speed = -3, this.left.r.rotation = 30, this.right.r.rotation = 270, this.left.d.rotation = 0, this.right.d.rotation = 30, this.next()
  6067. }, b.prototype.stop = function() {
  6068. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6069. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6070. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed))
  6071. }, b.prototype.next = function() {
  6072. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6073. }, b.prototype.over = function() {
  6074. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6075. }, b.prototype.win = function() {
  6076. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6077. }, b
  6078. }(egret.Sprite), level_12.prototype.__class__ = "level_12", __extends = this.__extends || function(a, b) {
  6079. function c() {
  6080. this.constructor = a
  6081. }
  6082. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6083. c.prototype = b.prototype, a.prototype = new c
  6084. }, level_13 = function(a) {
  6085. function b() {
  6086. a.call(this), this.cNum = 0, this.top = new Container(4, "y0", "ed0", "es0"), this.left = new Container(4, "y1", "ed1", "es1"), this.right = new Container(4, "y2", "ed2", "es2"), this.addChild(this.top), this.top.name = "top", this.top.touchEnabled = !0, Fw.L_Positioning.StageAlign(this.top, {
  6087. centerX: !0
  6088. }), this.top.y = settings.level13_18.sy, this.addChild(this.left), this.left.y = settings.level13_18.xy, this.addChild(this.right), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.y = settings.level13_18.xy, this.left.name = "left", this.left.touchEnabled = !0, this.right.touchEnabled = !0, this.right.name = "right"
  6089. }
  6090. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6091. if (!UI._This.isStop) {
  6092. if ("left" == a.target.name && a.target.isPlay) {
  6093. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  6094. this.changeLeft(), this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  6095. } else if ("right" == a.target.name && a.target.isPlay) {
  6096. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  6097. this.changeRight(), this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  6098. } else if ("top" == a.target.name && a.target.isPlay) {
  6099. if (!GameData.RotationChange(this.top.r.rotation, this.top.d.rotation, 15)) return this.createFx_Over(this.top.x + this.top.d.x, this.top.y + this.top.d.y), void this.over();
  6100. this.changeTop(), this.top.cNum += 1, this.createFx(this.top.x + this.top.d.x, this.top.y + this.top.d.y)
  6101. }
  6102. this.cNum = this.left.cNum + this.right.cNum + this.top.cNum, 9 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || this.top.isPlay || (this.left.isPlay = this.right.isPlay = this.top.isPlay = !0, this.left.alpha = this.right.alpha = this.top.alpha = 1)
  6103. }
  6104. }, b.prototype.changeLeft = function() {
  6105. switch (this.left.cNum) {
  6106. case 0:
  6107. this.left.d.rotation = 180, this.left.rotations = 0, this.left.bg.init(), this.left.isPlay = !1, this.left.alpha = .5, this.right.isPlay = !0, this.right.alpha = 1;
  6108. break;
  6109. case 1:
  6110. this.left.isPlay = !1, this.left.alpha = .5, this.top.isPlay || this.right.isPlay || this.top.isPlay || (this.top.isPlay = !0, this.left.isPlay = !0, this.right.isPlay = !0, this.top.alpha = 1, this.left.alpha = 1, this.right.alpha = 1)
  6111. }
  6112. }, b.prototype.changeRight = function() {
  6113. switch (this.right.cNum) {
  6114. case 0:
  6115. this.right.rotations = 0, this.right.d.rotation = 0, this.right.r.rotation = 230, this.right.bg.init(), this.left.isPlay = !0, this.left.alpha = 1, this.top.isPlay = !0, this.top.alpha = 1;
  6116. break;
  6117. case 1:
  6118. this.right.alpha = .5, this.right.isPlay = !1, this.top.isPlay || this.right.isPlay || this.top.isPlay || (this.top.isPlay = !0, this.left.isPlay = !0, this.right.isPlay = !0, this.top.alpha = 1, this.left.alpha = 1, this.right.alpha = 1)
  6119. }
  6120. }, b.prototype.changeTop = function() {
  6121. switch (this.top.cNum) {
  6122. case 0:
  6123. this.top.rotations = 0, this.top.bg.init(), this.top.isPlay = !1, this.top.alpha = .5, this.top.d.rotation = 180, this.left.isPlay = !0, this.left.alpha = 1;
  6124. break;
  6125. case 1:
  6126. this.top.isPlay = !1, this.top.alpha = .5, this.top.isPlay || this.right.isPlay || this.top.isPlay || (this.top.isPlay = !0, this.left.isPlay = !0, this.right.isPlay = !0, this.top.alpha = 1, this.left.alpha = 1, this.right.alpha = 1)
  6127. }
  6128. }, b.prototype.createFx = function(a, b) {
  6129. var d, c = Fw.tools.createBitmap(c, "runFx");
  6130. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6131. scaleX: 8,
  6132. scaleY: 8,
  6133. rotation: 360,
  6134. alpha: 0
  6135. }, 500).call(function() {
  6136. d.removeChild(c)
  6137. })
  6138. }, b.prototype.createFx_Over = function(a, b) {
  6139. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6140. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6141. alpha: 0
  6142. }, 100).wait(100).to({
  6143. alpha: .6
  6144. }, 100).wait(100).to({
  6145. alpha: 0
  6146. }, 100).call(function() {
  6147. d.removeChild(c)
  6148. })
  6149. }, b.prototype.start = function() {
  6150. this.left.alpha = .5, this.right.alpha = .5, this.top.alpha = 1, this.left.bg.init(), this.right.bg.init(), this.top.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.top.cNum = 0, this.top.rotations = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !1, this.right.isPlay = !1, this.top.isPlay = !0, this.left.speed = 5, this.right.speed = 6, this.top.speed = 4, this.left.r.rotation = 30, this.right.r.rotation = 90, this.top.r.rotation = 135, this.left.d.rotation = 0, this.right.d.rotation = 60, this.top.d.rotation = 90, this.next()
  6151. }, b.prototype.stop = function() {
  6152. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6153. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6154. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed)), this.top.isPlay && (this.top.r.rotation += this.top.speed, 360 <= this.top.rotations && (this.top.bg.remove() || this.over(), this.top.rotations = 0), GameData.resultRotation(this.top.r), this.top.rotations += Math.abs(this.top.speed))
  6155. }, b.prototype.next = function() {
  6156. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6157. }, b.prototype.over = function() {
  6158. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6159. }, b.prototype.win = function() {
  6160. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6161. }, b
  6162. }(egret.Sprite), level_13.prototype.__class__ = "level_13", __extends = this.__extends || function(a, b) {
  6163. function c() {
  6164. this.constructor = a
  6165. }
  6166. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6167. c.prototype = b.prototype, a.prototype = new c
  6168. }, level_14 = function(a) {
  6169. function b() {
  6170. a.call(this), this.cNum = 0, this.top = new Container(1, "y2", "ed2", "es2"), this.left = new Container(3, "y3", "ed3", "es3"), this.right = new Container(3, "y4", "ed4", "es4"), this.addChild(this.top), this.top.name = "top", this.top.touchEnabled = !0, Fw.L_Positioning.StageAlign(this.top, {
  6171. centerX: !0
  6172. }), this.top.y = settings.level13_18.sy, this.addChild(this.left), this.left.y = settings.level13_18.xy, this.addChild(this.right), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.y = settings.level13_18.xy, this.left.name = "left", this.left.touchEnabled = !0, this.right.touchEnabled = !0, this.right.name = "right"
  6173. }
  6174. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6175. if (!UI._This.isStop) {
  6176. if ("left" == a.target.name && a.target.isPlay) {
  6177. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  6178. this.changeLeft(), this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  6179. } else if ("right" == a.target.name && a.target.isPlay) {
  6180. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  6181. this.changeRight(), this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  6182. } else if ("top" == a.target.name && a.target.isPlay) {
  6183. if (!GameData.RotationChange(this.top.r.rotation, this.top.d.rotation, 15)) return this.createFx_Over(this.top.x + this.top.d.x, this.top.y + this.top.d.y), void this.over();
  6184. this.changeTop(), this.top.cNum += 1, this.createFx(this.top.x + this.top.d.x, this.top.y + this.top.d.y)
  6185. }
  6186. this.cNum = this.left.cNum + this.right.cNum + this.top.cNum, console.log(this.cNum), 6 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || this.top.isPlay || (this.left.isPlay = this.right.isPlay = this.top.isPlay = !0, this.left.alpha = this.right.alpha = this.top.alpha = 1)
  6187. }
  6188. }, b.prototype.changeLeft = function() {
  6189. switch (this.left.cNum) {
  6190. case 0:
  6191. this.left.d.rotation = 60, this.left.r.rotation = 270, this.left.isPlay = !1, this.left.alpha = .5, this.left.rotations = 0, this.left.bg.init(), this.left.speed = -5, this.left.isPlay || this.right.isPlay || (this.top.isPlay = !0, this.top.alpha = 1);
  6192. break;
  6193. case 1:
  6194. this.left.isPlay = !1, this.left.alpha = .5, this.left.isPlay || this.right.isPlay || (this.top.isPlay = !0, this.top.alpha = 1)
  6195. }
  6196. }, b.prototype.changeRight = function() {
  6197. switch (this.right.cNum) {
  6198. case 0:
  6199. this.right.rotations = 0, this.right.bg.init(), this.right.speed = 5, this.right.d.rotation = 90, this.right.r.rotation = 270, this.right.isPlay = !1, this.right.alpha = .5, this.left.isPlay || this.right.isPlay || (this.top.isPlay = !0, this.top.alpha = 1);
  6200. break;
  6201. case 1:
  6202. this.right.alpha = .5, this.right.isPlay = !1, this.left.isPlay || this.right.isPlay || (this.top.isPlay = !0, this.top.alpha = 1)
  6203. }
  6204. }, b.prototype.changeTop = function() {
  6205. switch (this.top.cNum) {
  6206. case 0:
  6207. this.top.r.rotation = 120, this.top.bg.init(), this.top.rotations = 0, this.left.isPlay = !0, this.left.alpha = 1, this.right.alpha = 1, this.right.isPlay = !0, this.top.alpha = .5, this.top.isPlay = !1;
  6208. break;
  6209. case 1:
  6210. this.top.isPlay = !1, this.top.alpha = .5
  6211. }
  6212. }, b.prototype.createFx = function(a, b) {
  6213. var d, c = Fw.tools.createBitmap(c, "runFx");
  6214. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6215. scaleX: 8,
  6216. scaleY: 8,
  6217. rotation: 360,
  6218. alpha: 0
  6219. }, 500).call(function() {
  6220. d.removeChild(c)
  6221. })
  6222. }, b.prototype.createFx_Over = function(a, b) {
  6223. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6224. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6225. alpha: 0
  6226. }, 100).wait(100).to({
  6227. alpha: .6
  6228. }, 100).wait(100).to({
  6229. alpha: 0
  6230. }, 100).call(function() {
  6231. d.removeChild(c)
  6232. })
  6233. }, b.prototype.start = function() {
  6234. this.left.alpha = 1, this.right.alpha = 1, this.top.alpha = .5, this.left.bg.init(), this.right.bg.init(), this.top.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.top.cNum = 0, this.top.rotations = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !0, this.top.isPlay = !1, this.left.speed = 4, this.right.speed = -4, this.top.speed = 6, this.left.r.rotation = 30, this.right.r.rotation = 270, this.top.r.rotation = 180, this.left.d.rotation = 0, this.right.d.rotation = 180, this.top.d.rotation = 90, this.next()
  6235. }, b.prototype.stop = function() {
  6236. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6237. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6238. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed)), this.top.isPlay && (this.top.r.rotation += this.top.speed, 360 <= this.top.rotations && (this.top.bg.remove() || this.over(), this.top.rotations = 0), GameData.resultRotation(this.top.r), this.top.rotations += Math.abs(this.top.speed))
  6239. }, b.prototype.next = function() {
  6240. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6241. }, b.prototype.over = function() {
  6242. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6243. }, b.prototype.win = function() {
  6244. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6245. }, b
  6246. }(egret.Sprite), level_14.prototype.__class__ = "level_14", __extends = this.__extends || function(a, b) {
  6247. function c() {
  6248. this.constructor = a
  6249. }
  6250. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6251. c.prototype = b.prototype, a.prototype = new c
  6252. }, level_15 = function(a) {
  6253. function b() {
  6254. a.call(this), this.cNum = 0, this.top = new Container(3, "y4", "ed4", "es4"), this.left = new Container(2, "y5", "ed5", "es5"), this.right = new Container(1, "y6", "ed6", "es6"), this.addChild(this.top), this.top.name = "top", this.top.touchEnabled = !0, Fw.L_Positioning.StageAlign(this.top, {
  6255. centerX: !0
  6256. }), this.top.y = settings.level13_18.sy, this.addChild(this.left), this.left.y = settings.level13_18.xy, this.addChild(this.right), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.y = settings.level13_18.xy, this.left.name = "left", this.left.touchEnabled = !0, this.right.touchEnabled = !0, this.right.name = "right"
  6257. }
  6258. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6259. if (!UI._This.isStop) {
  6260. if ("left" == a.target.name && a.target.isPlay) {
  6261. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  6262. this.changeLeft(), this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  6263. } else if ("right" == a.target.name && a.target.isPlay) {
  6264. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  6265. this.changeRight(), this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  6266. } else if ("top" == a.target.name && a.target.isPlay) {
  6267. if (!GameData.RotationChange(this.top.r.rotation, this.top.d.rotation, 15)) return this.createFx_Over(this.top.x + this.top.d.x, this.top.y + this.top.d.y), void this.over();
  6268. this.changeTop(), this.top.cNum += 1, this.createFx(this.top.x + this.top.d.x, this.top.y + this.top.d.y)
  6269. }
  6270. this.left.isPlay || this.right.isPlay || this.top.isPlay || (this.left.isPlay = !0, this.left.alpha = 1, this.right.isPlay = !0, this.right.alpha = 1, this.top.isPlay = !0, this.top.alpha = 1), this.cNum = this.left.cNum + this.right.cNum + this.top.cNum, console.log(this.cNum), 6 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || this.top.isPlay || (this.left.isPlay = this.right.isPlay = this.top.isPlay = !0, this.left.alpha = this.right.alpha = this.top.alpha = 1)
  6271. }
  6272. }, b.prototype.changeLeft = function() {
  6273. switch (this.left.cNum) {
  6274. case 0:
  6275. this.left.rotations = 0, this.left.bg.init(), this.left.d.rotation = 270, this.left.r.rotation = 90, this.left.speed = 6, this.left.isPlay = !1, this.left.alpha = .5;
  6276. break;
  6277. case 1:
  6278. this.left.isPlay = !1, this.left.alpha = .5
  6279. }
  6280. }, b.prototype.changeRight = function() {
  6281. switch (this.right.cNum) {
  6282. case 0:
  6283. this.right.rotations = 0, this.right.d.rotation = 90, this.right.speed = -5, this.right.bg.init(), this.right.alpha = .5, this.right.isPlay = !1;
  6284. break;
  6285. case 1:
  6286. this.right.alpha = .5, this.right.isPlay = !1
  6287. }
  6288. }, b.prototype.changeTop = function() {
  6289. switch (this.top.cNum) {
  6290. case 0:
  6291. this.top.rotations = 0, this.top.bg.init(), this.top.d.rotation = 60, this.top.speed = 6, this.top.isPlay = !1, this.top.alpha = .5;
  6292. break;
  6293. case 1:
  6294. this.top.isPlay = !1, this.top.alpha = .5
  6295. }
  6296. }, b.prototype.createFx = function(a, b) {
  6297. var d, c = Fw.tools.createBitmap(c, "runFx");
  6298. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6299. scaleX: 8,
  6300. scaleY: 8,
  6301. rotation: 360,
  6302. alpha: 0
  6303. }, 500).call(function() {
  6304. d.removeChild(c)
  6305. })
  6306. }, b.prototype.createFx_Over = function(a, b) {
  6307. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6308. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6309. alpha: 0
  6310. }, 100).wait(100).to({
  6311. alpha: .6
  6312. }, 100).wait(100).to({
  6313. alpha: 0
  6314. }, 100).call(function() {
  6315. d.removeChild(c)
  6316. })
  6317. }, b.prototype.start = function() {
  6318. this.left.alpha = 1, this.right.alpha = 1, this.top.alpha = 1, this.left.bg.init(), this.right.bg.init(), this.top.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.top.cNum = 0, this.top.rotations = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !0, this.top.isPlay = !0, this.left.speed = 5, this.right.speed = 5, this.top.speed = 5, this.left.r.rotation = 30, this.right.r.rotation = 30, this.top.r.rotation = 30, this.left.d.rotation = 0, this.right.d.rotation = 0, this.top.d.rotation = 0, this.next()
  6319. }, b.prototype.stop = function() {
  6320. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6321. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6322. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed)), this.top.isPlay && (this.top.r.rotation += this.top.speed, 360 <= this.top.rotations && (this.top.bg.remove() || this.over(), this.top.rotations = 0), GameData.resultRotation(this.top.r), this.top.rotations += Math.abs(this.top.speed))
  6323. }, b.prototype.next = function() {
  6324. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6325. }, b.prototype.over = function() {
  6326. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6327. }, b.prototype.win = function() {
  6328. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6329. }, b
  6330. }(egret.Sprite), level_15.prototype.__class__ = "level_15", __extends = this.__extends || function(a, b) {
  6331. function c() {
  6332. this.constructor = a
  6333. }
  6334. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6335. c.prototype = b.prototype, a.prototype = new c
  6336. }, level_16 = function(a) {
  6337. function b() {
  6338. a.call(this), this.cNum = 0, this.top = new Container(2, "y7", "ed7", "es7"), this.left = new Container(2, "y8", "ed8", "es8"), this.right = new Container(3, "y0", "ed0", "es0"), this.addChild(this.top), this.top.name = "top", this.top.touchEnabled = !0, Fw.L_Positioning.StageAlign(this.top, {
  6339. centerX: !0
  6340. }), this.top.y = settings.level13_18.sy, this.addChild(this.left), this.left.y = settings.level13_18.xy, this.addChild(this.right), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.y = settings.level13_18.xy, this.left.name = "left", this.left.touchEnabled = !0, this.right.touchEnabled = !0, this.right.name = "right"
  6341. }
  6342. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6343. if (!UI._This.isStop) {
  6344. if ("left" == a.target.name && a.target.isPlay) {
  6345. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  6346. this.changeLeft(), this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  6347. } else if ("right" == a.target.name && a.target.isPlay) {
  6348. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  6349. this.changeRight(), this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  6350. } else if ("top" == a.target.name && a.target.isPlay) {
  6351. if (!GameData.RotationChange(this.top.r.rotation, this.top.d.rotation, 15)) return this.createFx_Over(this.top.x + this.top.d.x, this.top.y + this.top.d.y), void this.over();
  6352. this.changeTop(), this.top.cNum += 1, this.createFx(this.top.x + this.top.d.x, this.top.y + this.top.d.y)
  6353. }
  6354. this.cNum = this.left.cNum + this.right.cNum + this.top.cNum, console.log(this.cNum), 9 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || this.top.isPlay || (this.left.isPlay = this.right.isPlay = this.top.isPlay = !0, this.left.alpha = this.right.alpha = this.top.alpha = 1)
  6355. }
  6356. }, b.prototype.changeLeft = function() {
  6357. switch (this.left.cNum) {
  6358. case 0:
  6359. this.left.speed = 5, this.left.d.rotation = 180, this.left.r.rotation = 60;
  6360. break;
  6361. case 1:
  6362. this.left.speed = -5, this.left.d.rotation = 270, this.left.r.rotation = 30, this.left.bg.init();
  6363. break;
  6364. case 2:
  6365. this.left.isPlay = !1, this.left.alpha = .5, this.right.isPlay = !0, this.right.alpha = 1, this.top.isPlay = !0, this.top.alpha = 1
  6366. }
  6367. }, b.prototype.changeRight = function() {
  6368. switch (this.right.cNum) {
  6369. case 0:
  6370. this.right.d.rotation = 120, this.right.r.rotation = 80, this.right.speed = -5, this.right.bg.init();
  6371. break;
  6372. case 1:
  6373. this.right.r.rotation = 80, this.right.speed = 6, this.right.bg.init();
  6374. break;
  6375. case 2:
  6376. this.right.isPlay = !1, this.right.alpha = .5
  6377. }
  6378. }, b.prototype.changeTop = function() {
  6379. switch (this.top.cNum) {
  6380. case 0:
  6381. this.top.d.rotation = 60, this.top.speed = 6, this.top.bg.init();
  6382. break;
  6383. case 1:
  6384. this.top.rotations = 180, this.top.r.rotation = 270, this.top.bg.init();
  6385. break;
  6386. case 2:
  6387. this.top.isPlay = !1, this.top.alpha = .5
  6388. }
  6389. }, b.prototype.createFx = function(a, b) {
  6390. var d, c = Fw.tools.createBitmap(c, "runFx");
  6391. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6392. scaleX: 8,
  6393. scaleY: 8,
  6394. rotation: 360,
  6395. alpha: 0
  6396. }, 500).call(function() {
  6397. d.removeChild(c)
  6398. })
  6399. }, b.prototype.createFx_Over = function(a, b) {
  6400. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6401. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6402. alpha: 0
  6403. }, 100).wait(100).to({
  6404. alpha: .6
  6405. }, 100).wait(100).to({
  6406. alpha: 0
  6407. }, 100).call(function() {
  6408. d.removeChild(c)
  6409. })
  6410. }, b.prototype.start = function() {
  6411. this.left.alpha = 1, this.right.alpha = .5, this.top.alpha = .5, this.left.bg.init(), this.right.bg.init(), this.top.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.top.cNum = 0, this.top.rotations = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !1, this.top.isPlay = !1, this.left.speed = 1, this.right.speed = 5, this.top.speed = -5, this.left.r.rotation = 60, this.right.r.rotation = 230, this.top.r.rotation = 140, this.left.d.rotation = 90, this.right.d.rotation = 30, this.top.d.rotation = 80, this.next()
  6412. }, b.prototype.stop = function() {
  6413. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6414. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6415. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed)), this.top.isPlay && (this.top.r.rotation += this.top.speed, 360 <= this.top.rotations && (this.top.bg.remove() || this.over(), this.top.rotations = 0), GameData.resultRotation(this.top.r), this.top.rotations += Math.abs(this.top.speed))
  6416. }, b.prototype.next = function() {
  6417. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6418. }, b.prototype.over = function() {
  6419. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6420. }, b.prototype.win = function() {
  6421. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6422. }, b
  6423. }(egret.Sprite), level_16.prototype.__class__ = "level_16", __extends = this.__extends || function(a, b) {
  6424. function c() {
  6425. this.constructor = a
  6426. }
  6427. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6428. c.prototype = b.prototype, a.prototype = new c
  6429. }, level_17 = function(a) {
  6430. function b() {
  6431. a.call(this), this.cNum = 0, this.top = new Container(4, "y2", "ed2", "es2"), this.left = new Container(4, "y3", "ed3", "es3"), this.right = new Container(4, "y1", "ed1", "es1"), this.addChild(this.top), this.top.name = "top", this.top.touchEnabled = !0, Fw.L_Positioning.StageAlign(this.top, {
  6432. centerX: !0
  6433. }), this.top.y = settings.level13_18.sy, this.addChild(this.left), this.left.y = settings.level13_18.xy, this.addChild(this.right), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.y = settings.level13_18.xy, this.left.name = "left", this.left.touchEnabled = !0, this.right.touchEnabled = !0, this.right.name = "right"
  6434. }
  6435. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6436. if (!UI._This.isStop) {
  6437. if ("left" == a.target.name && a.target.isPlay) {
  6438. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  6439. this.changeLeft(), this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  6440. } else if ("right" == a.target.name && a.target.isPlay) {
  6441. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  6442. this.changeRight(), this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  6443. } else if ("top" == a.target.name && a.target.isPlay) {
  6444. if (!GameData.RotationChange(this.top.r.rotation, this.top.d.rotation, 15)) return this.createFx_Over(this.top.x + this.top.d.x, this.top.y + this.top.d.y), void this.over();
  6445. this.changeTop(), this.top.cNum += 1, this.createFx(this.top.x + this.top.d.x, this.top.y + this.top.d.y)
  6446. }
  6447. this.cNum = this.left.cNum + this.right.cNum + this.top.cNum, console.log(this.cNum), 9 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || this.top.isPlay || (this.left.isPlay = this.right.isPlay = this.top.isPlay = !0, this.left.alpha = this.right.alpha = this.top.alpha = 1)
  6448. }
  6449. }, b.prototype.changeLeft = function() {
  6450. switch (this.left.cNum) {
  6451. case 0:
  6452. this.left.speed = -5, this.left.d.rotation = 180, this.left.r.rotation = 60;
  6453. break;
  6454. case 1:
  6455. this.left.speed = 6, this.left.d.rotation = 270, this.left.r.rotation = 30, this.top.bg.init(), this.top.rotations = 0;
  6456. break;
  6457. case 2:
  6458. this.left.isPlay = !1, this.left.alpha = .5
  6459. }
  6460. }, b.prototype.changeRight = function() {
  6461. switch (this.right.cNum) {
  6462. case 0:
  6463. this.right.d.rotation = 270, this.right.r.rotation = 30, this.right.speed = 5;
  6464. break;
  6465. case 1:
  6466. this.right.r.rotation = 80, this.right.speed = -6, this.left.rotations = 0, this.left.bg.init();
  6467. break;
  6468. case 2:
  6469. this.right.isPlay = !1, this.right.alpha = .5
  6470. }
  6471. }, b.prototype.changeTop = function() {
  6472. switch (this.top.cNum) {
  6473. case 0:
  6474. this.top.d.rotation = 60, this.top.speed = 6;
  6475. break;
  6476. case 1:
  6477. this.top.rotations = 180, this.top.r.rotation = 270;
  6478. break;
  6479. case 2:
  6480. this.top.isPlay = !1, this.top.alpha = .5
  6481. }
  6482. }, b.prototype.createFx = function(a, b) {
  6483. var d, c = Fw.tools.createBitmap(c, "runFx");
  6484. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6485. scaleX: 8,
  6486. scaleY: 8,
  6487. rotation: 360,
  6488. alpha: 0
  6489. }, 500).call(function() {
  6490. d.removeChild(c)
  6491. })
  6492. }, b.prototype.createFx_Over = function(a, b) {
  6493. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6494. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6495. alpha: 0
  6496. }, 100).wait(100).to({
  6497. alpha: .6
  6498. }, 100).wait(100).to({
  6499. alpha: 0
  6500. }, 100).call(function() {
  6501. d.removeChild(c)
  6502. })
  6503. }, b.prototype.start = function() {
  6504. this.left.alpha = 1, this.right.alpha = 1, this.top.alpha = 1, this.left.bg.init(), this.right.bg.init(), this.top.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.top.cNum = 0, this.top.rotations = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !0, this.top.isPlay = !0, this.left.speed = 5, this.right.speed = -5, this.top.speed = 5, this.left.d.rotation = 30, this.left.r.rotation = 0, this.right.d.rotation = 60, this.right.r.rotation = 0, this.top.d.rotation = 90, this.top.r.rotation = 0, this.next()
  6505. }, b.prototype.stop = function() {
  6506. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6507. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6508. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed)), this.top.isPlay && (this.top.r.rotation += this.top.speed, 360 <= this.top.rotations && (this.top.bg.remove() || this.over(), this.top.rotations = 0), GameData.resultRotation(this.top.r), this.top.rotations += Math.abs(this.top.speed))
  6509. }, b.prototype.next = function() {
  6510. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6511. }, b.prototype.over = function() {
  6512. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6513. }, b.prototype.win = function() {
  6514. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6515. }, b
  6516. }(egret.Sprite), level_17.prototype.__class__ = "level_17", __extends = this.__extends || function(a, b) {
  6517. function c() {
  6518. this.constructor = a
  6519. }
  6520. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6521. c.prototype = b.prototype, a.prototype = new c
  6522. }, level_18 = function(a) {
  6523. function b() {
  6524. a.call(this), this.cNum = 0, this.top = new Container(4, "y5", "ed5", "es5"), this.left = new Container(4, "y3", "ed3", "es3"), this.right = new Container(4, "y4", "ed4", "es4"), this.addChild(this.top), this.top.name = "top", this.top.touchEnabled = !0, Fw.L_Positioning.StageAlign(this.top, {
  6525. centerX: !0
  6526. }), this.top.y = settings.level13_18.sy, this.addChild(this.left), this.left.y = settings.level13_18.xy, this.addChild(this.right), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.y = settings.level13_18.xy, this.left.name = "left", this.left.touchEnabled = !0, this.right.touchEnabled = !0, this.right.name = "right"
  6527. }
  6528. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6529. if (!UI._This.isStop) {
  6530. if ("left" == a.target.name && a.target.isPlay) {
  6531. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  6532. this.changeLeft(), this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  6533. } else if ("right" == a.target.name && a.target.isPlay) {
  6534. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  6535. this.changeRight(), this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  6536. } else if ("top" == a.target.name && a.target.isPlay) {
  6537. if (!GameData.RotationChange(this.top.r.rotation, this.top.d.rotation, 15)) return this.createFx_Over(this.top.x + this.top.d.x, this.top.y + this.top.d.y), void this.over();
  6538. this.changeTop(), this.top.cNum += 1, this.createFx(this.top.x + this.top.d.x, this.top.y + this.top.d.y)
  6539. }
  6540. this.cNum = this.left.cNum + this.right.cNum + this.top.cNum, console.log(this.cNum), 9 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || this.top.isPlay || (this.left.isPlay = this.right.isPlay = this.top.isPlay = !0, this.left.alpha = this.right.alpha = this.top.alpha = 1)
  6541. }
  6542. }, b.prototype.changeLeft = function() {
  6543. switch (this.left.cNum) {
  6544. case 0:
  6545. this.left.d.rotation = 270, this.left.r.rotation = 30, this.left.speed = 6, this.left.isPlay = !1, this.left.alpha = .5, this.right.isPlay = !0, this.right.alpha = 1;
  6546. break;
  6547. case 1:
  6548. this.left.d.rotation = 60, this.left.speed = -6, this.right.isPlay = !0, this.right.alpha = 1, this.left.isPlay = !1, this.left.alpha = .5;
  6549. break;
  6550. case 2:
  6551. this.left.isPlay = !1, this.left.alpha = .5, this.right.isPlay = !0, this.right.alpha = 1
  6552. }
  6553. }, b.prototype.changeRight = function() {
  6554. switch (this.right.cNum) {
  6555. case 0:
  6556. this.right.speed = -5, this.right.d.rotation = 180, this.right.r.rotation = 60, this.right.isPlay = !1, this.right.alpha = .5, this.top.isPlay = !0, this.top.alpha = 1;
  6557. break;
  6558. case 1:
  6559. this.right.speed = 6, this.right.d.rotation = 270, this.right.r.rotation = 30, this.right.isPlay = !1, this.right.alpha = .5, this.top.isPlay = !0, this.top.alpha = 1;
  6560. break;
  6561. case 2:
  6562. this.right.isPlay = !1, this.right.alpha = .5, this.top.isPlay = !0, this.top.alpha = 1
  6563. }
  6564. }, b.prototype.changeTop = function() {
  6565. switch (this.top.cNum) {
  6566. case 0:
  6567. this.top.r.rotation = 190, this.top.speed = -6, this.top.isPlay = !1, this.top.alpha = .5, this.left.isPlay = !0, this.left.alpha = 1;
  6568. break;
  6569. case 1:
  6570. this.top.r.rotation = 270, this.top.d.rotation = 20, this.top.isPlay = !1, this.top.alpha = .5, this.left.isPlay = !0, this.left.alpha = 1;
  6571. break;
  6572. case 2:
  6573. this.top.isPlay = !1, this.top.alpha = .5
  6574. }
  6575. }, b.prototype.createFx = function(a, b) {
  6576. var d, c = Fw.tools.createBitmap(c, "runFx");
  6577. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6578. scaleX: 8,
  6579. scaleY: 8,
  6580. rotation: 360,
  6581. alpha: 0
  6582. }, 500).call(function() {
  6583. d.removeChild(c)
  6584. })
  6585. }, b.prototype.createFx_Over = function(a, b) {
  6586. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6587. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6588. alpha: 0
  6589. }, 100).wait(100).to({
  6590. alpha: .6
  6591. }, 100).wait(100).to({
  6592. alpha: 0
  6593. }, 100).call(function() {
  6594. d.removeChild(c)
  6595. })
  6596. }, b.prototype.start = function() {
  6597. this.left.alpha = 1, this.right.alpha = .5, this.top.alpha = .5, this.left.bg.init(), this.right.bg.init(), this.top.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.top.cNum = 0, this.top.rotations = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !1, this.top.isPlay = !1, this.left.speed = 5, this.right.speed = -5, this.top.speed = 5, this.left.d.rotation = 90, this.left.r.rotation = 0, this.right.d.rotation = 60, this.right.r.rotation = 0, this.top.d.rotation = 90, this.top.r.rotation = 0, this.next()
  6598. }, b.prototype.stop = function() {
  6599. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6600. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6601. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed)), this.top.isPlay && (this.top.r.rotation += this.top.speed, 360 <= this.top.rotations && (this.top.bg.remove() || this.over(), this.top.rotations = 0), GameData.resultRotation(this.top.r), this.top.rotations += Math.abs(this.top.speed))
  6602. }, b.prototype.next = function() {
  6603. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6604. }, b.prototype.over = function() {
  6605. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6606. }, b.prototype.win = function() {
  6607. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6608. }, b
  6609. }(egret.Sprite), level_18.prototype.__class__ = "level_18", __extends = this.__extends || function(a, b) {
  6610. function c() {
  6611. this.constructor = a
  6612. }
  6613. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6614. c.prototype = b.prototype, a.prototype = new c
  6615. }, level_19 = function(a) {
  6616. function b() {
  6617. a.call(this), this.cNum = 0, this.top = new Container(4, "y6", "ed6", "es6"), this.left = new Container(4, "y5", "ed5", "es5"), this.right = new Container(4, "y4", "ed4", "es4"), this.addChild(this.top), this.top.name = "top", this.top.touchEnabled = !0, Fw.L_Positioning.StageAlign(this.top, {
  6618. centerX: !0
  6619. }), this.top.y = settings.level13_18.sy, this.addChild(this.left), this.left.y = settings.level13_18.xy, this.addChild(this.right), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.y = settings.level13_18.xy, this.left.name = "left", this.left.touchEnabled = !0, this.right.touchEnabled = !0, this.right.name = "right"
  6620. }
  6621. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6622. if (!UI._This.isStop) {
  6623. if ("left" == a.target.name && a.target.isPlay) {
  6624. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  6625. this.changeLeft(), this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  6626. } else if ("right" == a.target.name && a.target.isPlay) {
  6627. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  6628. this.changeRight(), this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  6629. } else if ("top" == a.target.name && a.target.isPlay) {
  6630. if (!GameData.RotationChange(this.top.r.rotation, this.top.d.rotation, 15)) return this.createFx_Over(this.top.x + this.top.d.x, this.top.y + this.top.d.y), void this.over();
  6631. this.changeTop(), this.top.cNum += 1, this.createFx(this.top.x + this.top.d.x, this.top.y + this.top.d.y)
  6632. }
  6633. this.cNum = this.left.cNum + this.right.cNum + this.top.cNum, console.log(this.cNum), 10 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || this.top.isPlay || (this.left.isPlay = this.right.isPlay = this.top.isPlay = !0, this.left.alpha = this.right.alpha = this.top.alpha = 1)
  6634. }
  6635. }, b.prototype.changeLeft = function() {
  6636. switch (this.left.cNum) {
  6637. case 0:
  6638. this.left.d.rotation = 130, this.left.speed = 4;
  6639. break;
  6640. case 1:
  6641. this.left.d.rotation = 220, this.left.speed = -5;
  6642. break;
  6643. case 2:
  6644. this.left.d.rotation = Math.floor(60 * Math.random()) + 150, this.left.speed = 6;
  6645. break;
  6646. case 3:
  6647. this.right.isPlay = !0, this.right.alpha = 1, this.left.isPlay = !1, this.left.alpha = .5
  6648. }
  6649. }, b.prototype.changeRight = function() {
  6650. switch (this.right.cNum) {
  6651. case 0:
  6652. this.right.d.rotation = Math.floor(40 * Math.random()) + 200, this.right.speed = 5;
  6653. break;
  6654. case 1:
  6655. this.right.r.rotation = this.right.d.rotation - 60, this.right.speed = -5, this.top.isPlay = !0, this.top.alpha = 1;
  6656. break;
  6657. case 2:
  6658. this.right.isPlay = !1, this.right.alpha = .5
  6659. }
  6660. }, b.prototype.changeTop = function() {
  6661. switch (this.top.cNum) {
  6662. case 0:
  6663. this.top.d.rotation = Math.floor(60 * Math.random()) + 90, this.top.r.rotation = this.top.d.rotation + 30, this.top.speed = 5;
  6664. break;
  6665. case 3:
  6666. this.top.d.rotation = Math.floor(30 * Math.random()) + 100, this.top.r.rotation = Math.floor(30 * Math.random()) + 60, this.top.speed = -5;
  6667. case 2:
  6668. this.top.isPlay = !1, this.top.alpha = .5
  6669. }
  6670. }, b.prototype.createFx = function(a, b) {
  6671. var d, c = Fw.tools.createBitmap(c, "runFx");
  6672. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6673. scaleX: 8,
  6674. scaleY: 8,
  6675. rotation: 360,
  6676. alpha: 0
  6677. }, 500).call(function() {
  6678. d.removeChild(c)
  6679. })
  6680. }, b.prototype.createFx_Over = function(a, b) {
  6681. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6682. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6683. alpha: 0
  6684. }, 100).wait(100).to({
  6685. alpha: .6
  6686. }, 100).wait(100).to({
  6687. alpha: 0
  6688. }, 100).call(function() {
  6689. d.removeChild(c)
  6690. })
  6691. }, b.prototype.start = function() {
  6692. this.left.alpha = 1, this.right.alpha = .5, this.top.alpha = .5, this.left.bg.init(), this.right.bg.init(), this.top.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.top.cNum = 0, this.top.rotations = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !1, this.top.isPlay = !1, this.left.speed = 5, this.right.speed = -5, this.top.speed = 5, this.left.d.rotation = 90, this.left.r.rotation = 0, this.right.d.rotation = 60, this.right.r.rotation = 0, this.top.d.rotation = 90, this.top.r.rotation = 0, this.next()
  6693. }, b.prototype.stop = function() {
  6694. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6695. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6696. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed)), this.top.isPlay && (this.top.r.rotation += this.top.speed, 360 <= this.top.rotations && (this.top.bg.remove() || this.over(), this.top.rotations = 0), GameData.resultRotation(this.top.r), this.top.rotations += Math.abs(this.top.speed))
  6697. }, b.prototype.next = function() {
  6698. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6699. }, b.prototype.over = function() {
  6700. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6701. }, b.prototype.win = function() {
  6702. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6703. }, b
  6704. }(egret.Sprite), level_19.prototype.__class__ = "level_19", __extends = this.__extends || function(a, b) {
  6705. function c() {
  6706. this.constructor = a
  6707. }
  6708. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6709. c.prototype = b.prototype, a.prototype = new c
  6710. }, level_2 = function(a) {
  6711. function b() {
  6712. a.call(this), this.rotations = 0, this.speed = 2, this.bg = new GameBGView(4), this.addChild(this.bg), Fw.L_Positioning.StageAlign(this.bg, {
  6713. centerX: !0,
  6714. centerY: !0
  6715. }), this.cNum = 0, this.b = Fw.tools.createBitmap(this.b, "y1", !1), this.b.anchorX = this.b.anchorY = .5, this.b.y = this.bg.y + GameData.yY, Fw.L_Positioning.RelativeAlign(this.bg, this.b, {
  6716. centerX: !0
  6717. }), this.d = Fw.tools.createBitmap(this.d, "ed1"), this.d.anchorX = this.d.anchorY = .5, this.d.x = this.b.x, this.d.y = this.b.y, this.r = Fw.tools.createBitmap(this.r, "es1"), this.r.anchorX = this.r.anchorY = .5, this.r.x = this.d.x, this.r.y = this.d.y, this.addChild(this.b), this.addChild(this.d), this.addChild(this.r)
  6718. }
  6719. return __extends(b, a), b.prototype.onTouchBegin = function() {
  6720. if (!UI._This.isStop)
  6721. if (GameData.RotationChange(this.r.rotation, this.d.rotation, 10)) {
  6722. switch (this.cNum) {
  6723. case 0:
  6724. this.d.rotation = Math.floor(60 * Math.random()) + 90, this.speed = 3;
  6725. break;
  6726. case 1:
  6727. this.d.rotation = Math.floor(60 * Math.random()) + 270, this.speed = 4;
  6728. break;
  6729. case 2:
  6730. this.d.rotation = Math.floor(60 * Math.random()) + 150, this.speed = 4;
  6731. break;
  6732. case 3:
  6733. this.win()
  6734. }
  6735. this.cNum += 1, this.createFx(this.d.x, this.d.y)
  6736. } else this.createFx_Over(this.d.x, this.d.y), this.over()
  6737. }, b.prototype.createFx = function(a, b) {
  6738. var d, c = Fw.tools.createBitmap(c, "runFx");
  6739. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6740. scaleX: 8,
  6741. scaleY: 8,
  6742. rotation: 360,
  6743. alpha: 0
  6744. }, 500).call(function() {
  6745. d.removeChild(c)
  6746. })
  6747. }, b.prototype.createFx_Over = function(a, b) {
  6748. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6749. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6750. alpha: 0
  6751. }, 100).wait(100).to({
  6752. alpha: .6
  6753. }, 100).wait(100).to({
  6754. alpha: 0
  6755. }, 100).call(function() {
  6756. d.removeChild(c)
  6757. })
  6758. }, b.prototype.start = function() {
  6759. this.bg.init(), this.rotations = this.cNum = 0, this.speed = 2, this.d.rotation = 0, this.r.rotation = 20, this.next()
  6760. }, b.prototype.stop = function() {
  6761. this.bg.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6762. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6763. this.r.rotation += this.speed, GameData.resultRotation(this.r), this.rotations += this.speed, 360 <= this.rotations && (this.bg.remove() || this.over(), this.rotations = 0)
  6764. }, b.prototype.next = function() {
  6765. this.bg.touchEnabled = !0, this.bg.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6766. }, b.prototype.over = function() {
  6767. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6768. }, b.prototype.win = function() {
  6769. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6770. }, b
  6771. }(egret.Sprite), level_2.prototype.__class__ = "level_2", __extends = this.__extends || function(a, b) {
  6772. function c() {
  6773. this.constructor = a
  6774. }
  6775. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6776. c.prototype = b.prototype, a.prototype = new c
  6777. }, level_20 = function(a) {
  6778. function b() {
  6779. a.call(this), this.cNum = 0, this.top = new Container(4, "y6", "ed6", "es6"), this.left = new Container(3, "y7", "ed7", "es7"), this.right = new Container(3, "y8", "ed8", "es8"), this.addChild(this.top), this.top.name = "top", this.top.touchEnabled = !0, Fw.L_Positioning.StageAlign(this.top, {
  6780. centerX: !0
  6781. }), this.top.y = settings.level13_18.sy, this.addChild(this.left), this.left.y = settings.level13_18.xy, this.addChild(this.right), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.y = settings.level13_18.xy, this.left.name = "left", this.left.touchEnabled = !0, this.right.touchEnabled = !0, this.right.name = "right"
  6782. }
  6783. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6784. if (!UI._This.isStop) {
  6785. if ("left" == a.target.name && a.target.isPlay) {
  6786. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  6787. this.changeLeft(), this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  6788. } else if ("right" == a.target.name && a.target.isPlay) {
  6789. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  6790. this.changeRight(), this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  6791. } else if ("top" == a.target.name && a.target.isPlay) {
  6792. if (!GameData.RotationChange(this.top.r.rotation, this.top.d.rotation, 15)) return this.createFx_Over(this.top.x + this.top.d.x, this.top.y + this.top.d.y), void this.over();
  6793. this.changeTop(), this.top.cNum += 1, this.createFx(this.top.x + this.top.d.x, this.top.y + this.top.d.y)
  6794. }
  6795. this.cNum = this.left.cNum + this.right.cNum + this.top.cNum, console.log(this.cNum), 11 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || this.top.isPlay || (this.left.isPlay = this.right.isPlay = this.top.isPlay = !0, this.left.alpha = this.right.alpha = this.top.alpha = 1)
  6796. }
  6797. }, b.prototype.changeLeft = function() {
  6798. switch (this.left.cNum) {
  6799. case 0:
  6800. this.left.bg.init(), this.left.d.rotation = 90, this.left.r.rotation = 0;
  6801. break;
  6802. case 1:
  6803. this.left.d.rotation = 45, this.left.r.rotation = 0, this.left.speed = -4, this.left.bg.init(), this.left.isPlay = !1, this.left.alpha = .5, this.left.isPlay || this.right.isPlay || (this.left.isPlay = !0, this.top.isPlay = !0, this.left.alpha = 1, this.top.alpha = 1);
  6804. break;
  6805. case 2:
  6806. this.left.bg.init(), this.left.d.rotation = 270, this.left.r.rotation = 30, this.left.speed = -4;
  6807. break;
  6808. case 3:
  6809. this.left.isPlay = !1, this.left.alpha = .5, this.left.cNum += 1
  6810. }
  6811. }, b.prototype.changeRight = function() {
  6812. switch (this.right.cNum) {
  6813. case 0:
  6814. this.right.d.rotation = 50, this.right.r.rotation = 30, this.right.bg.init();
  6815. break;
  6816. case 1:
  6817. this.right.d.rotation = 250, this.right.r.rotation = 330, this.right.speed = 4, this.right.bg.init();
  6818. break;
  6819. case 2:
  6820. this.right.isPlay = !1, this.right.alpha = .5, this.right.d.rotation = 180, this.right.r.rotation = 90, this.right.rotations = 0, this.right.speed = 6, this.left.isPlay || this.right.isPlay || (this.left.isPlay = !0, this.top.isPlay = !0, this.left.alpha = 1, this.top.alpha = 1);
  6821. break;
  6822. case 3:
  6823. this.right.isPlay = !1, this.right.alpha = .5
  6824. }
  6825. }, b.prototype.changeTop = function() {
  6826. switch (this.top.cNum) {
  6827. case 0:
  6828. this.top.d.rotation = this.left.r.rotation + Math.floor(60 * Math.random()) + 40, this.top.speed = -5;
  6829. break;
  6830. case 1:
  6831. this.top.d.rotation = 45, this.top.r.rotation = 0, this.top.speed = -4, this.top.bg.init(), this.top.rotations = 0;
  6832. break;
  6833. case 2:
  6834. this.top.isPlay = !1, this.top.alpha = .5
  6835. }
  6836. }, b.prototype.createFx = function(a, b) {
  6837. var d, c = Fw.tools.createBitmap(c, "runFx");
  6838. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6839. scaleX: 8,
  6840. scaleY: 8,
  6841. rotation: 360,
  6842. alpha: 0
  6843. }, 500).call(function() {
  6844. d.removeChild(c)
  6845. })
  6846. }, b.prototype.createFx_Over = function(a, b) {
  6847. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6848. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6849. alpha: 0
  6850. }, 100).wait(100).to({
  6851. alpha: .6
  6852. }, 100).wait(100).to({
  6853. alpha: 0
  6854. }, 100).call(function() {
  6855. d.removeChild(c)
  6856. })
  6857. }, b.prototype.start = function() {
  6858. this.left.alpha = 1, this.right.alpha = 1, this.top.alpha = .5, this.left.bg.init(), this.right.bg.init(), this.top.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.top.cNum = 0, this.top.rotations = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !0, this.top.isPlay = !1, this.left.speed = 5, this.right.speed = -5, this.top.speed = 5, this.left.d.rotation = 90, this.left.r.rotation = 0, this.right.d.rotation = 60, this.right.r.rotation = 0, this.top.d.rotation = 90, this.top.r.rotation = 0, this.next()
  6859. }, b.prototype.stop = function() {
  6860. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6861. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6862. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed)), this.top.isPlay && (this.top.r.rotation += this.top.speed, 360 <= this.top.rotations && (this.top.bg.remove() || this.over(), this.top.rotations = 0), GameData.resultRotation(this.top.r), this.top.rotations += Math.abs(this.top.speed))
  6863. }, b.prototype.next = function() {
  6864. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.top.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6865. }, b.prototype.over = function() {
  6866. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6867. }, b.prototype.win = function() {
  6868. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6869. }, b
  6870. }(egret.Sprite), level_20.prototype.__class__ = "level_20", __extends = this.__extends || function(a, b) {
  6871. function c() {
  6872. this.constructor = a
  6873. }
  6874. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6875. c.prototype = b.prototype, a.prototype = new c
  6876. }, level_21 = function(a) {
  6877. function b() {
  6878. a.call(this), this.cNum = 0, this.topLeft = new Container(4, "y5", "ed5", "es5"), this.topRight = new Container(4, "y6", "ed6", "es6"), this.bottomLeft = new Container(4, "y7", "ed7", "es7"), this.bottomRight = new Container(4, "y8", "ed8", "es8"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  6879. }
  6880. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6881. if (!UI._This.isStop) {
  6882. if ("topLeft" == a.target.name && a.target.isPlay) {
  6883. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, 15)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  6884. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  6885. } else if ("topRight" == a.target.name && a.target.isPlay) {
  6886. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, 15)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  6887. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  6888. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  6889. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, 15)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  6890. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  6891. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  6892. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, 15)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  6893. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  6894. }
  6895. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 8 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0, this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1)
  6896. }
  6897. }, b.prototype.changeTopLeft = function() {
  6898. switch (this.topLeft.cNum) {
  6899. case 0:
  6900. this.topLeft.d.rotation = Math.floor(60 * Math.random()) + 180;
  6901. break;
  6902. case 1:
  6903. this.topLeft.isPlay = !1, this.topLeft.alpha = .5
  6904. }
  6905. }, b.prototype.changeTopRight = function() {
  6906. switch (this.topRight.cNum) {
  6907. case 0:
  6908. this.topRight.d.rotation = Math.floor(60 * Math.random()) + 90, this.topRight.speed = 5;
  6909. break;
  6910. case 1:
  6911. this.topRight.isPlay = !1, this.topRight.alpha = .5
  6912. }
  6913. }, b.prototype.changeBottomLeft = function() {
  6914. switch (this.bottomLeft.cNum) {
  6915. case 0:
  6916. this.bottomLeft.d.rotation = Math.floor(60 * Math.random()) + 90, this.bottomLeft.speed = 4, this.bottomLeft.bg.init();
  6917. break;
  6918. case 1:
  6919. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5
  6920. }
  6921. }, b.prototype.changeBottomRight = function() {
  6922. switch (this.bottomRight.cNum) {
  6923. case 0:
  6924. this.bottomRight.d.rotation = Math.floor(60 * Math.random()) + 270, this.bottomRight.speed = 4, this.bottomRight.bg.init();
  6925. break;
  6926. case 1:
  6927. this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5
  6928. }
  6929. }, b.prototype.createFx = function(a, b) {
  6930. var d, c = Fw.tools.createBitmap(c, "runFx");
  6931. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  6932. scaleX: 8,
  6933. scaleY: 8,
  6934. rotation: 360,
  6935. alpha: 0
  6936. }, 500).call(function() {
  6937. d.removeChild(c)
  6938. })
  6939. }, b.prototype.createFx_Over = function(a, b) {
  6940. var d, c = Fw.tools.createBitmap(c, "loseFx");
  6941. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  6942. alpha: 0
  6943. }, 100).wait(100).to({
  6944. alpha: .6
  6945. }, 100).wait(100).to({
  6946. alpha: 0
  6947. }, 100).call(function() {
  6948. d.removeChild(c)
  6949. })
  6950. }, b.prototype.start = function() {
  6951. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = 1, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.topLeft.isPlay = !0, this.topRight.isPlay = !0, this.bottomLeft.isPlay = !0, this.bottomRight.isPlay = !0, this.topLeft.d.rotation = 30, this.topRight.d.rotation = 60, this.bottomLeft.d.rotation = 90, this.bottomRight.d.rotation = 120, this.topLeft.r.rotation = 0, this.topRight.r.rotation = 0, this.bottomLeft.r.rotation = 0, this.bottomRight.r.rotation = 0, this.topLeft.speed = 4, this.topRight.speed = 4, this.bottomLeft.speed = 4, this.bottomRight.speed = 4, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  6952. }, b.prototype.stop = function() {
  6953. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  6954. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  6955. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  6956. }, b.prototype.next = function() {
  6957. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  6958. }, b.prototype.over = function() {
  6959. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  6960. }, b.prototype.win = function() {
  6961. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  6962. }, b
  6963. }(egret.Sprite), level_21.prototype.__class__ = "level_21", __extends = this.__extends || function(a, b) {
  6964. function c() {
  6965. this.constructor = a
  6966. }
  6967. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  6968. c.prototype = b.prototype, a.prototype = new c
  6969. }, level_22 = function(a) {
  6970. function b() {
  6971. a.call(this), this.cNum = 0, this.topLeft = new Container(4, "y1", "ed1", "es1"), this.topRight = new Container(4, "y2", "ed2", "es2"), this.bottomLeft = new Container(4, "y3", "ed3", "es3"), this.bottomRight = new Container(4, "y4", "ed4", "es4"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  6972. }
  6973. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  6974. if (!UI._This.isStop) {
  6975. if ("topLeft" == a.target.name && a.target.isPlay) {
  6976. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, 15)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  6977. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  6978. } else if ("topRight" == a.target.name && a.target.isPlay) {
  6979. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, 15)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  6980. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  6981. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  6982. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, 15)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  6983. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  6984. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  6985. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, 15)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  6986. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  6987. }
  6988. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 8 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0, this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1)
  6989. }
  6990. }, b.prototype.changeTopLeft = function() {
  6991. switch (this.topLeft.cNum) {
  6992. case 0:
  6993. this.topLeft.d.rotation = Math.floor(60 * Math.random()) + 150, this.topLeft.speed = -5;
  6994. break;
  6995. case 1:
  6996. this.topLeft.isPlay = !1, this.topLeft.alpha = .5
  6997. }
  6998. }, b.prototype.changeTopRight = function() {
  6999. switch (this.topRight.cNum) {
  7000. case 0:
  7001. this.topRight.d.rotation = 270, this.topRight.speed = 5;
  7002. break;
  7003. case 1:
  7004. this.topRight.isPlay = !1, this.topRight.alpha = .5, this.bottomRight.bg.init(), this.bottomLeft.bg.init()
  7005. }
  7006. }, b.prototype.changeBottomLeft = function() {
  7007. switch (this.bottomLeft.cNum) {
  7008. case 0:
  7009. this.bottomLeft.d.rotation = Math.floor(60 * Math.random()) + 150, this.bottomLeft.speed = 5;
  7010. break;
  7011. case 1:
  7012. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5
  7013. }
  7014. }, b.prototype.changeBottomRight = function() {
  7015. switch (this.bottomRight.cNum) {
  7016. case 0:
  7017. this.bottomRight.d.rotation = 0, this.bottomRight.r.rotation = 90, this.bottomRight.speed = -5;
  7018. break;
  7019. case 1:
  7020. this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5
  7021. }
  7022. }, b.prototype.createFx = function(a, b) {
  7023. var d, c = Fw.tools.createBitmap(c, "runFx");
  7024. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7025. scaleX: 8,
  7026. scaleY: 8,
  7027. rotation: 360,
  7028. alpha: 0
  7029. }, 500).call(function() {
  7030. d.removeChild(c)
  7031. })
  7032. }, b.prototype.createFx_Over = function(a, b) {
  7033. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7034. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7035. alpha: 0
  7036. }, 100).wait(100).to({
  7037. alpha: .6
  7038. }, 100).wait(100).to({
  7039. alpha: 0
  7040. }, 100).call(function() {
  7041. d.removeChild(c)
  7042. })
  7043. }, b.prototype.start = function() {
  7044. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = 1, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.topLeft.isPlay = !0, this.topRight.isPlay = !0, this.bottomLeft.isPlay = !0, this.bottomRight.isPlay = !0, this.topLeft.d.rotation = 30, this.topRight.d.rotation = 60, this.bottomLeft.d.rotation = 90, this.bottomRight.d.rotation = 120, this.topLeft.r.rotation = 200, this.topRight.r.rotation = 180, this.bottomLeft.r.rotation = 240, this.bottomRight.r.rotation = 0, this.topLeft.speed = 5, this.topRight.speed = -5, this.bottomLeft.speed = 5, this.bottomRight.speed = -5, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  7045. }, b.prototype.stop = function() {
  7046. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  7047. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  7048. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  7049. }, b.prototype.next = function() {
  7050. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  7051. }, b.prototype.over = function() {
  7052. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  7053. }, b.prototype.win = function() {
  7054. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  7055. }, b
  7056. }(egret.Sprite), level_22.prototype.__class__ = "level_22", __extends = this.__extends || function(a, b) {
  7057. function c() {
  7058. this.constructor = a
  7059. }
  7060. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  7061. c.prototype = b.prototype, a.prototype = new c
  7062. }, level_23 = function(a) {
  7063. function b() {
  7064. a.call(this), this.cNum = 0, this.topLeft = new Container(1, "y1", "ed1", "es1"), this.topRight = new Container(4, "y3", "ed3", "es3"), this.bottomLeft = new Container(4, "y5", "ed5", "es5"), this.bottomRight = new Container(4, "y7", "ed7", "es7"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  7065. }
  7066. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  7067. if (!UI._This.isStop) {
  7068. if ("topLeft" == a.target.name && a.target.isPlay) {
  7069. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, 15)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  7070. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  7071. } else if ("topRight" == a.target.name && a.target.isPlay) {
  7072. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, 15)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  7073. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  7074. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  7075. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, 15)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  7076. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  7077. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  7078. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, 15)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  7079. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  7080. }
  7081. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 8 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0, this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1)
  7082. }
  7083. }, b.prototype.changeTopLeft = function() {
  7084. switch (this.topLeft.cNum) {
  7085. case 0:
  7086. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = Math.floor(60 * Math.random()) + 150, this.topLeft.speed = -5;
  7087. break;
  7088. case 1:
  7089. this.topLeft.isPlay = !1, this.topLeft.alpha = .5
  7090. }
  7091. }, b.prototype.changeTopRight = function() {
  7092. switch (this.topRight.cNum) {
  7093. case 0:
  7094. this.topRight.d.rotation = 270, this.topRight.r.rotation = 0, this.topRight.speed = 1;
  7095. break;
  7096. case 1:
  7097. this.topRight.isPlay = !1, this.topRight.alpha = .5
  7098. }
  7099. }, b.prototype.changeBottomLeft = function() {
  7100. switch (this.bottomLeft.cNum) {
  7101. case 0:
  7102. this.bottomLeft.d.rotation = 45, this.bottomLeft.r.rotation = 0, this.bottomLeft.speed = -5;
  7103. break;
  7104. case 1:
  7105. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5
  7106. }
  7107. }, b.prototype.changeBottomRight = function() {
  7108. switch (this.bottomRight.cNum) {
  7109. case 0:
  7110. this.bottomRight.d.rotation = 250, this.bottomRight.r.rotation = 330, this.bottomRight.speed = 4;
  7111. break;
  7112. case 1:
  7113. this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5
  7114. }
  7115. }, b.prototype.createFx = function(a, b) {
  7116. var d, c = Fw.tools.createBitmap(c, "runFx");
  7117. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7118. scaleX: 8,
  7119. scaleY: 8,
  7120. rotation: 360,
  7121. alpha: 0
  7122. }, 500).call(function() {
  7123. d.removeChild(c)
  7124. })
  7125. }, b.prototype.createFx_Over = function(a, b) {
  7126. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7127. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7128. alpha: 0
  7129. }, 100).wait(100).to({
  7130. alpha: .6
  7131. }, 100).wait(100).to({
  7132. alpha: 0
  7133. }, 100).call(function() {
  7134. d.removeChild(c)
  7135. })
  7136. }, b.prototype.start = function() {
  7137. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = 1, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.topLeft.isPlay = !0, this.topRight.isPlay = !0, this.bottomLeft.isPlay = !0, this.bottomRight.isPlay = !0, this.topLeft.d.rotation = 330, this.topRight.d.rotation = 150, this.bottomLeft.d.rotation = 90, this.bottomRight.d.rotation = 120, this.topLeft.r.rotation = 0, this.topRight.r.rotation = 230, this.bottomLeft.r.rotation = 240, this.bottomRight.r.rotation = 0, this.topLeft.speed = 1, this.topRight.speed = 5, this.bottomLeft.speed = -5, this.bottomRight.speed = 5, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  7138. }, b.prototype.stop = function() {
  7139. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  7140. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  7141. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  7142. }, b.prototype.next = function() {
  7143. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  7144. }, b.prototype.over = function() {
  7145. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  7146. }, b.prototype.win = function() {
  7147. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  7148. }, b
  7149. }(egret.Sprite), level_23.prototype.__class__ = "level_23", __extends = this.__extends || function(a, b) {
  7150. function c() {
  7151. this.constructor = a
  7152. }
  7153. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  7154. c.prototype = b.prototype, a.prototype = new c
  7155. }, level_24 = function(a) {
  7156. function b() {
  7157. a.call(this), this.cNum = 0, this.topLeft = new Container(1, "y8", "ed8", "es8"), this.topRight = new Container(1, "y6", "ed6", "es6"), this.bottomLeft = new Container(2, "y4", "ed4", "es4"), this.bottomRight = new Container(2, "y2", "ed2", "es2"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  7158. }
  7159. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  7160. if (!UI._This.isStop) {
  7161. if ("topLeft" == a.target.name && a.target.isPlay) {
  7162. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, 15)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  7163. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  7164. } else if ("topRight" == a.target.name && a.target.isPlay) {
  7165. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, 15)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  7166. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  7167. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  7168. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, 15)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  7169. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  7170. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  7171. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, 15)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  7172. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  7173. }
  7174. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 4 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0, this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1)
  7175. }
  7176. }, b.prototype.changeTopLeft = function() {
  7177. switch (this.topLeft.cNum) {
  7178. case 0:
  7179. this.topLeft.isPlay = !1, this.topLeft.alpha = .5
  7180. }
  7181. }, b.prototype.changeTopRight = function() {
  7182. switch (this.topRight.cNum) {
  7183. case 0:
  7184. this.topRight.isPlay = !1, this.topRight.alpha = .5
  7185. }
  7186. }, b.prototype.changeBottomLeft = function() {
  7187. switch (this.bottomLeft.cNum) {
  7188. case 0:
  7189. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5, this.bottomRight.rotations = 0
  7190. }
  7191. }, b.prototype.changeBottomRight = function() {
  7192. switch (this.bottomRight.cNum) {
  7193. case 0:
  7194. this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5
  7195. }
  7196. }, b.prototype.createFx = function(a, b) {
  7197. var d, c = Fw.tools.createBitmap(c, "runFx");
  7198. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7199. scaleX: 8,
  7200. scaleY: 8,
  7201. rotation: 360,
  7202. alpha: 0
  7203. }, 500).call(function() {
  7204. d.removeChild(c)
  7205. })
  7206. }, b.prototype.createFx_Over = function(a, b) {
  7207. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7208. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7209. alpha: 0
  7210. }, 100).wait(100).to({
  7211. alpha: .6
  7212. }, 100).wait(100).to({
  7213. alpha: 0
  7214. }, 100).call(function() {
  7215. d.removeChild(c)
  7216. })
  7217. }, b.prototype.start = function() {
  7218. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = 1, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.topLeft.isPlay = !0, this.topRight.isPlay = !0, this.bottomLeft.isPlay = !0, this.bottomRight.isPlay = !0, this.topLeft.d.rotation = 270, this.topRight.d.rotation = 270, this.bottomLeft.d.rotation = 130, this.bottomRight.d.rotation = 0, this.topLeft.r.rotation = 180, this.topRight.r.rotation = 90, this.bottomLeft.r.rotation = 0, this.bottomRight.r.rotation = 270, this.topLeft.speed = 6, this.topRight.speed = 6, this.bottomLeft.speed = -6, this.bottomRight.speed = 6, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  7219. }, b.prototype.stop = function() {
  7220. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  7221. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  7222. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  7223. }, b.prototype.next = function() {
  7224. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  7225. }, b.prototype.over = function() {
  7226. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  7227. }, b.prototype.win = function() {
  7228. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  7229. }, b
  7230. }(egret.Sprite), level_24.prototype.__class__ = "level_24", __extends = this.__extends || function(a, b) {
  7231. function c() {
  7232. this.constructor = a
  7233. }
  7234. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  7235. c.prototype = b.prototype, a.prototype = new c
  7236. }, level_25 = function(a) {
  7237. function b() {
  7238. a.call(this), this.maxR = 15, this.cNum = 0, this.topLeft = new Container(3, "y8", "ed8", "es8"), this.topRight = new Container(1, "y7", "ed7", "es7"), this.bottomLeft = new Container(3, "y3", "ed3", "es3"), this.bottomRight = new Container(2, "y0", "ed0", "es0"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  7239. }
  7240. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  7241. if (!UI._This.isStop) {
  7242. if ("topLeft" == a.target.name && a.target.isPlay) {
  7243. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, this.maxR)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  7244. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  7245. } else if ("topRight" == a.target.name && a.target.isPlay) {
  7246. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, this.maxR)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  7247. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  7248. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  7249. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, this.maxR)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  7250. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  7251. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  7252. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, this.maxR)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  7253. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  7254. }
  7255. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 13 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1, this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0)
  7256. }
  7257. }, b.prototype.changeTopLeft = function() {
  7258. switch (this.topLeft.cNum) {
  7259. case 0:
  7260. this.topLeft.bg.init(), this.topLeft.d.rotation = 90, this.topLeft.r.rotation = 50, this.topLeft.speed = -6;
  7261. break;
  7262. case 1:
  7263. this.topLeft.d.rotation = 180, this.topLeft.r.rotation = 270, this.topLeft.speed = 6, this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.isPlay = !1, this.topLeft.alpha = .5, this.topLeft.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topRight.isPlay = !0, this.topRight.alpha = 1);
  7264. break;
  7265. case 2:
  7266. this.topLeft.isPlay = !1, this.topLeft.alpha = .5
  7267. }
  7268. }, b.prototype.changeTopRight = function() {
  7269. switch (this.topRight.cNum) {
  7270. case 0:
  7271. this.topRight.bg.init(), this.topRight.rotations = 0, this.topRight.d.rotation = 90, this.topRight.speed = -6;
  7272. break;
  7273. case 1:
  7274. this.topRight.bg.init(), this.topRight.rotations = 0, this.topRight.d.rotation = 0, this.topRight.r.rotation = 270, this.topRight.speed = 1;
  7275. break;
  7276. case 2:
  7277. this.topRight.isPlay = !1, this.topRight.alpha = .5, this.topLeft.isPlay = !0, this.topLeft.alpha = 1, this.bottomLeft.isPlay = !0, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.bottomRight.isPlay = !0
  7278. }
  7279. }, b.prototype.changeBottomLeft = function() {
  7280. switch (this.bottomLeft.cNum) {
  7281. case 0:
  7282. this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomLeft.d.rotation = 45, this.bottomLeft.r.rotation = 0, this.bottomLeft.speed = -6;
  7283. break;
  7284. case 1:
  7285. this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomLeft.d.rotation = 150, this.bottomLeft.speed = 5, this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5, this.topLeft.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topRight.isPlay = !0, this.topRight.alpha = 1);
  7286. break;
  7287. case 2:
  7288. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5
  7289. }
  7290. }, b.prototype.changeBottomRight = function() {
  7291. switch (this.bottomRight.cNum) {
  7292. case 0:
  7293. this.bottomRight.bg.init(), this.bottomRight.rotations = 0, this.bottomRight.d.rotation = 270, this.bottomRight.r.rotation = 30, this.bottomRight.speed = -6;
  7294. break;
  7295. case 1:
  7296. this.bottomRight.bg.init(), this.bottomRight.rotations = 0, this.bottomRight.d.rotation = 90, this.bottomRight.r.rotation = 0, this.bottomRight.speed = 6, this.topLeft.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topRight.isPlay = !0, this.topRight.alpha = 1);
  7297. break;
  7298. case 2:
  7299. console.log("tttttttttt"), this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5;
  7300. break;
  7301. case 3:
  7302. this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5, this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1, this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0)
  7303. }
  7304. }, b.prototype.createFx = function(a, b) {
  7305. var d, c = Fw.tools.createBitmap(c, "runFx");
  7306. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7307. scaleX: 8,
  7308. scaleY: 8,
  7309. rotation: 360,
  7310. alpha: 0
  7311. }, 500).call(function() {
  7312. d.removeChild(c)
  7313. })
  7314. }, b.prototype.createFx_Over = function(a, b) {
  7315. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7316. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7317. alpha: 0
  7318. }, 100).wait(100).to({
  7319. alpha: .6
  7320. }, 100).wait(100).to({
  7321. alpha: 0
  7322. }, 100).call(function() {
  7323. d.removeChild(c)
  7324. })
  7325. }, b.prototype.start = function() {
  7326. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = .5, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.topLeft.isPlay = !0, this.topRight.isPlay = !1, this.bottomLeft.isPlay = !0, this.bottomRight.isPlay = !0, this.topLeft.d.rotation = 30, this.topRight.d.rotation = 0, this.bottomLeft.d.rotation = 180, this.bottomRight.d.rotation = 90, this.topLeft.r.rotation = 180, this.topRight.r.rotation = 40, this.bottomLeft.r.rotation = 200, this.bottomRight.r.rotation = 270, this.topLeft.speed = 6, this.topRight.speed = 6, this.bottomLeft.speed = -6, this.bottomRight.speed = 6, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  7327. }, b.prototype.stop = function() {
  7328. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  7329. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  7330. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  7331. }, b.prototype.next = function() {
  7332. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  7333. }, b.prototype.over = function() {
  7334. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  7335. }, b.prototype.win = function() {
  7336. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  7337. }, b
  7338. }(egret.Sprite), level_25.prototype.__class__ = "level_25", __extends = this.__extends || function(a, b) {
  7339. function c() {
  7340. this.constructor = a
  7341. }
  7342. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  7343. c.prototype = b.prototype, a.prototype = new c
  7344. }, level_26 = function(a) {
  7345. function b() {
  7346. a.call(this), this.cNum = 0, this.hitNum = 15, this.topLeft = new Container(4, "y8", "ed8", "es8"), this.topRight = new Container(4, "y3", "ed3", "es3"), this.bottomLeft = new Container(4, "y6", "ed6", "es6"), this.bottomRight = new Container(4, "y0", "ed0", "es0"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  7347. }
  7348. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  7349. if (!UI._This.isStop) {
  7350. if ("topLeft" == a.target.name && a.target.isPlay) {
  7351. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  7352. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  7353. } else if ("topRight" == a.target.name && a.target.isPlay) {
  7354. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, this.hitNum)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  7355. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  7356. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  7357. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  7358. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  7359. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  7360. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  7361. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  7362. }
  7363. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 16 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0, this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1)
  7364. }
  7365. }, b.prototype.changeTopLeft = function() {
  7366. switch (this.topLeft.cNum) {
  7367. case 0:
  7368. this.topLeft.bg.init(), this.topLeft.rotations = 0, this.topLeft.d.rotation = Math.floor(60 * Math.random()) + 180;
  7369. break;
  7370. case 1:
  7371. this.topLeft.bg.init(), this.topLeft.rotations = 0, this.topLeft.d.rotation = 0, this.topLeft.r.rotation = 90, this.topLeft.speed = -6;
  7372. break;
  7373. case 2:
  7374. this.topLeft.bg.init(), this.topLeft.rotations = 0, this.topLeft.d.rotation = 180, this.topLeft.r.rotation = 0, this.topLeft.speed = 6;
  7375. break;
  7376. case 3:
  7377. this.topLeft.isPlay = !1, this.topLeft.alpha = .5
  7378. }
  7379. }, b.prototype.changeTopRight = function() {
  7380. switch (this.topRight.cNum) {
  7381. case 0:
  7382. this.topRight.rotations = 0, this.topRight.bg.init(), this.topRight.d.rotation = Math.floor(60 * Math.random()) + 90, this.topRight.speed = 5;
  7383. break;
  7384. case 1:
  7385. this.topRight.rotations = 0, this.topRight.bg.init(), this.topRight.d.rotation = 0, this.topRight.r.rotation = 180, this.topRight.speed = 1;
  7386. break;
  7387. case 2:
  7388. this.topRight.rotations = 0, this.topRight.bg.init(), this.topRight.d.rotation = 90, this.topRight.speed = -6;
  7389. break;
  7390. case 3:
  7391. this.topRight.isPlay = !1, this.topRight.alpha = .5
  7392. }
  7393. }, b.prototype.changeBottomLeft = function() {
  7394. switch (this.bottomLeft.cNum) {
  7395. case 0:
  7396. this.bottomLeft.d.rotation = Math.floor(60 * Math.random()) + 90, this.bottomLeft.speed = 4, this.bottomLeft.rotations = 0, this.bottomLeft.bg.init();
  7397. break;
  7398. case 1:
  7399. this.bottomLeft.rotations = 0, this.bottomLeft.bg.init(), this.bottomLeft.d.rotation = 0, this.bottomLeft.r.rotation = 300, this.bottomLeft.speed = 6;
  7400. break;
  7401. case 2:
  7402. this.bottomLeft.rotations = 0, this.bottomLeft.bg.init(), this.bottomLeft.d.rotation = 90, this.bottomLeft.speed = -6;
  7403. break;
  7404. case 3:
  7405. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5
  7406. }
  7407. }, b.prototype.changeBottomRight = function() {
  7408. switch (this.bottomRight.cNum) {
  7409. case 0:
  7410. this.bottomRight.d.rotation = Math.floor(60 * Math.random()) + 270, this.bottomRight.speed = 4, this.bottomRight.rotations = 0, this.bottomRight.bg.init();
  7411. break;
  7412. case 1:
  7413. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.d.rotation = 90, this.bottomRight.speed = -5;
  7414. break;
  7415. case 2:
  7416. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.speed = 5, this.bottomRight.d.rotation += 30;
  7417. break;
  7418. case 3:
  7419. this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5
  7420. }
  7421. }, b.prototype.createFx = function(a, b) {
  7422. var d, c = Fw.tools.createBitmap(c, "runFx");
  7423. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7424. scaleX: 8,
  7425. scaleY: 8,
  7426. rotation: 360,
  7427. alpha: 0
  7428. }, 500).call(function() {
  7429. d.removeChild(c)
  7430. })
  7431. }, b.prototype.createFx_Over = function(a, b) {
  7432. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7433. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7434. alpha: 0
  7435. }, 100).wait(100).to({
  7436. alpha: .6
  7437. }, 100).wait(100).to({
  7438. alpha: 0
  7439. }, 100).call(function() {
  7440. d.removeChild(c)
  7441. })
  7442. }, b.prototype.start = function() {
  7443. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = 1, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.topLeft.isPlay = !0, this.topRight.isPlay = !0, this.bottomLeft.isPlay = !0, this.bottomRight.isPlay = !0, this.topLeft.d.rotation = 30, this.topRight.d.rotation = 60, this.bottomLeft.d.rotation = 90, this.bottomRight.d.rotation = 120, this.topLeft.r.rotation = 0, this.topRight.r.rotation = 0, this.bottomLeft.r.rotation = 0, this.bottomRight.r.rotation = 0, this.topLeft.speed = 4, this.topRight.speed = 4, this.bottomLeft.speed = 4, this.bottomRight.speed = 4, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  7444. }, b.prototype.stop = function() {
  7445. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  7446. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  7447. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  7448. }, b.prototype.next = function() {
  7449. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  7450. }, b.prototype.over = function() {
  7451. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  7452. }, b.prototype.win = function() {
  7453. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  7454. }, b
  7455. }(egret.Sprite), level_26.prototype.__class__ = "level_26", __extends = this.__extends || function(a, b) {
  7456. function c() {
  7457. this.constructor = a
  7458. }
  7459. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  7460. c.prototype = b.prototype, a.prototype = new c
  7461. }, level_27 = function(a) {
  7462. function b() {
  7463. a.call(this), this.cNum = 0, this.hitNum = 15, this.topLeft = new Container(1, "y2", "ed2", "es2"), this.topRight = new Container(1, "y6", "ed6", "es6"), this.bottomLeft = new Container(1, "y3", "ed3", "es3"), this.bottomRight = new Container(1, "y5", "ed5", "es5"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  7464. }
  7465. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  7466. if (!UI._This.isStop) {
  7467. if ("topLeft" == a.target.name && a.target.isPlay) {
  7468. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  7469. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  7470. } else if ("topRight" == a.target.name && a.target.isPlay) {
  7471. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, this.hitNum)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  7472. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  7473. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  7474. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  7475. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  7476. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  7477. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  7478. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  7479. }
  7480. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 16 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0, this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1)
  7481. }
  7482. }, b.prototype.changeTopLeft = function() {
  7483. switch (this.topLeft.cNum) {
  7484. case 0:
  7485. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 220, this.topLeft.speed = 6;
  7486. break;
  7487. case 1:
  7488. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 180, this.topLeft.r.rotation = 80;
  7489. break;
  7490. case 2:
  7491. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 90, this.topLeft.speed = -6, this.topLeft.isPlay = !1, this.topLeft.alpha = .5, this.topRight.isPlay = !0, this.topRight.alpha = 1, this.topRight.rotations = 0, this.topRight.bg.init();
  7492. break;
  7493. case 3:
  7494. this.topLeft.isPlay = !1, this.topLeft.alpha = .5
  7495. }
  7496. }, b.prototype.changeTopRight = function() {
  7497. switch (this.topRight.cNum) {
  7498. case 0:
  7499. this.topRight.bg.init(), this.topRight.rotations = 0, this.topRight.d.rotation = 120, this.topRight.speed = 6;
  7500. break;
  7501. case 1:
  7502. this.topRight.bg.init(), this.topRight.rotations = 0, this.topRight.d.rotation = 180;
  7503. break;
  7504. case 2:
  7505. this.topRight.bg.init(), this.topRight.rotations = 0, this.topRight.d.rotation = 220;
  7506. break;
  7507. case 3:
  7508. this.topRight.isPlay = !1, this.topRight.alpha = .5, this.bottomLeft.rotations = 0, this.bottomLeft.bg.init(), this.bottomLeft.isPlay = !0, this.bottomLeft.alpha = 1
  7509. }
  7510. }, b.prototype.changeBottomLeft = function() {
  7511. switch (this.bottomLeft.cNum) {
  7512. case 0:
  7513. this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomLeft.d.rotation = Math.floor(60 * Math.random()) + 90, this.bottomLeft.speed = 6;
  7514. break;
  7515. case 1:
  7516. this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomLeft.d.rotation = 200, this.bottomLeft.speed = -6;
  7517. break;
  7518. case 2:
  7519. this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomLeft.r.rotation = 100, this.bottomLeft.speed = 6;
  7520. break;
  7521. case 3:
  7522. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5, this.topLeft.isPlay = !0, this.topLeft.rotations = 0, this.topLeft.alpha = 1, this.topLeft.bg.init()
  7523. }
  7524. }, b.prototype.changeBottomRight = function() {
  7525. switch (this.bottomRight.cNum) {
  7526. case 0:
  7527. this.bottomRight.bg.init(), this.bottomRight.rotations = 0, this.bottomRight.d.rotation = 240, this.bottomRight.speed = 6, this.topLeft.isPlay = !1, this.topLeft.alpha = .5, this.topRight.isPlay = !1, this.topRight.alpha = .5, this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5;
  7528. break;
  7529. case 1:
  7530. this.bottomRight.bg.init(), this.bottomRight.rotations = 0, this.bottomRight.d.rotation = 0, this.bottomRight.speed = -6;
  7531. break;
  7532. case 2:
  7533. this.bottomRight.bg.init(), this.bottomRight.rotations = 0, this.bottomRight.d.rotation = 90, this.bottomRight.speed = 6;
  7534. break;
  7535. case 3:
  7536. this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5, this.topLeft.isPlay = !0, this.topLeft.alpha = 1, this.topLeft.bg.init(), this.topLeft.rotations = 0
  7537. }
  7538. }, b.prototype.createFx = function(a, b) {
  7539. var d, c = Fw.tools.createBitmap(c, "runFx");
  7540. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7541. scaleX: 8,
  7542. scaleY: 8,
  7543. rotation: 360,
  7544. alpha: 0
  7545. }, 500).call(function() {
  7546. d.removeChild(c)
  7547. })
  7548. }, b.prototype.createFx_Over = function(a, b) {
  7549. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7550. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7551. alpha: 0
  7552. }, 100).wait(100).to({
  7553. alpha: .6
  7554. }, 100).wait(100).to({
  7555. alpha: 0
  7556. }, 100).call(function() {
  7557. d.removeChild(c)
  7558. })
  7559. }, b.prototype.start = function() {
  7560. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = 1, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.topLeft.isPlay = !0, this.topRight.isPlay = !0, this.bottomLeft.isPlay = !0, this.bottomRight.isPlay = !0, this.topLeft.d.rotation = 30, this.topRight.d.rotation = 60, this.bottomLeft.d.rotation = 90, this.bottomRight.d.rotation = 120, this.topLeft.r.rotation = 0, this.topRight.r.rotation = 0, this.bottomLeft.r.rotation = 0, this.bottomRight.r.rotation = 0, this.topLeft.speed = 4, this.topRight.speed = 4, this.bottomLeft.speed = 4, this.bottomRight.speed = 4, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  7561. }, b.prototype.stop = function() {
  7562. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  7563. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  7564. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  7565. }, b.prototype.next = function() {
  7566. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  7567. }, b.prototype.over = function() {
  7568. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  7569. }, b.prototype.win = function() {
  7570. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  7571. }, b
  7572. }(egret.Sprite), level_27.prototype.__class__ = "level_27", __extends = this.__extends || function(a, b) {
  7573. function c() {
  7574. this.constructor = a
  7575. }
  7576. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  7577. c.prototype = b.prototype, a.prototype = new c
  7578. }, level_28 = function(a) {
  7579. function b() {
  7580. a.call(this), this.cNum = 0, this.hitNum = 100, this.topLeft = new Container(4, "y0", "ed0", "es0"), this.topRight = new Container(4, "y5", "ed5", "es5"), this.bottomLeft = new Container(4, "y1", "ed1", "es1"), this.bottomRight = new Container(4, "y6", "ed6", "es6"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  7581. }
  7582. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  7583. if (!UI._This.isStop) {
  7584. if ("topLeft" == a.target.name && a.target.isPlay) {
  7585. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  7586. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  7587. } else if ("topRight" == a.target.name && a.target.isPlay) {
  7588. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, this.hitNum)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  7589. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  7590. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  7591. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  7592. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  7593. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  7594. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  7595. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  7596. }
  7597. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 16 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0, this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1)
  7598. }
  7599. }, b.prototype.changeTopLeft = function() {
  7600. switch (this.topLeft.cNum) {
  7601. case 0:
  7602. this.topLeft.bg.init(), this.topLeft.rotations = 0, this.topLeft.d.rotation = Math.floor(60 * Math.random()) + 150, this.topLeft.speed = -5;
  7603. break;
  7604. case 1:
  7605. this.topLeft.d.rotation -= 100, this.topLeft.speed = 6;
  7606. break;
  7607. case 2:
  7608. this.topLeft.d.rotation = 200, this.topLeft.speed = -6;
  7609. break;
  7610. case 3:
  7611. this.topLeft.isPlay = !1, this.topLeft.alpha = .5
  7612. }
  7613. }, b.prototype.changeTopRight = function() {
  7614. switch (this.topRight.cNum) {
  7615. case 0:
  7616. this.topRight.d.rotation = 270, this.topRight.speed = 5;
  7617. break;
  7618. case 1:
  7619. this.topRight.d.rotation = 0, this.topRight.speed = 6;
  7620. break;
  7621. case 2:
  7622. this.topRight.rotations = 0, this.topRight.d.rotation = 90, this.topRight.speed = -6;
  7623. break;
  7624. case 3:
  7625. this.topRight.isPlay = !1, this.topRight.alpha = .5, this.bottomRight.bg.init(), this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0
  7626. }
  7627. }, b.prototype.changeBottomLeft = function() {
  7628. switch (this.bottomLeft.cNum) {
  7629. case 0:
  7630. this.bottomLeft.d.rotation = Math.floor(60 * Math.random()) + 300, this.bottomLeft.speed = 5;
  7631. break;
  7632. case 1:
  7633. this.bottomLeft.d.rotation = 90, this.bottomLeft.speed = 6;
  7634. break;
  7635. case 2:
  7636. this.bottomLeft.speed = -6;
  7637. break;
  7638. case 3:
  7639. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5
  7640. }
  7641. }, b.prototype.changeBottomRight = function() {
  7642. switch (this.bottomRight.cNum) {
  7643. case 0:
  7644. this.bottomRight.d.rotation = 0, this.bottomRight.r.rotation = 90, this.bottomRight.speed = 5;
  7645. break;
  7646. case 1:
  7647. this.topRight.isPlay || (this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0), this.bottomRight.d.rotation = 60, this.bottomRight.speed = 6;
  7648. break;
  7649. case 2:
  7650. this.bottomRight.d.rotation = 100, this.bottomRight.speed = 6;
  7651. break;
  7652. case 3:
  7653. this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5
  7654. }
  7655. }, b.prototype.createFx = function(a, b) {
  7656. var d, c = Fw.tools.createBitmap(c, "runFx");
  7657. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7658. scaleX: 8,
  7659. scaleY: 8,
  7660. rotation: 360,
  7661. alpha: 0
  7662. }, 500).call(function() {
  7663. d.removeChild(c)
  7664. })
  7665. }, b.prototype.createFx_Over = function(a, b) {
  7666. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7667. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7668. alpha: 0
  7669. }, 100).wait(100).to({
  7670. alpha: .6
  7671. }, 100).wait(100).to({
  7672. alpha: 0
  7673. }, 100).call(function() {
  7674. d.removeChild(c)
  7675. })
  7676. }, b.prototype.start = function() {
  7677. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = 1, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.topLeft.isPlay = !0, this.topRight.isPlay = !0, this.bottomLeft.isPlay = !0, this.bottomRight.isPlay = !0, this.topLeft.d.rotation = 30, this.topRight.d.rotation = 60, this.bottomLeft.d.rotation = 90, this.bottomRight.d.rotation = 120, this.topLeft.r.rotation = 200, this.topRight.r.rotation = 180, this.bottomLeft.r.rotation = 240, this.bottomRight.r.rotation = 0, this.topLeft.speed = 5, this.topRight.speed = -5, this.bottomLeft.speed = 5, this.bottomRight.speed = -5, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  7678. }, b.prototype.stop = function() {
  7679. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  7680. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  7681. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  7682. }, b.prototype.next = function() {
  7683. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  7684. }, b.prototype.over = function() {
  7685. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  7686. }, b.prototype.win = function() {
  7687. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  7688. }, b
  7689. }(egret.Sprite), level_28.prototype.__class__ = "level_28", __extends = this.__extends || function(a, b) {
  7690. function c() {
  7691. this.constructor = a
  7692. }
  7693. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  7694. c.prototype = b.prototype, a.prototype = new c
  7695. }, level_29 = function(a) {
  7696. function b() {
  7697. a.call(this), this.cNum = 0, this.hitNum = 360, this.topLeft = new Container(1, "y2", "ed2", "es2"), this.topRight = new Container(4, "y4", "ed4", "es4"), this.bottomLeft = new Container(4, "y3", "ed3", "es3"), this.bottomRight = new Container(1, "y5", "ed5", "es5"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  7698. }
  7699. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  7700. if (!UI._This.isStop) {
  7701. if ("topLeft" == a.target.name && a.target.isPlay) {
  7702. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  7703. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  7704. } else if ("topRight" == a.target.name && a.target.isPlay) {
  7705. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, this.hitNum)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  7706. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  7707. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  7708. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  7709. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  7710. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  7711. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  7712. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  7713. }
  7714. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 20 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0, this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1)
  7715. }
  7716. }, b.prototype.changeTopLeft = function() {
  7717. switch (this.topLeft.cNum) {
  7718. case 0:
  7719. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = Math.floor(60 * Math.random()) + 150, this.topLeft.speed = -5;
  7720. break;
  7721. case 1:
  7722. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 270, this.topLeft.speed = 6;
  7723. break;
  7724. case 2:
  7725. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 300, this.topLeft.speed = 6;
  7726. break;
  7727. case 3:
  7728. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 360, this.topLeft.speed = 1;
  7729. break;
  7730. case 4:
  7731. this.topLeft.isPlay = !1, this.topLeft.alpha = .5
  7732. }
  7733. }, b.prototype.changeTopRight = function() {
  7734. switch (this.topRight.cNum) {
  7735. case 0:
  7736. this.topRight.d.rotation = 270, this.topRight.r.rotation = 0, this.topRight.speed = 1, this.topRight.bg.init();
  7737. break;
  7738. case 1:
  7739. this.topRight.d.rotation = 0, this.topRight.speed = 6;
  7740. break;
  7741. case 2:
  7742. this.topRight.d.rotation = 90, this.topRight.speed = -6;
  7743. break;
  7744. case 3:
  7745. this.topRight.d.rotation = 180, this.topRight.speed = 6;
  7746. break;
  7747. case 4:
  7748. this.topRight.isPlay = !1, this.topRight.alpha = .5
  7749. }
  7750. }, b.prototype.changeBottomLeft = function() {
  7751. switch (this.bottomLeft.cNum) {
  7752. case 0:
  7753. this.bottomLeft.d.rotation = 45, this.bottomLeft.r.rotation = 0, this.bottomLeft.speed = -5;
  7754. break;
  7755. case 1:
  7756. this.bottomLeft.d.rotation = 90, this.bottomLeft.speed = 6;
  7757. break;
  7758. case 2:
  7759. this.bottomLeft.d.rotation = 180, this.bottomLeft.speed = 7;
  7760. break;
  7761. case 3:
  7762. this.bottomLeft.d.rotation = 0, this.bottomLeft.speed = -7;
  7763. break;
  7764. case 4:
  7765. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5
  7766. }
  7767. }, b.prototype.changeBottomRight = function() {
  7768. switch (this.bottomRight.cNum) {
  7769. case 0:
  7770. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.d.rotation = 250, this.bottomRight.r.rotation = 330, this.bottomRight.speed = 4;
  7771. break;
  7772. case 1:
  7773. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.d.rotation = 0, this.bottomRight.speed = 2;
  7774. break;
  7775. case 2:
  7776. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.d.rotation = 30, this.bottomRight.speed = 6;
  7777. break;
  7778. case 3:
  7779. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.d.rotation = 30, this.bottomRight.r.rotation = 0, this.bottomRight.speed = -6;
  7780. break;
  7781. case 4:
  7782. this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5
  7783. }
  7784. }, b.prototype.createFx = function(a, b) {
  7785. var d, c = Fw.tools.createBitmap(c, "runFx");
  7786. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7787. scaleX: 8,
  7788. scaleY: 8,
  7789. rotation: 360,
  7790. alpha: 0
  7791. }, 500).call(function() {
  7792. d.removeChild(c)
  7793. })
  7794. }, b.prototype.createFx_Over = function(a, b) {
  7795. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7796. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7797. alpha: 0
  7798. }, 100).wait(100).to({
  7799. alpha: .6
  7800. }, 100).wait(100).to({
  7801. alpha: 0
  7802. }, 100).call(function() {
  7803. d.removeChild(c)
  7804. })
  7805. }, b.prototype.start = function() {
  7806. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = 1, this.bottomLeft.alpha = 1, this.bottomRight.alpha = 1, this.topLeft.isPlay = !0, this.topRight.isPlay = !0, this.bottomLeft.isPlay = !0, this.bottomRight.isPlay = !0, this.topLeft.d.rotation = 330, this.topRight.d.rotation = 150, this.bottomLeft.d.rotation = 90, this.bottomRight.d.rotation = 30, this.topLeft.r.rotation = 0, this.topRight.r.rotation = 230, this.bottomLeft.r.rotation = 240, this.bottomRight.r.rotation = 0, this.topLeft.speed = 1, this.topRight.speed = 5, this.bottomLeft.speed = -5, this.bottomRight.speed = -1, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  7807. }, b.prototype.stop = function() {
  7808. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  7809. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  7810. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  7811. }, b.prototype.next = function() {
  7812. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  7813. }, b.prototype.over = function() {
  7814. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  7815. }, b.prototype.win = function() {
  7816. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  7817. }, b
  7818. }(egret.Sprite), level_29.prototype.__class__ = "level_29", __extends = this.__extends || function(a, b) {
  7819. function c() {
  7820. this.constructor = a
  7821. }
  7822. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  7823. c.prototype = b.prototype, a.prototype = new c
  7824. }, level_3 = function(a) {
  7825. function b() {
  7826. a.call(this), this.rotations = 0, this.speed = 3, this.bg = new GameBGView(4), this.addChild(this.bg), Fw.L_Positioning.StageAlign(this.bg, {
  7827. centerX: !0,
  7828. centerY: !0
  7829. }), this.cNum = 0, this.b = Fw.tools.createBitmap(this.b, "y2", !1), this.b.anchorX = this.b.anchorY = .5, this.b.y = this.bg.y + GameData.yY, Fw.L_Positioning.RelativeAlign(this.bg, this.b, {
  7830. centerX: !0
  7831. }), this.d = Fw.tools.createBitmap(this.d, "ed2"), this.d.anchorX = this.d.anchorY = .5, this.d.x = this.b.x, this.d.y = this.b.y, this.r = Fw.tools.createBitmap(this.r, "es2"), this.r.anchorX = this.r.anchorY = .5, this.r.x = this.d.x, this.r.y = this.d.y, this.addChild(this.b), this.addChild(this.d), this.addChild(this.r)
  7832. }
  7833. return __extends(b, a), b.prototype.onTouchBegin = function() {
  7834. if (!UI._This.isStop)
  7835. if (GameData.RotationChange(this.r.rotation, this.d.rotation, 10)) {
  7836. switch (this.cNum) {
  7837. case 0:
  7838. this.d.rotation = 0;
  7839. break;
  7840. case 1:
  7841. this.d.rotation = 30, this.speed = -3;
  7842. break;
  7843. case 2:
  7844. this.d.rotation = Math.floor(60 * Math.random()) + 150, this.speed = 4;
  7845. break;
  7846. case 3:
  7847. this.win()
  7848. }
  7849. this.cNum += 1, this.createFx(this.d.x, this.d.y)
  7850. } else this.createFx_Over(this.d.x, this.d.y), this.over()
  7851. }, b.prototype.createFx = function(a, b) {
  7852. var d, c = Fw.tools.createBitmap(c, "runFx");
  7853. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7854. scaleX: 8,
  7855. scaleY: 8,
  7856. rotation: 360,
  7857. alpha: 0
  7858. }, 500).call(function() {
  7859. d.removeChild(c)
  7860. })
  7861. }, b.prototype.createFx_Over = function(a, b) {
  7862. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7863. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7864. alpha: 0
  7865. }, 100).wait(100).to({
  7866. alpha: .6
  7867. }, 100).wait(100).to({
  7868. alpha: 0
  7869. }, 100).call(function() {
  7870. d.removeChild(c)
  7871. })
  7872. }, b.prototype.start = function() {
  7873. this.bg.init(), this.rotations = this.cNum = 0, this.speed = 3, this.d.rotation = 90, this.r.rotation = 0, this.next()
  7874. }, b.prototype.stop = function() {
  7875. this.bg.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  7876. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  7877. this.r.rotation += this.speed, GameData.resultRotation(this.r), this.rotations += this.speed, 360 <= this.rotations && (this.bg.remove() || this.over(), this.rotations = 0)
  7878. }, b.prototype.next = function() {
  7879. this.bg.touchEnabled = !0, this.bg.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  7880. }, b.prototype.over = function() {
  7881. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  7882. }, b.prototype.win = function() {
  7883. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  7884. }, b
  7885. }(egret.Sprite), level_3.prototype.__class__ = "level_3", __extends = this.__extends || function(a, b) {
  7886. function c() {
  7887. this.constructor = a
  7888. }
  7889. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  7890. c.prototype = b.prototype, a.prototype = new c
  7891. }, level_30 = function(a) {
  7892. function b() {
  7893. a.call(this), this.cNum = 0, this.hitNum = 15, this.topLeft = new Container(1, "y7", "ed7", "es7"), this.topRight = new Container(1, "y6", "ed6", "es6"), this.bottomLeft = new Container(1, "y5", "ed5", "es5"), this.bottomRight = new Container(1, "y4", "ed4", "es4"), this.addChild(this.topLeft), this.topLeft.y = settings.level13_18.sy, this.topLeft.touchEnabled = !0, this.topLeft.name = "topLeft", this.addChild(this.topRight), this.topRight.y = settings.level13_18.sy, this.topRight.touchEnabled = !0, this.topRight.name = "topRight", this.topRight.x = Fw.Data.StageWidth - this.topRight.width, this.addChild(this.bottomLeft), this.bottomLeft.name = "bottomLeft", this.bottomLeft.y = settings.level13_18.xy, this.bottomLeft.touchEnabled = !0, this.addChild(this.bottomRight), this.bottomRight.touchEnabled = !0, this.bottomRight.name = "bottomRight", this.bottomRight.y = settings.level13_18.xy, this.bottomRight.x = Fw.Data.StageWidth - this.bottomRight.width
  7894. }
  7895. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  7896. if (!UI._This.isStop) {
  7897. if ("topLeft" == a.target.name && a.target.isPlay) {
  7898. if (!GameData.RotationChange(this.topLeft.r.rotation, this.topLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y), void this.over();
  7899. this.changeTopLeft(), this.topLeft.cNum += 1, this.createFx(this.topLeft.x + this.topLeft.d.x, this.topLeft.y + this.topLeft.d.y)
  7900. } else if ("topRight" == a.target.name && a.target.isPlay) {
  7901. if (!GameData.RotationChange(this.topRight.r.rotation, this.topRight.d.rotation, this.hitNum)) return this.createFx_Over(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y), void this.over();
  7902. this.changeTopRight(), this.topRight.cNum += 1, this.createFx(this.topRight.x + this.topRight.d.x, this.topRight.y + this.topRight.d.y)
  7903. } else if ("bottomLeft" == a.target.name && a.target.isPlay) {
  7904. if (!GameData.RotationChange(this.bottomLeft.r.rotation, this.bottomLeft.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y), void this.over();
  7905. this.changeBottomLeft(), this.bottomLeft.cNum += 1, this.createFx(this.bottomLeft.x + this.bottomLeft.d.x, this.bottomLeft.y + this.bottomLeft.d.y)
  7906. } else if ("bottomRight" == a.target.name && a.target.isPlay) {
  7907. if (!GameData.RotationChange(this.bottomRight.r.rotation, this.bottomRight.d.rotation, this.hitNum)) return this.createFx_Over(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y), void this.over();
  7908. this.changeBottomRight(), this.bottomRight.cNum += 1, this.createFx(this.bottomRight.x + this.bottomRight.d.x, this.bottomRight.y + this.bottomRight.d.y)
  7909. }
  7910. this.cNum = this.topLeft.cNum + this.topRight.cNum + this.bottomLeft.cNum + this.bottomRight.cNum, console.log(this.cNum), 20 <= this.cNum ? this.win() : this.topLeft.isPlay || this.topRight.isPlay || this.bottomLeft.isPlay || this.bottomRight.isPlay || (this.topLeft.isPlay = this.topRight.isPlay = this.bottomLeft.isPlay = this.bottomRight.isPlay = !0, this.topLeft.alpha = this.topRight.alpha = this.bottomLeft.alpha = this.bottomRight.alpha = 1)
  7911. }
  7912. }, b.prototype.changeTopLeft = function() {
  7913. switch (this.topLeft.cNum) {
  7914. case 0:
  7915. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 200, this.topLeft.speed = -7;
  7916. break;
  7917. case 1:
  7918. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 170;
  7919. break;
  7920. case 2:
  7921. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 140;
  7922. break;
  7923. case 3:
  7924. this.topLeft.rotations = 0, this.topLeft.bg.init(), this.topLeft.d.rotation = 80, this.topLeft.speed = -8, this.topRight.isPlay = !0, this.topRight.alpha = 1, this.topLeft.isPlay = !1, this.topLeft.alpha = .5;
  7925. break;
  7926. case 4:
  7927. this.topLeft.isPlay = !1, this.topLeft.alpha = .5, this.topRight.isPlay = !0, this.topRight.alpha = 1
  7928. }
  7929. }, b.prototype.changeTopRight = function() {
  7930. switch (this.topRight.cNum) {
  7931. case 0:
  7932. this.topRight.rotations = 0, this.topRight.bg.init(), this.topRight.d.rotation = 270, this.topRight.r.rotation = 220, this.topRight.speed = 7;
  7933. break;
  7934. case 1:
  7935. this.topRight.rotations = 0, this.topRight.bg.init(), this.topRight.d.rotation = 0, this.topRight.speed = -8, this.bottomLeft.isPlay = !0, this.bottomLeft.alpha = 1, this.topRight.isPlay = !1, this.topRight.alpha = .5;
  7936. break;
  7937. case 2:
  7938. this.topRight.rotations = 0, this.topRight.bg.init(), this.topRight.isPlay = !1, this.topRight.alpha = .5, this.bottomRight.isPlay = !0, this.bottomRight.alpha = 1, this.topRight.d.rotation = 90, this.topRight.speed = -8;
  7939. break;
  7940. case 3:
  7941. this.topRight.rotations = 0, this.topRight.bg.init(), this.topRight.d.rotation = 180, this.topRight.speed = 6;
  7942. break;
  7943. case 4:
  7944. this.topRight.isPlay = !1, this.topRight.alpha = .5
  7945. }
  7946. }, b.prototype.changeBottomLeft = function() {
  7947. switch (this.bottomLeft.cNum) {
  7948. case 0:
  7949. this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomLeft.d.rotation = 90, this.bottomLeft.r.rotation = 0, this.bottomLeft.speed = 8;
  7950. break;
  7951. case 1:
  7952. this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomLeft.d.rotation = 0, this.bottomLeft.speed = -8;
  7953. break;
  7954. case 2:
  7955. this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomLeft.d.rotation = 270;
  7956. break;
  7957. case 3:
  7958. this.bottomLeft.bg.init(), this.bottomLeft.rotations = 0, this.bottomLeft.d.rotation = 90, this.bottomLeft.speed = 8;
  7959. break;
  7960. case 4:
  7961. this.bottomLeft.isPlay = !1, this.bottomLeft.alpha = .5, this.topRight.isPlay = !0, this.topRight.alpha = 1
  7962. }
  7963. }, b.prototype.changeBottomRight = function() {
  7964. switch (this.bottomRight.cNum) {
  7965. case 0:
  7966. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.d.rotation = 150, this.bottomRight.r.rotation = 200, this.bottomRight.speed = 9;
  7967. break;
  7968. case 1:
  7969. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.d.rotation = 0, this.bottomRight.speed = 10;
  7970. break;
  7971. case 2:
  7972. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.d.rotation = 30, this.bottomRight.speed = 6;
  7973. break;
  7974. case 3:
  7975. this.bottomRight.rotations = 0, this.bottomRight.bg.init(), this.bottomRight.d.rotation = 270, this.bottomRight.speed = -8;
  7976. break;
  7977. case 4:
  7978. this.topLeft.isPlay = !0, this.topLeft.alpha = 1, this.bottomRight.isPlay = !1, this.bottomRight.alpha = .5
  7979. }
  7980. }, b.prototype.createFx = function(a, b) {
  7981. var d, c = Fw.tools.createBitmap(c, "runFx");
  7982. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  7983. scaleX: 8,
  7984. scaleY: 8,
  7985. rotation: 360,
  7986. alpha: 0
  7987. }, 500).call(function() {
  7988. d.removeChild(c)
  7989. })
  7990. }, b.prototype.createFx_Over = function(a, b) {
  7991. var d, c = Fw.tools.createBitmap(c, "loseFx");
  7992. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  7993. alpha: 0
  7994. }, 100).wait(100).to({
  7995. alpha: .6
  7996. }, 100).wait(100).to({
  7997. alpha: 0
  7998. }, 100).call(function() {
  7999. d.removeChild(c)
  8000. })
  8001. }, b.prototype.start = function() {
  8002. this.cNum = 0, this.topLeft.cNum = 0, this.topRight.cNum = 0, this.bottomLeft.cNum = 0, this.bottomRight.cNum = 0, this.topLeft.alpha = 1, this.topRight.alpha = .5, this.bottomLeft.alpha = .5, this.bottomRight.alpha = .5, this.topLeft.isPlay = !0, this.topRight.isPlay = !1, this.bottomLeft.isPlay = !1, this.bottomRight.isPlay = !1, this.topLeft.d.rotation = 330, this.topRight.d.rotation = 150, this.bottomLeft.d.rotation = 90, this.bottomRight.d.rotation = 30, this.topLeft.r.rotation = 0, this.topRight.r.rotation = 230, this.bottomLeft.r.rotation = 240, this.bottomRight.r.rotation = 0, this.topLeft.speed = 7, this.topRight.speed = 7, this.bottomLeft.speed = -7, this.bottomRight.speed = -7, this.topLeft.rotations = 0, this.topRight.rotations = 0, this.bottomLeft.rotations = 0, this.bottomRight.rotations = 0, this.topLeft.bg.init(), this.topRight.bg.init(), this.bottomLeft.bg.init(), this.bottomRight.bg.init(), this.next()
  8003. }, b.prototype.stop = function() {
  8004. this.topLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  8005. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  8006. this.topLeft.isPlay && (this.topLeft.r.rotation += this.topLeft.speed, 360 <= this.topLeft.rotations && (this.topLeft.bg.remove() || this.over(), this.topLeft.rotations = 0), GameData.resultRotation(this.topLeft.r), this.topLeft.rotations += Math.abs(this.topLeft.speed)), this.topRight.isPlay && (this.topRight.r.rotation += this.topRight.speed, 360 <= this.topRight.rotations && (this.topRight.bg.remove() || this.over(), this.topRight.rotations = 0), GameData.resultRotation(this.topRight.r), this.topRight.rotations += Math.abs(this.topRight.speed)), this.bottomLeft.isPlay && (this.bottomLeft.r.rotation += this.bottomLeft.speed, 360 <= this.bottomLeft.rotations && (this.bottomLeft.bg.remove() || this.over(), this.bottomLeft.rotations = 0), GameData.resultRotation(this.bottomLeft.r), this.bottomLeft.rotations += Math.abs(this.bottomLeft.speed)), this.bottomRight.isPlay && (this.bottomRight.r.rotation += this.bottomRight.speed, 360 <= this.bottomRight.rotations && (this.bottomRight.bg.remove() || this.over(), this.bottomRight.rotations = 0), GameData.resultRotation(this.bottomRight.r), this.bottomRight.rotations += Math.abs(this.bottomRight.speed))
  8007. }, b.prototype.next = function() {
  8008. this.topLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.topRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomRight.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.bottomLeft.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  8009. }, b.prototype.over = function() {
  8010. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  8011. }, b.prototype.win = function() {
  8012. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  8013. }, b
  8014. }(egret.Sprite), level_30.prototype.__class__ = "level_30", __extends = this.__extends || function(a, b) {
  8015. function c() {
  8016. this.constructor = a
  8017. }
  8018. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  8019. c.prototype = b.prototype, a.prototype = new c
  8020. }, level_4 = function(a) {
  8021. function b() {
  8022. a.call(this), this.rotations = 0, this.speed = 3, this.bg = new GameBGView(4), this.addChild(this.bg), Fw.L_Positioning.StageAlign(this.bg, {
  8023. centerX: !0,
  8024. centerY: !0
  8025. }), this.cNum = 0, this.b = Fw.tools.createBitmap(this.b, "y3", !1), this.b.anchorX = this.b.anchorY = .5, this.b.y = this.bg.y + GameData.yY, Fw.L_Positioning.RelativeAlign(this.bg, this.b, {
  8026. centerX: !0
  8027. }), this.d = Fw.tools.createBitmap(this.d, "ed3"), this.d.anchorX = this.d.anchorY = .5, this.d.x = this.b.x, this.d.y = this.b.y, this.r = Fw.tools.createBitmap(this.r, "es3"), this.r.anchorX = this.r.anchorY = .5, this.r.x = this.d.x, this.r.y = this.d.y, this.addChild(this.b), this.addChild(this.d), this.addChild(this.r)
  8028. }
  8029. return __extends(b, a), b.prototype.onTouchBegin = function() {
  8030. if (!UI._This.isStop)
  8031. if (GameData.RotationChange(this.r.rotation, this.d.rotation, 10)) {
  8032. switch (this.cNum) {
  8033. case 0:
  8034. this.d.rotation = 130, this.speed = 4;
  8035. break;
  8036. case 1:
  8037. this.d.rotation = 220, this.speed = -4;
  8038. break;
  8039. case 2:
  8040. this.d.rotation = Math.floor(60 * Math.random()) + 150, this.speed = 5;
  8041. break;
  8042. case 3:
  8043. this.win()
  8044. }
  8045. this.cNum += 1, this.createFx(this.d.x, this.d.y)
  8046. } else this.createFx_Over(this.d.x, this.d.y), this.over()
  8047. }, b.prototype.createFx = function(a, b) {
  8048. var d, c = Fw.tools.createBitmap(c, "runFx");
  8049. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  8050. scaleX: 8,
  8051. scaleY: 8,
  8052. rotation: 360,
  8053. alpha: 0
  8054. }, 500).call(function() {
  8055. d.removeChild(c)
  8056. })
  8057. }, b.prototype.createFx_Over = function(a, b) {
  8058. var d, c = Fw.tools.createBitmap(c, "loseFx");
  8059. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  8060. alpha: 0
  8061. }, 100).wait(100).to({
  8062. alpha: .6
  8063. }, 100).wait(100).to({
  8064. alpha: 0
  8065. }, 100).call(function() {
  8066. d.removeChild(c)
  8067. })
  8068. }, b.prototype.start = function() {
  8069. this.bg.init(), this.rotations = this.cNum = 0, this.speed = 3, this.d.rotation = 90, this.r.rotation = 270, this.next()
  8070. }, b.prototype.stop = function() {
  8071. this.bg.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  8072. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  8073. this.r.rotation += this.speed, GameData.resultRotation(this.r), this.rotations += this.speed, 360 <= this.rotations && (this.bg.remove() || this.over(), this.rotations = 0)
  8074. }, b.prototype.next = function() {
  8075. this.bg.touchEnabled = !0, this.bg.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  8076. }, b.prototype.over = function() {
  8077. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  8078. }, b.prototype.win = function() {
  8079. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  8080. }, b
  8081. }(egret.Sprite), level_4.prototype.__class__ = "level_4", __extends = this.__extends || function(a, b) {
  8082. function c() {
  8083. this.constructor = a
  8084. }
  8085. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  8086. c.prototype = b.prototype, a.prototype = new c
  8087. }, level_5 = function(a) {
  8088. function b() {
  8089. a.call(this), this.rotations = 0, this.speed = 3, this.bg = new GameBGView(3), this.addChild(this.bg), Fw.L_Positioning.StageAlign(this.bg, {
  8090. centerX: !0,
  8091. centerY: !0
  8092. }), this.cNum = 0, this.b = Fw.tools.createBitmap(this.b, "y4", !1), this.b.anchorX = this.b.anchorY = .5, this.b.y = this.bg.y + GameData.yY, Fw.L_Positioning.RelativeAlign(this.bg, this.b, {
  8093. centerX: !0
  8094. }), this.d = Fw.tools.createBitmap(this.d, "ed4"), this.d.anchorX = this.d.anchorY = .5, this.d.x = this.b.x, this.d.y = this.b.y, this.r = Fw.tools.createBitmap(this.r, "es4"), this.r.anchorX = this.r.anchorY = .5, this.r.x = this.d.x, this.r.y = this.d.y, this.addChild(this.b), this.addChild(this.d), this.addChild(this.r)
  8095. }
  8096. return __extends(b, a), b.prototype.onTouchBegin = function() {
  8097. if (!UI._This.isStop)
  8098. if (GameData.RotationChange(this.r.rotation, this.d.rotation, 15)) {
  8099. switch (this.cNum) {
  8100. case 0:
  8101. this.d.rotation = 130, this.speed = 4;
  8102. break;
  8103. case 1:
  8104. this.d.rotation = 220, this.speed = -4;
  8105. break;
  8106. case 2:
  8107. this.d.rotation = Math.floor(60 * Math.random()) + 150, this.speed = 5;
  8108. break;
  8109. case 3:
  8110. this.win()
  8111. }
  8112. this.cNum += 1, this.createFx(this.d.x, this.d.y)
  8113. } else this.createFx_Over(this.d.x, this.d.y), this.over()
  8114. }, b.prototype.createFx = function(a, b) {
  8115. var d, c = Fw.tools.createBitmap(c, "runFx");
  8116. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  8117. scaleX: 8,
  8118. scaleY: 8,
  8119. rotation: 360,
  8120. alpha: 0
  8121. }, 500).call(function() {
  8122. d.removeChild(c)
  8123. })
  8124. }, b.prototype.createFx_Over = function(a, b) {
  8125. var d, c = Fw.tools.createBitmap(c, "loseFx");
  8126. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  8127. alpha: 0
  8128. }, 100).wait(100).to({
  8129. alpha: .6
  8130. }, 100).wait(100).to({
  8131. alpha: 0
  8132. }, 100).call(function() {
  8133. d.removeChild(c)
  8134. })
  8135. }, b.prototype.start = function() {
  8136. this.bg.init(), this.rotations = this.cNum = 0, this.speed = 4, this.d.rotation = 90, this.r.rotation = 270, this.next()
  8137. }, b.prototype.stop = function() {
  8138. this.bg.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  8139. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  8140. this.r.rotation += this.speed, GameData.resultRotation(this.r), this.rotations += this.speed, 360 <= this.rotations && (this.bg.remove() || this.over(), this.rotations = 0)
  8141. }, b.prototype.next = function() {
  8142. this.bg.touchEnabled = !0, this.bg.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  8143. }, b.prototype.over = function() {
  8144. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  8145. }, b.prototype.win = function() {
  8146. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  8147. }, b
  8148. }(egret.Sprite), level_5.prototype.__class__ = "level_5", __extends = this.__extends || function(a, b) {
  8149. function c() {
  8150. this.constructor = a
  8151. }
  8152. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  8153. c.prototype = b.prototype, a.prototype = new c
  8154. }, level_6 = function(a) {
  8155. function b() {
  8156. a.call(this), this.rotations = 0, this.speed = 4, this.bg = new GameBGView(1), this.addChild(this.bg), Fw.L_Positioning.StageAlign(this.bg, {
  8157. centerX: !0,
  8158. centerY: !0
  8159. }), this.cNum = 0, this.b = Fw.tools.createBitmap(this.b, "y5", !1), this.b.anchorX = this.b.anchorY = .5, this.b.y = this.bg.y + GameData.yY, Fw.L_Positioning.RelativeAlign(this.bg, this.b, {
  8160. centerX: !0
  8161. }), this.d = Fw.tools.createBitmap(this.d, "ed5"), this.d.anchorX = this.d.anchorY = .5, this.d.x = this.b.x, this.d.y = this.b.y, this.r = Fw.tools.createBitmap(this.r, "es5"), this.r.anchorX = this.r.anchorY = .5, this.r.x = this.d.x, this.r.y = this.d.y, this.addChild(this.b), this.addChild(this.d), this.addChild(this.r)
  8162. }
  8163. return __extends(b, a), b.prototype.onTouchBegin = function() {
  8164. if (!UI._This.isStop)
  8165. if (GameData.RotationChange(this.r.rotation, this.d.rotation, 15)) {
  8166. switch (this.cNum) {
  8167. case 0:
  8168. this.d.rotation = Math.floor(40 * Math.random()) + 200, this.speed = 5;
  8169. break;
  8170. case 1:
  8171. this.r.rotation = this.d.rotation - 60, this.speed = -5;
  8172. break;
  8173. case 2:
  8174. this.d.rotation = Math.floor(60 * Math.random()) + 90, this.r.rotation = this.d.rotation + 30, this.speed = 5;
  8175. break;
  8176. case 3:
  8177. this.d.rotation = Math.floor(30 * Math.random()), this.r.rotation = Math.floor(30 * Math.random()) + 60, this.speed = -5;
  8178. break;
  8179. case 4:
  8180. this.win()
  8181. }
  8182. this.bg.init(), this.rotations = 0, this.cNum += 1, this.createFx(this.d.x, this.d.y)
  8183. } else this.createFx_Over(this.d.x, this.d.y), this.over()
  8184. }, b.prototype.createFx = function(a, b) {
  8185. var d, c = Fw.tools.createBitmap(c, "runFx");
  8186. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  8187. scaleX: 8,
  8188. scaleY: 8,
  8189. rotation: 360,
  8190. alpha: 0
  8191. }, 500).call(function() {
  8192. d.removeChild(c)
  8193. })
  8194. }, b.prototype.createFx_Over = function(a, b) {
  8195. var d, c = Fw.tools.createBitmap(c, "loseFx");
  8196. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  8197. alpha: 0
  8198. }, 100).wait(100).to({
  8199. alpha: .6
  8200. }, 100).wait(100).to({
  8201. alpha: 0
  8202. }, 100).call(function() {
  8203. d.removeChild(c)
  8204. })
  8205. }, b.prototype.start = function() {
  8206. this.bg.init(), this.rotations = this.cNum = 0, this.speed = 4, this.d.rotation = 90, this.r.rotation = 270, this.next()
  8207. }, b.prototype.stop = function() {
  8208. this.bg.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  8209. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  8210. this.r.rotation += this.speed, GameData.resultRotation(this.r), this.rotations += this.speed, 360 <= this.rotations && (this.bg.remove() || this.over(), this.rotations = 0)
  8211. }, b.prototype.next = function() {
  8212. this.bg.touchEnabled = !0, this.bg.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  8213. }, b.prototype.over = function() {
  8214. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  8215. }, b.prototype.win = function() {
  8216. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  8217. }, b
  8218. }(egret.Sprite), level_6.prototype.__class__ = "level_6", __extends = this.__extends || function(a, b) {
  8219. function c() {
  8220. this.constructor = a
  8221. }
  8222. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  8223. c.prototype = b.prototype, a.prototype = new c
  8224. }, level_7 = function(a) {
  8225. function b() {
  8226. a.call(this), this.cNum = 0, this.left = new Container(4, "y6", "ed6", "es6"), this.addChild(this.left), Fw.L_Positioning.StageAlign(this.left, {
  8227. centerY: !0
  8228. }), this.left.name = "left", this.left.touchEnabled = !0, this.right = new Container(4, "y7", "ed7", "es7"), this.addChild(this.right), Fw.L_Positioning.StageAlign(this.right, {
  8229. centerY: !0
  8230. }), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.name = "right", this.right.touchEnabled = !0
  8231. }
  8232. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  8233. if (!UI._This.isStop) {
  8234. if ("left" == a.target.name && a.target.isPlay) {
  8235. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  8236. switch (this.left.cNum) {
  8237. case 0:
  8238. this.left.d.rotation = 30, this.left.speed = 2;
  8239. break;
  8240. case 1:
  8241. this.left.isPlay = !1, this.left.alpha = .5
  8242. }
  8243. this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  8244. } else if ("right" == a.target.name && a.target.isPlay) {
  8245. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  8246. switch (this.right.cNum) {
  8247. case 0:
  8248. this.right.r.rotation = 50;
  8249. break;
  8250. case 1:
  8251. this.right.isPlay = !1, this.right.alpha = .5
  8252. }
  8253. this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  8254. }
  8255. this.cNum = this.left.cNum + this.right.cNum, 4 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || (this.left.isPlay = this.right.isPlay = !0, this.left.alpha = this.right.alpha = 1)
  8256. }
  8257. }, b.prototype.createFx = function(a, b) {
  8258. var d, c = Fw.tools.createBitmap(c, "runFx");
  8259. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  8260. scaleX: 8,
  8261. scaleY: 8,
  8262. rotation: 360,
  8263. alpha: 0
  8264. }, 500).call(function() {
  8265. d.removeChild(c)
  8266. })
  8267. }, b.prototype.createFx_Over = function(a, b) {
  8268. var d, c = Fw.tools.createBitmap(c, "loseFx");
  8269. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  8270. alpha: 0
  8271. }, 100).wait(100).to({
  8272. alpha: .6
  8273. }, 100).wait(100).to({
  8274. alpha: 0
  8275. }, 100).call(function() {
  8276. d.removeChild(c)
  8277. })
  8278. }, b.prototype.start = function() {
  8279. this.left.alpha = 1, this.right.alpha = 1, this.left.bg.init(), this.right.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !0, this.left.speed = this.right.speed = 4, this.left.r.rotation = 0, this.right.r.rotation = 0, this.left.d.rotation = 90, this.right.d.rotation = 270, this.next()
  8280. }, b.prototype.stop = function() {
  8281. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  8282. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  8283. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed))
  8284. }, b.prototype.next = function() {
  8285. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  8286. }, b.prototype.over = function() {
  8287. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  8288. }, b.prototype.win = function() {
  8289. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  8290. }, b
  8291. }(egret.Sprite), level_7.prototype.__class__ = "level_7", __extends = this.__extends || function(a, b) {
  8292. function c() {
  8293. this.constructor = a
  8294. }
  8295. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  8296. c.prototype = b.prototype, a.prototype = new c
  8297. }, level_8 = function(a) {
  8298. function b() {
  8299. a.call(this), this.cNum = 0, this.left = new Container(4, "y8", "ed8", "es8"), this.addChild(this.left), Fw.L_Positioning.StageAlign(this.left, {
  8300. centerY: !0
  8301. }), this.left.name = "left", this.left.touchEnabled = !0, this.right = new Container(4, "y0", "ed0", "es0"), this.addChild(this.right), Fw.L_Positioning.StageAlign(this.right, {
  8302. centerY: !0
  8303. }), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.name = "right", this.right.touchEnabled = !0
  8304. }
  8305. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  8306. if (!UI._This.isStop) {
  8307. if ("left" == a.target.name && a.target.isPlay) {
  8308. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  8309. switch (this.left.cNum) {
  8310. case 0:
  8311. this.left.d.rotation = 90, this.left.speed = -4;
  8312. break;
  8313. case 1:
  8314. this.left.d.rotation = 45, this.right.r.rotation = 0;
  8315. break;
  8316. case 2:
  8317. this.left.isPlay = !1, this.left.alpha = .5
  8318. }
  8319. this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  8320. } else if ("right" == a.target.name && a.target.isPlay) {
  8321. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  8322. switch (this.right.cNum) {
  8323. case 0:
  8324. this.right.r.rotation = 270, this.right.speed = 2;
  8325. break;
  8326. case 1:
  8327. this.right.d.rotation = 140, this.right.r.rotation = 20, this.right.speed = 4;
  8328. break;
  8329. case 2:
  8330. this.right.isPlay = !1, this.right.alpha = .5
  8331. }
  8332. this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  8333. }
  8334. this.cNum = this.left.cNum + this.right.cNum, 6 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || (this.left.isPlay = this.right.isPlay = !0, this.left.alpha = this.right.alpha = 1)
  8335. }
  8336. }, b.prototype.createFx = function(a, b) {
  8337. var d, c = Fw.tools.createBitmap(c, "runFx");
  8338. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  8339. scaleX: 8,
  8340. scaleY: 8,
  8341. rotation: 360,
  8342. alpha: 0
  8343. }, 500).call(function() {
  8344. d.removeChild(c)
  8345. })
  8346. }, b.prototype.createFx_Over = function(a, b) {
  8347. var d, c = Fw.tools.createBitmap(c, "loseFx");
  8348. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  8349. alpha: 0
  8350. }, 100).wait(100).to({
  8351. alpha: .6
  8352. }, 100).wait(100).to({
  8353. alpha: 0
  8354. }, 100).call(function() {
  8355. d.removeChild(c)
  8356. })
  8357. }, b.prototype.start = function() {
  8358. this.left.alpha = 1, this.right.alpha = 1, this.left.bg.init(), this.right.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !0, this.left.speed = this.right.speed = 4, this.left.r.rotation = 0, this.right.r.rotation = 0, this.left.d.rotation = 30, this.right.d.rotation = 90, this.next()
  8359. }, b.prototype.stop = function() {
  8360. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  8361. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  8362. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed))
  8363. }, b.prototype.next = function() {
  8364. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  8365. }, b.prototype.over = function() {
  8366. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  8367. }, b.prototype.win = function() {
  8368. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  8369. }, b
  8370. }(egret.Sprite), level_8.prototype.__class__ = "level_8", __extends = this.__extends || function(a, b) {
  8371. function c() {
  8372. this.constructor = a
  8373. }
  8374. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  8375. c.prototype = b.prototype, a.prototype = new c
  8376. }, level_9 = function(a) {
  8377. function b() {
  8378. a.call(this), this.cNum = 0, this.left = new Container(4, "y1", "ed1", "es1"), this.addChild(this.left), Fw.L_Positioning.StageAlign(this.left, {
  8379. centerY: !0
  8380. }), this.left.name = "left", this.left.touchEnabled = !0, this.right = new Container(4, "y2", "ed2", "es2"), this.addChild(this.right), Fw.L_Positioning.StageAlign(this.right, {
  8381. centerY: !0
  8382. }), this.right.x = Fw.Data.StageWidth - this.right.width, this.right.name = "right", this.right.touchEnabled = !0
  8383. }
  8384. return __extends(b, a), b.prototype.onTouchBegin = function(a) {
  8385. if (!UI._This.isStop) {
  8386. if ("left" == a.target.name && a.target.isPlay) {
  8387. if (!GameData.RotationChange(this.left.r.rotation, this.left.d.rotation, 15)) return this.createFx_Over(this.left.x + this.left.d.x, this.left.y + this.left.d.y), void this.over();
  8388. switch (this.left.cNum) {
  8389. case 0:
  8390. this.left.d.rotation = this.left.r.rotation + Math.floor(60 * Math.random()) + 40, this.left.speed = 1;
  8391. break;
  8392. case 1:
  8393. this.left.d.rotation = 45, this.left.r.rotation = 0, this.left.speed = -4;
  8394. break;
  8395. case 2:
  8396. this.left.isPlay = !1, this.left.alpha = .5
  8397. }
  8398. this.left.cNum += 1, this.createFx(this.left.x + this.left.d.x, this.left.y + this.left.d.y)
  8399. } else if ("right" == a.target.name && a.target.isPlay) {
  8400. if (!GameData.RotationChange(this.right.r.rotation, this.right.d.rotation, 15)) return this.createFx_Over(this.right.x + this.right.d.x, this.right.y + this.right.d.y), void this.over();
  8401. switch (this.right.cNum) {
  8402. case 0:
  8403. this.right.r.rotation = 200, this.right.d.rotation = 300, this.right.speed = 6;
  8404. break;
  8405. case 1:
  8406. this.right.d.rotation = 250, this.right.r.rotation = 330, this.right.speed = 4;
  8407. break;
  8408. case 2:
  8409. this.right.isPlay = !1, this.right.alpha = .5
  8410. }
  8411. this.right.cNum += 1, this.createFx(this.right.x + this.right.d.x, this.right.y + this.right.d.y)
  8412. }
  8413. this.cNum = this.left.cNum + this.right.cNum, 6 <= this.cNum ? this.win() : this.left.isPlay || this.right.isPlay || (this.left.isPlay = this.right.isPlay = !0, this.left.alpha = this.right.alpha = 1)
  8414. }
  8415. }, b.prototype.createFx = function(a, b) {
  8416. var d, c = Fw.tools.createBitmap(c, "runFx");
  8417. c.anchorX = c.anchorY = .5, this.addChild(c), c.x = a, c.y = b, d = this, egret.Tween.get(c).to({
  8418. scaleX: 8,
  8419. scaleY: 8,
  8420. rotation: 360,
  8421. alpha: 0
  8422. }, 500).call(function() {
  8423. d.removeChild(c)
  8424. })
  8425. }, b.prototype.createFx_Over = function(a, b) {
  8426. var d, c = Fw.tools.createBitmap(c, "loseFx");
  8427. c.alpha = .7, c.anchorX = c.anchorY = .5, c.x = a, c.y = b, this.addChild(c), d = this, egret.Tween.get(c).to({
  8428. alpha: 0
  8429. }, 100).wait(100).to({
  8430. alpha: .6
  8431. }, 100).wait(100).to({
  8432. alpha: 0
  8433. }, 100).call(function() {
  8434. d.removeChild(c)
  8435. })
  8436. }, b.prototype.start = function() {
  8437. this.left.alpha = 1, this.right.alpha = 1, this.left.bg.init(), this.right.bg.init(), this.left.cNum = 0, this.right.cNum = 0, this.left.rotations = 0, this.right.rotations = 0, this.left.isPlay = !0, this.right.isPlay = !0, this.left.speed = 4, this.right.speed = -4, this.left.r.rotation = 30, this.right.r.rotation = 330, this.left.d.rotation = 0, this.right.d.rotation = 0, this.next()
  8438. }, b.prototype.stop = function() {
  8439. this.left.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.removeEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.stop()
  8440. }, b.prototype.rstart = function() {}, b.prototype.enterFrame = function() {
  8441. this.left.isPlay && (this.left.r.rotation += this.left.speed, 360 <= this.left.rotations && (this.left.bg.remove() || this.over(), this.left.rotations = 0), GameData.resultRotation(this.left.r), this.left.rotations += Math.abs(this.left.speed)), this.right.isPlay && (this.right.r.rotation += this.right.speed, 360 <= this.right.rotations && (this.right.bg.remove() || this.over(), this.right.rotations = 0), GameData.resultRotation(this.right.r), this.right.rotations += Math.abs(this.right.speed))
  8442. }, b.prototype.next = function() {
  8443. this.left.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), this.right.addEventListener(egret.TouchEvent.TOUCH_BEGIN, this.onTouchBegin, this), Game.GameEnterFrame.start()
  8444. }, b.prototype.over = function() {
  8445. this.stop(), console.log("游戏失败"), this.dispatchEvent(new egret.Event("gamelose", !1, !1))
  8446. }, b.prototype.win = function() {
  8447. this.stop(), console.log("成功通关"), this.dispatchEvent(new egret.Event("gamewin", !1, !1))
  8448. }, b
  8449. }(egret.Sprite), level_9.prototype.__class__ = "level_9", __extends = this.__extends || function(a, b) {
  8450. function c() {
  8451. this.constructor = a
  8452. }
  8453. for (var d in b) b.hasOwnProperty(d) && (a[d] = b[d]);
  8454. c.prototype = b.prototype, a.prototype = new c
  8455. }, outlevel = function(a) {
  8456. function b() {
  8457. var b, c, d, e, f;
  8458. a.call(this), this.textColor = 12040887, b = Fw.tools.createBitmap(b, "bg", !0), b.touchEnabled = !0, b.alpha = 0, this.addChild(b), c = Fw.tools.createBitmap(c, "cloud"), Fw.L_Positioning.StageAlign(c, {
  8459. centerX: !0
  8460. }), c.y = 330, d = Fw.tools.createBitmap(d, "wenhao"), this.addChild(c), this.addChild(d), d.x = 400, d.y = 410, d.scaleX = d.scaleY = .6, this.needTxt = Fw.tools.createTextLabel(this.needTxt, this.textColor, "center", "使用", 24, 160), this.needTxt.x = 200, this.needTxt.y = c.y + 48, this.addChild(this.needTxt), this.goldIcon = Fw.tools.createBitmap(this.goldIcon, "glod"), this.addChild(this.goldIcon), this.numTxt = Fw.tools.createTextLabel(this.numTxt, this.textColor, "left", "X10", 24), this.goldIcon.x = 360, this.goldIcon.y = 370, this.numTxt.x = this.goldIcon.x + this.goldIcon.width, this.numTxt.y = this.needTxt.y, this.addChild(this.numTxt), this.outLevelTxt = Fw.tools.createTextLabel(this.outLevelTxt, this.textColor, "center", "跳过本关", 24, 240), this.outLevelTxt.x = 150, this.outLevelTxt.y = this.needTxt.y + this.needTxt.height + 12, this.addChild(this.outLevelTxt), e = Fw.tools.createBitmap(e, "yes", !0), e.name = "toOutLevel_yes", this.addChild(e), e.x = 200, e.y = 480, f = Fw.tools.createBitmap(f, "no", !0), f.name = "toOutLevel_no", this.addChild(f), f.x = 380, f.y = 480
  8461. }
  8462. return __extends(b, a), b.prototype.init = function(a, b, c) {
  8463. this.needTxt.text = a, this.numTxt.text = b, this.outLevelTxt.text = c
  8464. }, b
  8465. }(egret.Sprite), outlevel.prototype.__class__ = "outlevel";