main.js 252 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609
  1. import * as PIXI from './pixi';
  2. import pixi_spine from './pixi-spine'
  3. import { TimelineMax, Sine, TweenMax, Elastic, Linear, Back } from './TweenMax.min'
  4. import GD from './human.min'
  5. import gc from './GC'
  6. import NetworkManager from './NetworkManager'
  7. import DwSdk from "../duowansdk/DwSdk";
  8. const debug = false;
  9. const objSdk = GD.objSdk = new DwSdk("旅行消消消", debug);
  10. var GAME_IMG_PATH = 'https://pub.dwstatic.com/wxgame/puzzletrip/';
  11. import { pixelRatioX, pixelRatioY, windowWidth, windowHeight } from './fitConfig';
  12. var gWidth = windowWidth * pixelRatioX
  13. var gHeight = windowHeight * pixelRatioY
  14. var CACHE_VER = '0.047';
  15. var RES_DIR_IMG = GAME_IMG_PATH + 'image/';
  16. var RES_DIR_JSON = RES_DIR_IMG + 'json/';
  17. var RES_DIR_PNG = RES_DIR_IMG + 'png/';
  18. var RES_DIR_SPINE = RES_DIR_IMG + 'spine/';
  19. var RES_DIR_SOUND = GAME_IMG_PATH + 'sound/';
  20. var NoHeartPopup, ResultNumberText, loading, lodingOverFlag, flag;
  21. !function (t) {
  22. function e(a) {
  23. if (i[a])
  24. return i[a].exports;
  25. var s = i[a] = {
  26. i: a,
  27. l: !1,
  28. exports: {}
  29. };
  30. return t[a].call(s.exports, s, s.exports, e),
  31. s.l = !0,
  32. s.exports
  33. }
  34. var i = {};
  35. return e.m = t,
  36. e.c = i,
  37. e.i = function (t) {
  38. return t
  39. }
  40. ,
  41. e.d = function (t, i, a) {
  42. e.o(t, i) || Object.defineProperty(t, i, {
  43. configurable: !1,
  44. enumerable: !0,
  45. get: a
  46. })
  47. }
  48. ,
  49. e.n = function (t) {
  50. var i = t && t.__esModule ? function () {
  51. return t["default"]
  52. }
  53. : function () {
  54. return t
  55. }
  56. ;
  57. return e.d(i, "a", i),
  58. i
  59. }
  60. ,
  61. e.o = function (t, e) {
  62. return Object.prototype.hasOwnProperty.call(t, e)
  63. }
  64. ,
  65. e.p = "",
  66. e(e.s = 21)
  67. }([function (t, e) {
  68. gc.DataLoadingView = function () {
  69. PIXI.Container.call(this)
  70. }
  71. ,
  72. gc.DataLoadingView.constructor = gc.DataLoadingView,
  73. gc.DataLoadingView.prototype = Object.create(PIXI.Container.prototype),
  74. gc.DataLoadingView.prototype.init = function () {
  75. var t = new PIXI.Graphics;
  76. t.lineStyle(0),
  77. t.beginFill(0, .7),
  78. t.drawRect(0, 0, 720, 1190),
  79. t.endFill(),
  80. this.addChild(t),
  81. this.loadCircle = new gc.MovieClip("puzzle_loading000", 1, 7, .5, 0),
  82. this.loadCircle.anchor.set(.5, .5),
  83. this.loadCircle.x = GD.width / 2,
  84. this.loadCircle.y = GD.height / 2,
  85. this.addChild(this.loadCircle)
  86. }
  87. ,
  88. gc.DataLoadingView.prototype.updateTransform = function () {
  89. PIXI.Container.prototype.updateTransform.call(this)
  90. }
  91. }
  92. , function (t, e) {
  93. gc.Loader = function () {
  94. PIXI.Container.call(this)
  95. }
  96. ,
  97. gc.Loader.constructor = gc.Loader,
  98. gc.Loader.prototype = Object.create(PIXI.Container.prototype),
  99. gc.Loader.prototype.init = function () {
  100. this.background = null,
  101. this.loadingBar = null,
  102. this.ready = !1,
  103. this.tween = null;
  104. var t = new PIXI.Graphics;
  105. t.beginFill(0, 1),
  106. t.drawRect(0, 0, GD.width, GD.height),
  107. t.endFill(),
  108. this.addChild(t);
  109. for (var e = [], i = 1; 1 >= i; ++i)
  110. e.push(PIXI.Sprite.fromImage(RES_DIR_IMG + "special_airplane_ani" + i + ".png"));
  111. this.character = new PIXI.extras.AnimatedSprite(e),
  112. this.character.loop = !0,
  113. this.character.animationSpeed = .3,
  114. this.character.anchor.set(.5),
  115. this.character.scale.set(.5),
  116. this.character.x = .5 * GD.width,
  117. this.character.y = .5 * GD.height,
  118. this.addChild(this.character),
  119. this.character.gotoAndStop(0),
  120. this.count = 0,
  121. this.tween = TweenMax.to(this.character, .5, {
  122. y: "-=50",
  123. repeat: -1,
  124. yoyo: !0
  125. })
  126. }
  127. ,
  128. gc.Loader.prototype.killAni = function () {
  129. try {
  130. this.tween.kill(!1)
  131. } catch (t) { }
  132. }
  133. ,
  134. gc.Loader.prototype.updateTransform = function () {
  135. PIXI.Container.prototype.updateTransform.call(this)
  136. }
  137. }
  138. , function (t, e) {
  139. gc.MovieClip = function (t, e, i, a, s) {
  140. PIXI.extras.AnimatedSprite.call(this, this.getRepeatTexture(t, e, i, s)),
  141. this.animationSpeed = a,
  142. this.play()
  143. }
  144. ,
  145. gc.MovieClip.constructor = gc.MovieClip,
  146. gc.MovieClip.prototype = Object.create(PIXI.extras.AnimatedSprite.prototype),
  147. gc.MovieClip.prototype.setAnimation = function (t, e, i, a, s) {
  148. this.textures = this.getRepeatTexture(t, e, i, s),
  149. this.animationSpeed = a
  150. }
  151. ,
  152. gc.MovieClip.prototype.getRepeatTexture = function (t, e, i, a) {
  153. for (var s = [], r = a || 1; r--;)
  154. s = s.concat(this.getTexture(t, e, i));
  155. return s
  156. }
  157. ,
  158. gc.MovieClip.prototype.getTexture = function (t, e, i) {
  159. e = e || 1;
  160. for (var a = [], s = i - e + 1, r = e; s--;)
  161. a.push(PIXI.Texture.fromFrame(t + r + ".png")),
  162. r++;
  163. return a
  164. }
  165. ,
  166. gc.MovieClip.prototype.updateTransform = function () {
  167. PIXI.extras.AnimatedSprite.prototype.updateTransform.call(this)
  168. }
  169. }
  170. , function (t, e) {
  171. gc.NumberText = function (t, e, i, a, s, r, n) {
  172. this.CENTER = "center",
  173. this.RIGHT = "right",
  174. this.LEFT = "left",
  175. this.value = 0,
  176. this.isChange = !1,
  177. this.list = [],
  178. this.tmpList = [],
  179. this.fileName = t,
  180. this.align = e,
  181. this.space = i,
  182. this.iconName = a,
  183. this.iconAlign = s,
  184. this.commaName = r,
  185. this.iconSpace = n || this.space,
  186. this.icon = null,
  187. this.tl = new TimelineMax,
  188. PIXI.Container.call(this),
  189. this.container = new PIXI.Container,
  190. this.addChild(this.container),
  191. this.setValue(0)
  192. }
  193. ,
  194. gc.NumberText.constructor = gc.NumberText,
  195. gc.NumberText.prototype = Object.create(PIXI.Container.prototype),
  196. gc.NumberText.prototype.setValue = function (t) {
  197. this.value = t,
  198. this.isChange = !0
  199. }
  200. ,
  201. gc.NumberText.prototype.valueTween = function (t) {
  202. this.tl.to(this, .5, {
  203. value: t,
  204. onUpdate: function () {
  205. this.value = Math.floor(this.value),
  206. this.isChange = !0
  207. }
  208. .bind(this)
  209. })
  210. }
  211. ,
  212. gc.NumberText.prototype.getNumberSprite = function (t) {
  213. var e, i = this.fileName + t + ".png";
  214. return this.tmpList.length > 0 ? (e = this.tmpList.shift(),
  215. e.texture = PIXI.Texture.fromFrame(i)) : e = PIXI.Sprite.fromFrame(i),
  216. e
  217. }
  218. ,
  219. gc.NumberText.prototype.getCommaSprite = function () {
  220. var t, e = this.commaName + ".png";
  221. return console.log(e),
  222. this.tmpList.length > 0 ? (t = this.tmpList.shift(),
  223. t.texture = PIXI.Texture.fromFrame(e)) : t = PIXI.Sprite.fromFrame(e),
  224. t
  225. }
  226. ,
  227. gc.NumberText.prototype.removeAll = function () {
  228. for (var t, e = this.list.length; e--;)
  229. t = this.list.shift(),
  230. this.tmpList.push(t);
  231. this.container && this.container.removeChildren()
  232. }
  233. ,
  234. gc.NumberText.prototype.updateTransform = function () {
  235. if (this.isChange) {
  236. this.removeAll();
  237. var t, e, i = this.commaName ? Util.comma(this.value) : this.value.toString(), a = 0, s = 0, r = i.length;
  238. for (this.iconName && (this.icon || (this.icon = PIXI.Sprite.fromFrame(this.iconName + ".png")),
  239. this.container.addChild(this.icon),
  240. "left" == this.iconAlign && (s += this.icon.width + this.iconSpace)); r--;)
  241. e = i.substr(a, 1),
  242. "," == e ? (t = this.getCommaSprite(),
  243. t.y = 25) : (t = this.getNumberSprite(parseInt(e) + 1),
  244. t.y = 0),
  245. t.x = s,
  246. s += t.width,
  247. r > 0 && (s += this.space),
  248. a++ ,
  249. this.container.addChild(t),
  250. this.list[r] = t;
  251. "right" == this.iconAlign && (this.icon.x = s,
  252. s += this.icon.width + this.iconSpace),
  253. this.align == this.CENTER ? this.container.x = -s / 2 : this.align == this.RIGHT && (this.container.x = -s),
  254. this.isChange = !1
  255. }
  256. PIXI.Container.prototype.updateTransform.call(this)
  257. }
  258. }
  259. , function (t, e) {
  260. gc.GameBuilding = function () {
  261. PIXI.Container.call(this),
  262. this.buildingArray = ["123", "korea_building_0001", "korea_building_0002", "china_building_0001", "china_building_0002", "egypt_building_0001", "egypt_building_0002", "greece_building_0001", "greece_building_0002", "france_building_0001", "france_building_0002", "brazil_building_0001", "brazil_building_0002", "america_building_0001", "america_building_0002"],
  263. this.moveTime = 1e3,
  264. this.Interval = null,
  265. this.buildingTween1 = null,
  266. this.buildingTween2 = null,
  267. this.isMoving = !1,
  268. this.building1 = PIXI.Sprite.fromFrame(this.buildingArray[1] + ".png"),
  269. this.building1.anchor.set(.5, 1),
  270. this.building1.y = this.building1.height + .132 * GD.height,
  271. this.building1.x = GD.width / 2,
  272. this.building1.rotation = .268 * Math.PI,
  273. this.addChild(this.building1),
  274. this.building2 = PIXI.Sprite.fromFrame(this.buildingArray[1] + ".png"),
  275. this.building2.anchor.set(.5, 1),
  276. this.building2.y = this.building2.height + .132 * GD.height,
  277. this.building2.x = GD.width / 2,
  278. this.building2.rotation = 0,
  279. this.addChild(this.building2)
  280. }
  281. ,
  282. gc.GameBuilding.constructor = gc.GameBuilding,
  283. gc.GameBuilding.prototype = Object.create(PIXI.Container.prototype),
  284. gc.GameBuilding.prototype.startMove = function () {
  285. this.isMoving = !0,
  286. this.resetRotation(),
  287. this.Interval = setInterval(function () {
  288. this.resetRotation()
  289. }
  290. .bind(this), this.moveTime)
  291. }
  292. ,
  293. gc.GameBuilding.prototype.setBuildingRotation = function () {
  294. this.building1.rotation = .268 * Math.PI,
  295. this.building2.rotation = 0
  296. }
  297. ,
  298. gc.GameBuilding.prototype.resetBudingTexture = function (t) {
  299. this.building1.texture = new PIXI.Texture.fromFrame(this.buildingArray[t] + ".png"),
  300. this.building2.texture = new PIXI.Texture.fromFrame(this.buildingArray[t] + ".png")
  301. }
  302. ,
  303. gc.GameBuilding.prototype.resetRotation = function () {
  304. null != this.buildingTween1 && (this.buildingTween1.kill(!1),
  305. this.buildingTween2.kill(!1)),
  306. this.building1.rotation <= .26 * -Math.PI && (this.building1.rotation = this.building2.rotation + .268 * Math.PI),
  307. this.building2.rotation <= .26 * -Math.PI && (this.building2.rotation = this.building1.rotation + .268 * Math.PI);
  308. var t = this.building1.rotation
  309. , e = this.building2.rotation;
  310. t -= .01 * Math.PI,
  311. e -= .01 * Math.PI,
  312. this.buildingTween1 = TweenMax.to(this.building1, (this.moveTime - 10) / 1e3, {
  313. rotation: t,
  314. ease: Linear.easeNone
  315. }),
  316. this.buildingTween2 = TweenMax.to(this.building2, (this.moveTime - 10) / 1e3, {
  317. rotation: e,
  318. ease: Linear.easeNone
  319. })
  320. }
  321. ,
  322. gc.GameBuilding.prototype.resetTime = function (t) {
  323. 100 >= t && (t = 100),
  324. this.moveTime = t
  325. }
  326. ,
  327. gc.GameBuilding.prototype.stopInterval = function () {
  328. this.isMoving = !1,
  329. null != this.buildingTween1 && null != this.buildingTween2 && (this.buildingTween1.kill(!1),
  330. this.buildingTween2.kill(!1)),
  331. clearInterval(this.Interval)
  332. }
  333. ,
  334. gc.GameBuilding.prototype.updateTransform = function () {
  335. PIXI.Container.prototype.updateTransform.call(this)
  336. }
  337. }
  338. , function (t, e) {
  339. gc.GameEdingPage = function () {
  340. PIXI.Container.call(this),
  341. this.endingBg = PIXI.Sprite.fromFrame("ending_bg.png"),
  342. this.addChild(this.endingBg),
  343. this.karakter = PIXI.Sprite.fromFrame("ending_cha.png"),
  344. this.karakter.anchor.set(.5, .5),
  345. this.karakter.x = GD.width / 2,
  346. this.karakter.y = .755 * GD.height
  347. }
  348. ,
  349. gc.GameEdingPage.constructor = gc.GameEdingPage,
  350. gc.GameEdingPage.prototype = Object.create(PIXI.Container.prototype),
  351. gc.GameEdingPage.prototype.showChaAniamtion = function () {
  352. TweenMax.from(this.karakter, 1, {
  353. delay: .2,
  354. y: GD.height + this.karakter.height,
  355. onStart: function () {
  356. this.addChild(this.karakter);
  357. try {
  358. clearInterval(this.parent.guidTime)
  359. } catch (t) { }
  360. }
  361. .bind(this),
  362. ease: Back.easeOut,
  363. onComplete: function () {
  364. TweenMax.to(this.karakter, 2, {
  365. alpha: 1,
  366. onComplete: function () {
  367. gc.flag = 0,
  368. GD.soundAllStop(),
  369. this.parent.scoreSave()
  370. }
  371. .bind(this)
  372. })
  373. }
  374. .bind(this)
  375. })
  376. }
  377. ,
  378. gc.GameEdingPage.prototype.updateTransform = function () {
  379. PIXI.Container.prototype.updateTransform.call(this)
  380. }
  381. }
  382. , function (t, e) {
  383. gc.GameGuied = function () {
  384. PIXI.Container.call(this),
  385. this.inGuied = !1,
  386. this.dragPuzzleArray = [],
  387. this.blockArray = []
  388. }
  389. ,
  390. gc.GameGuied.constructor = gc.GameGuied,
  391. gc.GameGuied.prototype = Object.create(PIXI.Container.prototype),
  392. gc.GameGuied.prototype.showGuied = function (t, e) {
  393. this.removeChildren();
  394. for (var i = 0; i < t.length && !(i > 2); i++) {
  395. var a = t[i][0]
  396. , s = t[i][1]
  397. , r = new PIXI.Sprite(e[a][s][1].texture);
  398. r.anchor.set(.5, .5),
  399. r.x = e[a][s][1].x,
  400. r.y = e[a][s][1].y,
  401. this.addChild(r),
  402. TweenMax.to(r.scale, .3, {
  403. x: 1.1,
  404. y: 1.1,
  405. repeat: -1,
  406. yoyo: !0
  407. })
  408. }
  409. }
  410. ,
  411. gc.GameGuied.prototype.checkCanDragPuzzle = function (t, e) {
  412. var i = t[0][0]
  413. , a = t[0][1]
  414. , s = e[i][a][0];
  415. this.dragPuzzleArray = [],
  416. this.dragPuzzleArray.push([i, a]),
  417. this.blockArray = [];
  418. for (var r = 0; 6 > r; r++) {
  419. for (var n = [], o = 0; 7 > o; o++)
  420. n.push(e[r][o][0]);
  421. this.blockArray.push(n)
  422. }
  423. this.blockArray[i][a] = 0,
  424. this.newCheckDrag(i - 1, a, s),
  425. this.newCheckDrag(i + 1, a, s),
  426. this.newCheckDrag(i, a - 1, s),
  427. this.newCheckDrag(i, a + 1, s),
  428. a % 2 == 0 ? (this.newCheckDrag(i + 1, a - 1, s),
  429. this.newCheckDrag(i + 1, a + 1, s)) : (this.newCheckDrag(i - 1, a - 1, s),
  430. this.newCheckDrag(i - 1, a + 1, s)),
  431. this.newCheckDrag(i, a, s)
  432. }
  433. ,
  434. gc.GameGuied.prototype.newCheckDrag = function (t, e, i) {
  435. t >= 0 && 6 > t && e >= 0 && 7 > e && (this.blockArray[t][e] == i || this.blockArray[t][e] > 5 && this.blockArray[t][e] < 15) && (this.dragPuzzleArray.push([t, e]),
  436. this.blockArray[t][e] = 0,
  437. this.newCheckDrag(t - 1, e, i),
  438. this.newCheckDrag(t + 1, e, i),
  439. this.newCheckDrag(t, e - 1, i),
  440. this.newCheckDrag(t, e + 1, i),
  441. e % 2 == 0 ? (this.newCheckDrag(t + 1, e - 1, i),
  442. this.newCheckDrag(t + 1, e + 1, i)) : (this.newCheckDrag(t - 1, e - 1, i),
  443. this.newCheckDrag(t - 1, e + 1, i)))
  444. }
  445. ,
  446. gc.GameGuied.prototype.removeAll = function () {
  447. this.removeChildren()
  448. }
  449. ,
  450. gc.GameGuied.prototype.checkPuzzle = function (t) {
  451. if (!this.inGuied) {
  452. for (var e = [], i = 5; i >= 0; i--)
  453. for (var a = 0; 7 > a; a++) {
  454. var s = t[i][a][0];
  455. if (s > 5 && 14 > s)
  456. return e.push([i, a]),
  457. void this.showGuied(e, t)
  458. }
  459. for (var i = 0; 6 > i; i++)
  460. for (var a = 0; 7 > a; a++) {
  461. e = [];
  462. var s = t[i][a][0];
  463. if (!(s > 14)) {
  464. if (s > 5 && 14 > s)
  465. return e.push([i, a]),
  466. void this.showGuied(e, t);
  467. if (14 == s) {
  468. e.push([i, a]);
  469. var r = []
  470. , n = []
  471. , o = []
  472. , h = []
  473. , l = []
  474. , p = [];
  475. if (i - 1 >= 0 && (1 == t[i - 1][a][0] ? r.push([i - 1, a]) : 2 == t[i - 1][a][0] ? n.push([i - 1, a]) : 3 == t[i - 1][a][0] ? o.push([i - 1, a]) : 4 == t[i - 1][a][0] ? h.push([i - 1, a]) : 5 == t[i - 1][a][0] ? l.push([i - 1, a]) : 14 == t[i - 1][a][0] && p.push([i - 1, a])),
  476. 5 >= i + 1 && (1 == t[i + 1][a][0] ? r.push([i + 1, a]) : 2 == t[i + 1][a][0] ? n.push([i + 1, a]) : 3 == t[i + 1][a][0] ? o.push([i + 1, a]) : 4 == t[i + 1][a][0] ? h.push([i + 1, a]) : 5 == t[i + 1][a][0] ? l.push([i + 1, a]) : 14 == t[i + 1][a][0] && p.push([i + 1, a])),
  477. a - 1 >= 0 && (1 == t[i][a - 1][0] ? r.push([i, a - 1]) : 2 == t[i][a - 1][0] ? n.push([i, a - 1]) : 3 == t[i][a - 1][0] ? o.push([i, a - 1]) : 4 == t[i][a - 1][0] ? h.push([i, a - 1]) : 5 == t[i][a - 1][0] ? l.push([i, a - 1]) : 14 == t[i][a - 1][0] && p.push([i, a - 1])),
  478. 6 >= a + 1 && (1 == t[i][a + 1][0] ? r.push([i, a + 1]) : 2 == t[i][a + 1][0] ? n.push([i, a + 1]) : 3 == t[i][a + 1][0] ? o.push([i, a + 1]) : 4 == t[i][a + 1][0] ? h.push([i, a + 1]) : 5 == t[i][a + 1][0] ? l.push([i, a + 1]) : 14 == t[i][a + 1][0] && p.push([i, a + 1])),
  479. a % 2 == 0 ? (a - 1 >= 0 && 5 >= i + 1 && (1 == t[i + 1][a - 1][0] ? r.push([i + 1, a - 1]) : 2 == t[i + 1][a - 1][0] ? n.push([i + 1, a - 1]) : 3 == t[i + 1][a - 1][0] ? o.push([i + 1, a - 1]) : 4 == t[i + 1][a - 1][0] ? h.push([i + 1, a - 1]) : 5 == t[i + 1][a - 1][0] ? l.push([i + 1, a - 1]) : 14 == t[i + 1][a - 1][0] && p.push([i + 1, a - 1])),
  480. 6 >= a + 1 && 5 >= i + 1 && (1 == t[i + 1][a + 1][0] ? r.push([i + 1, a + 1]) : 2 == t[i + 1][a + 1][0] ? n.push([i + 1, a + 1]) : 3 == t[i + 1][a + 1][0] ? o.push([i + 1, a + 1]) : 4 == t[i + 1][a + 1][0] ? h.push([i + 1, a + 1]) : 5 == t[i + 1][a + 1][0] ? l.push([i + 1, a + 1]) : 14 == t[i + 1][a + 1][0] && p.push([i + 1, a + 1]))) : (a - 1 >= 0 && i - 1 >= 0 && (1 == t[i - 1][a - 1][0] ? r.push([i - 1, a - 1]) : 2 == t[i - 1][a - 1][0] ? n.push([i - 1, a - 1]) : 3 == t[i - 1][a - 1][0] ? o.push([i - 1, a - 1]) : 4 == t[i - 1][a - 1][0] ? h.push([i - 1, a - 1]) : 5 == t[i - 1][a - 1][0] ? l.push([i - 1, a - 1]) : 14 == t[i - 1][a - 1][0] && p.push([i - 1, a - 1])),
  481. 6 >= a + 1 && i - 1 >= 0 && (1 == t[i - 1][a + 1][0] ? r.push([i - 1, a + 1]) : 2 == t[i - 1][a + 1][0] ? n.push([i - 1, a + 1]) : 3 == t[i - 1][a + 1][0] ? o.push([i - 1, a + 1]) : 4 == t[i - 1][a + 1][0] ? h.push([i - 1, a + 1]) : 5 == t[i - 1][a + 1][0] ? l.push([i - 1, a + 1]) : 14 == t[i - 1][a + 1][0] && p.push([i - 1, a + 1]))),
  482. p.length > 0) {
  483. if (r.length > 0)
  484. return e.push([r[0][0], r[0][1]]),
  485. e.push([p[0][0], p[0][1]]),
  486. this.showGuied(e, t),
  487. !0;
  488. if (n.length > 0)
  489. return e.push([n[0][0], n[0][1]]),
  490. e.push([p[0][0], p[0][1]]),
  491. this.showGuied(e, t),
  492. !0;
  493. if (o.length > 0)
  494. return e.push([o[0][0], o[0][1]]),
  495. e.push([p[0][0], p[0][1]]),
  496. this.showGuied(e, t),
  497. !0;
  498. if (h.length > 0)
  499. return e.push([h[0][0], h[0][1]]),
  500. e.push([p[0][0], p[0][1]]),
  501. this.showGuied(e, t),
  502. !0;
  503. if (l.length > 0)
  504. return e.push([l[0][0], l[0][1]]),
  505. e.push([p[0][0], p[0][1]]),
  506. this.showGuied(e, t),
  507. !0
  508. } else {
  509. if (r.length > 1)
  510. return e.push([r[0][0], r[0][1]]),
  511. e.push([r[1][0], r[1][1]]),
  512. this.showGuied(e, t),
  513. !0;
  514. if (n.length > 1)
  515. return e.push([n[0][0], n[0][1]]),
  516. e.push([n[1][0], n[1][1]]),
  517. this.showGuied(e, t),
  518. !0;
  519. if (o.length > 1)
  520. return e.push([o[0][0], o[0][1]]),
  521. e.push([o[1][0], o[1][1]]),
  522. this.showGuied(e, t),
  523. !0;
  524. if (h.length > 1)
  525. return e.push([h[0][0], h[0][1]]),
  526. e.push([h[1][0], h[1][1]]),
  527. this.showGuied(e, t),
  528. !0;
  529. if (l.length > 1)
  530. return e.push([l[0][0], l[0][1]]),
  531. e.push([l[1][0], l[1][1]]),
  532. this.showGuied(e, t),
  533. !0
  534. }
  535. } else {
  536. e.push([i, a]);
  537. var u = 0
  538. , c = 0;
  539. if (i - 1 >= 0 && (s == t[i - 1][a][0] && (e.push([i - 1, a]),
  540. u++),
  541. 14 == t[i - 1][a][0] && (e.push([i - 1, a]),
  542. c++)),
  543. 5 >= i + 1 && (s == t[i + 1][a][0] && (e.push([i + 1, a]),
  544. u++),
  545. 14 == t[i + 1][a][0] && (e.push([i + 1, a]),
  546. c++)),
  547. a - 1 >= 0 && (s == t[i][a - 1][0] && (e.push([i, a - 1]),
  548. u++),
  549. 14 == t[i][a - 1][0] && (e.push([i, a - 1]),
  550. c++)),
  551. 6 >= a + 1 && (s == t[i][a + 1][0] && (e.push([i, a + 1]),
  552. u++),
  553. 14 == t[i][a + 1][0] && (e.push([i, a + 1]),
  554. c++)),
  555. a % 2 == 0 ? (a - 1 >= 0 && 5 >= i + 1 && (s == t[i + 1][a - 1][0] && (e.push([i + 1, a - 1]),
  556. u++),
  557. 14 == t[i + 1][a - 1][0] && (e.push([i + 1, a - 1]),
  558. c++)),
  559. 6 >= a + 1 && 5 >= i + 1 && (s == t[i + 1][a + 1][0] && (e.push([i + 1, a + 1]),
  560. u++),
  561. 14 == t[i + 1][a + 1][0] && (e.push([i + 1, a + 1]),
  562. c++))) : (a - 1 >= 0 && i - 1 >= 0 && (s == t[i - 1][a - 1][0] && (e.push([i - 1, a - 1]),
  563. u++),
  564. 14 == t[i - 1][a - 1][0] && (e.push([i - 1, a - 1]),
  565. c++)),
  566. 6 >= a + 1 && i - 1 >= 0 && (s == t[i - 1][a + 1][0] && (e.push([i - 1, a + 1]),
  567. u++),
  568. 14 == t[i - 1][a + 1][0] && (e.push([i - 1, a + 1]),
  569. c++))),
  570. u + c >= 2 && u >= 1)
  571. return void this.showGuied(e, t);
  572. e = []
  573. }
  574. }
  575. }
  576. this.showGuied([], t)
  577. }
  578. }
  579. ,
  580. gc.GameGuied.prototype.updateTransform = function () {
  581. PIXI.Container.prototype.updateTransform.call(this)
  582. }
  583. }
  584. , function (t, e) {
  585. gc.GameKariMessage = function () {
  586. PIXI.Container.call(this),
  587. this.showMessage = !0,
  588. this.messageTimer = null,
  589. this.timeoutTimer = null,
  590. this.mesTime = 8e3,
  591. this.removeTime = 4e3,
  592. this.messageText = [[], ["안녕하세요!", "반갑습니다!", " 남은 횟수를 \n잘 체크해야돼!", " 6개의 퍼즐을 드래그\n하면 특수 퍼즐이 나와!", " 8개의 퍼즐을 이으면\n 더 강력한 퍼즐이 나와", "보라색 퍼즐은 3개로\n신발을 만들수 있어."], ["니하오!", "런스 닌 헌 까오씽!", " 남은 횟수를 \n잘 체크해야돼!", " 6개의 퍼즐을 드래그\n하면 특수 퍼즐이 나와!", " 8개의 퍼즐을 이으면\n 더 강력한 퍼즐이 나와", "보라색 퍼즐은 3개로\n신발을 만들수 있어."], ["아흘란 와사흘란!", "사룹두 두벨리캅", " 남은 횟수를 \n잘 체크해야돼!", " 6개의 퍼즐을 드래그\n하면 특수 퍼즐이 나와!", " 8개의 퍼즐을 이으면\n 더 강력한 퍼즐이 나와", "보라색 퍼즐은 3개로\n신발을 만들수 있어."], ["야수!", "셰로 뽈리", " 남은 횟수를 \n잘 체크해야돼!", " 6개의 퍼즐을 드래그\n하면 특수 퍼즐이 나와!", " 8개의 퍼즐을 이으면\n 더 강력한 퍼즐이 나와", "보라색 퍼즐은 3개로\n신발을 만들수 있어."], ["쌀뤼!", "엉셩띠드부 꼬네뜨", " 남은 횟수를 \n잘 체크해야돼!", " 6개의 퍼즐을 드래그\n하면 특수 퍼즐이 나와!", " 8개의 퍼즐을 이으면\n 더 강력한 퍼즐이 나와", "보라색 퍼즐은 3개로\n신발을 만들수 있어."], ["올라!", "무이뜨 쁘라제르!", " 남은 횟수를 \n잘 체크해야돼!", " 6개의 퍼즐을 드래그\n하면 특수 퍼즐이 나와!", " 8개의 퍼즐을 이으면\n 더 강력한 퍼즐이 나와", "보라색 퍼즐은 3개로\n신발을 만들수 있어."], ["하이!", "나이스 투 밋 츄!", " 남은 횟수를 \n잘 체크해야돼!", " 6개의 퍼즐을 드래그\n하면 특수 퍼즐이 나와!", " 8개의 퍼즐을 이으면\n 더 강력한 퍼즐이 나와", "보라색 퍼즐은 3개로\n신발을 만들수 있어."]],
  593. this.uiSpeechs1 = [[], ["ui_speech_0001.png", "ui_speech_0002.png"], ["ui_speech_0003.png", "ui_speech_0004.png"], ["ui_speech_0005.png", "ui_speech_0006.png"], ["ui_speech_0007.png", "ui_speech_0008.png"], ["ui_speech_0009.png", "ui_speech_0010.png"], ["ui_speech_0011.png", "ui_speech_0012.png"], ["ui_speech_0013.png", "ui_speech_0014.png"]],
  594. this.uiSpeechs2 = ["ui_speech_0015.png", "ui_speech_0016.png", "ui_speech_0017.png", "ui_speech_0018.png"],
  595. this.messageBg = PIXI.Sprite.fromFrame("ui_speech_0001.png"),
  596. this.messageBg.x = GD.width / 2,
  597. this.messageBg.y = .1 * GD.height,
  598. this.messageBg.anchor.set(.5, .5)
  599. }
  600. ,
  601. gc.GameKariMessage.constructor = gc.GameKariMessage,
  602. gc.GameKariMessage.prototype = Object.create(PIXI.Container.prototype),
  603. gc.GameKariMessage.prototype.startMessage = function () {
  604. this.messageTimer = setInterval(function () {
  605. this.showMessage && this.startTime()
  606. }
  607. .bind(this), this.mesTime)
  608. }
  609. ,
  610. gc.GameKariMessage.prototype.startTime = function () {
  611. if (!gc.isPaused) {
  612. var t = Math.floor(1e4 * Math.random()) % 6;
  613. 2 > t ? this.messageBg.texture = PIXI.Texture.fromFrame(this.uiSpeechs1[Math.ceil(this.parent.stageNum / 2)][t]) : this.messageBg.texture = PIXI.Texture.fromFrame(this.uiSpeechs2[t - 2]),
  614. this.addChild(this.messageBg),
  615. this.timeoutTimer = setTimeout(function () {
  616. this.removeChild(this.messageBg)
  617. }
  618. .bind(this), this.removeTime)
  619. }
  620. }
  621. ,
  622. gc.GameKariMessage.prototype.stopAllTime = function () {
  623. clearInterval(this.messageTimer),
  624. clearTimeout(this.timeoutTimer)
  625. }
  626. ,
  627. gc.GameKariMessage.prototype.updateTransform = function () {
  628. PIXI.Container.prototype.updateTransform.call(this)
  629. }
  630. }
  631. , function (t, e) {
  632. gc.GameMainSoundPopup = function () {
  633. PIXI.Container.call(this),
  634. this.darkBg = new PIXI.Graphics,
  635. this.darkBg.lineStyle(1, 0, 1),
  636. this.darkBg.beginFill(0, .8),
  637. this.darkBg.drawRect(0, 0, gc.width, gc.height),
  638. this.darkBg.endFill(),
  639. this.darkBg.interactive = !0,
  640. this.setTouchEnd(this.darkBg),
  641. this.bg = PIXI.Sprite.fromFrame("popup_sound.png"),
  642. this.bg.anchor.set(.5),
  643. this.bg.x = GD.width / 2,
  644. this.bg.y = GD.height / 2,
  645. this.exitBtn = PIXI.Sprite.fromFrame("btn_exit.png"),
  646. this.exitBtn.anchor.set(.5),
  647. this.exitBtn.x = 230,
  648. this.exitBtn.y = -250,
  649. this.bg.addChild(this.exitBtn),
  650. this.bgmBtn = PIXI.Sprite.fromFrame("sound_btn_bg1.png"),
  651. this.bgmBtn.anchor.set(.5),
  652. this.bgmBtn.y = -10,
  653. this.bg.addChild(this.bgmBtn),
  654. this.effectBtn = PIXI.Sprite.fromFrame("sound_btn_effect1.png"),
  655. this.effectBtn.anchor.set(.5),
  656. this.effectBtn.y = 110,
  657. this.bg.addChild(this.effectBtn),
  658. this.setTouchStartAction(this.bgmBtn, this.clickedBgmBtn, this),
  659. this.setTouchStartAction(this.effectBtn, this.clickedEffectBtn, this),
  660. this.setTouchStart(this.exitBtn, this.closePopup, this)
  661. }
  662. ,
  663. gc.GameMainSoundPopup.constructor = gc.GameMainSoundPopup,
  664. gc.GameMainSoundPopup.prototype = Object.create(PIXI.Container.prototype),
  665. gc.GameMainSoundPopup.prototype.init = function () {
  666. this.removeAll(),
  667. this.setInteractive(!1),
  668. this.initBtnSta(),
  669. this.addChild(this.darkBg),
  670. this.addChild(this.bg),
  671. this.bg.scale.set(.1),
  672. TweenMax.to(this.bg.scale, .2, {
  673. x: 1,
  674. y: 1,
  675. ease: Back.easeOut,
  676. onComplete: this.endBgMotion.bind(this)
  677. })
  678. }
  679. ,
  680. gc.GameMainSoundPopup.prototype.endBgMotion = function () {
  681. this.setInteractive(!0)
  682. }
  683. ,
  684. gc.GameMainSoundPopup.prototype.initBtnSta = function () {
  685. gc.bgmFlag ? this.bgmBtn.texture = PIXI.Texture.fromFrame("sound_btn_bg1.png") : this.bgmBtn.texture = PIXI.Texture.fromFrame("sound_btn_bg2.png"),
  686. gc.soundFlag ? this.effectBtn.texture = PIXI.Texture.fromFrame("sound_btn_effect1.png") : this.effectBtn.texture = PIXI.Texture.fromFrame("sound_btn_effect2.png")
  687. }
  688. ,
  689. gc.GameMainSoundPopup.prototype.closePopup = function () {
  690. this.setInteractive(!1),
  691. this.removeAll(),
  692. this.emit("POPUP_CLOSE_EVENT")
  693. }
  694. ,
  695. gc.GameMainSoundPopup.prototype.clickedBgmBtn = function () {
  696. gc.bgmFlag = !gc.bgmFlag,
  697. gc.setStorage(gc.storagebgm, gc.bgmFlag),
  698. this.initBtnSta()
  699. }
  700. ,
  701. gc.GameMainSoundPopup.prototype.clickedEffectBtn = function () {
  702. gc.soundFlag = !gc.soundFlag,
  703. gc.setStorage(gc.storagesound, gc.soundFlag),
  704. gc.soundFlag || gc.stopAllEffectSound(),
  705. this.initBtnSta()
  706. }
  707. ,
  708. gc.GameMainSoundPopup.prototype.setInteractive = function (t) {
  709. this.bgmBtn.interactive = t,
  710. this.effectBtn.interactive = t,
  711. this.exitBtn.interactive = t
  712. }
  713. ,
  714. gc.GameMainSoundPopup.prototype.removeAll = function () {
  715. this.removeChildren()
  716. }
  717. ,
  718. gc.GameMainSoundPopup.prototype.updateTransform = function () {
  719. PIXI.Container.prototype.updateTransform.call(this)
  720. }
  721. }
  722. , function (t, e) {
  723. gc.GamePlayPage = function () {
  724. PIXI.Container.call(this),
  725. this.stoneBlockArray = [0, 0, 2, 0, 3, 0, 3, 0, 4, 0, 4, 0, 5, 0, 6],
  726. this.stageTurnNum = [0, 40, 40, 60, 60, 75, 75, 75, 75, 80, 80, 80, 80, 85, 85],
  727. this.turnCountArray = [0, 30, 15, 20, 20, 25, 25, 30, 30, 30, 30, 35, 35, 35, 35, 35],
  728. this.turnScoreArray = [0, 1500, 1500, 2e3, 2e3, 2500, 2500, 3e3, 3e3, 3500, 3500, 4e3, 4e3, 4500, 4500],
  729. this.stageStonBlockChance = [0, 0, 10, 0, 10, 0, 10, 0, 15, 0, 15, 0, 15, 0, 20],
  730. this.countryClearPlusVal = [10, 10, 10, 10, 10, 10, 10],
  731. this.stageClearBonusSocre = [1500, 2e3, 2500, 3e3, 3500, 4e3, 4500],
  732. this.groundArray = ["123", "korea_ground_0001", "korea_ground_0002", "china_ground_0001", "china_ground_0002", "egypt_ground_0001", "egypt_ground_0002", "greece_ground_0001", "greece_ground_0002", "france_ground_0001", "france_ground_0002", "brazil_ground_0001", "brazil_ground_0002", "america_ground_0001", "america_ground_0002"],
  733. this.blockNameArray = ["123", "block_000", "block_000", "block_000", "block_000", "block_000", "block_000", "block_000", "block_000", "block_000", "block_000", "block_000", "block_000", "block_000", "block_000"],
  734. this.randMarkArray = ["123", "korea_randmark_0001", "korea_randmark_0002", "china_randmark_0001", "china_randmark_0002", "egypt_randmark_0001", "egypt_randmark_0002", "greece_randmark_0001", "greece_randmark_0002", "france_randmark_0001", "france_randmark_0002", "brazil_randmark_0001", "brazil_randmark_0002", "america_randmark_0001", "america_randmark_0002"],
  735. this.stageBlockTypeArray = [[1], [-1, -1, -1, -1], [100, 0, 0, 0], [-1, -1, -1, -1], [100, -1, -1, -1], [-1, -1, -1, -1], [50, 100, -1, -1], [-1, -1, -1, -1], [50, 100, -1, -1], [-1, -1, -1, -1], [33, 100, -1, -1], [-1, -1, -1, -1], [0, 100, -1, -1], [-1, -1, -1, -1], [0, 100, -1, -1]],
  736. this.sPuzzleStartY = 577,
  737. this.dPuzzleStartY = 528,
  738. this.puzzleStartX = 109,
  739. this.puzzleXSIZE = 7,
  740. this.puzzleYSIZE = 6,
  741. this.pXp = 84,
  742. this.pYp = 95.5,
  743. this.overAnimationFlag = !1,
  744. this.itemBombOver = !1,
  745. this.feverTimeStart = !1,
  746. this.item6Num = 5,
  747. this.item12Num = 10,
  748. this.feverTurnCount = 1,
  749. this.shipAniTime = .1,
  750. this.singleShipCount = 0,
  751. this.trainCount = 0,
  752. this.moveClipTime = 1.5,
  753. this.shipClipTime = .3,
  754. this.copterBombTime = .3,
  755. this.copterMovieClipTime = 1,
  756. this.stonClearTime = .2,
  757. this.trainThrowTime = .2,
  758. this.shipThrowTime = .2,
  759. this.planeBombTime = .3,
  760. this.shipBombBtweenTime = .15,
  761. this.dropPuzzleCount = 0,
  762. this.graphics = new PIXI.Graphics,
  763. this.startTouchX = -1,
  764. this.startTouchY = -1,
  765. this.gameOverPopupSprite = PIXI.Sprite.fromFrame("ui_gameover.png"),
  766. this.gameOverPopupSprite.anchor.set(.5, .5),
  767. this.gameOverPopupSprite.x = GD.width / 2,
  768. this.gameOverPopupSprite.y = GD.height / 2,
  769. this.endingPage = new gc.GameEdingPage,
  770. this.canDragBg = PIXI.Sprite.fromFrame("puzzle_popup_shadow.png"),
  771. this.canDragBg.anchor.set(.5),
  772. this.canDragBg.x = GD.width / 2,
  773. this.canDragBg.y = 790,
  774. this.scoreEffect = new gc.GameScoreEffectContianer,
  775. this.countFlag = 0,
  776. this.resultBox = new gc.ResultView,
  777. this.resultBox.on("GOTO_MAINPAGE", function () {
  778. this.emit("GOTO_MAINPAGE")
  779. }
  780. .bind(this))
  781. }
  782. ,
  783. gc.GamePlayPage.constructor = gc.GamePlayPage,
  784. gc.GamePlayPage.prototype = Object.create(PIXI.Container.prototype),
  785. gc.GamePlayPage.prototype.init = function () {
  786. this.removeChildren(),
  787. "ios" != GD.AGENT && (gc.soundBt.x = .94 * GD.width),
  788. this.loading = null,
  789. this.level1 = !1,
  790. this.level2 = !1,
  791. this.level3 = !1,
  792. this.level4 = !1,
  793. this.moveGaugeMax = 5,
  794. this.gameStared = !1,
  795. this.oldTime = 0,
  796. this.turnCountNum = 0,
  797. this.turnCountFlag = !1,
  798. this.stonLevelClearCount = 0,
  799. this.goldLevelClearCount = 0,
  800. this.stageStoneBlockNum = 0,
  801. this.stageNum = 1,
  802. this.totalClear = this.stageTurnNum[this.stageNum],
  803. this.totalFlag = this.stageTurnNum[this.stageNum] + this.stageTurnNum[this.stageNum + 1],
  804. this.gameBaceContiner = new PIXI.Container,
  805. this.gameMergeAniContiner = new PIXI.Container,
  806. this.gameLineContiner = new PIXI.Container,
  807. this.gameEffectContiner = new PIXI.Container,
  808. this.gameShipEffectContiner = new PIXI.Container,
  809. this.gameTopEffectContiner = new PIXI.Container,
  810. this.gameTransportContianer = new PIXI.Container,
  811. this.karictorContainer = new PIXI.Container,
  812. this.guiedContainer = new PIXI.Container,
  813. this.itemLineEffectContainer = new PIXI.Container,
  814. this.dayAndNightContainer = new PIXI.Container,
  815. this.topUIContainer = new PIXI.Container,
  816. this.moveLineContainer = new PIXI.Container,
  817. this.movePopupContainer = new PIXI.Container,
  818. this.turnCountMusContiner = new PIXI.Container,
  819. this.canDragPuzzleContainer = new PIXI.Container,
  820. this.canDragBgContainer = new PIXI.Container,
  821. this.darkBgContainer = new PIXI.Container,
  822. this.overAnimationFlag = !1,
  823. this.itemBombOver = !1,
  824. this.feverTimeStart = !1,
  825. this.turnCount = this.turnCountArray[this.stageNum],
  826. this.randomBombCount = 15,
  827. this.totalScore = 0,
  828. this.totalClearBlockNum = 0,
  829. this.buildingMoveBlockNum = 0,
  830. this.puzzleArray = [],
  831. this.dragedArray = [],
  832. this.mergeDragedArray = [],
  833. this.copyDrageArray = [],
  834. this.bombEffectArray = [],
  835. this.itemSelectedArray = [],
  836. this.blockCallBackLists = [],
  837. this.guiedTime = 0,
  838. this.trainTypeLR = [],
  839. this.trainTypeRL = [],
  840. this.trainTypeDU = [],
  841. this.effectCallBackLists = [],
  842. this.sixBombEffectLists = [],
  843. this.planEffectLists = [],
  844. this.trainEffectLists = [],
  845. this.trainEffectSaveLists = [],
  846. this.trainMoveEffectLists = [],
  847. this.shipEffectLists = [],
  848. this.shipEffectSaveLists = [],
  849. this.shipPointEffectLists = [],
  850. this.shipMoveEffectLists = [],
  851. this.shipStartX = 0,
  852. this.animation = new PIXI.spine.Spine(GD.loader.resources.spineCharacter.spineData),
  853. this.animation.state.addAnimation(0, "flag_1", !1, 0),
  854. this.animation.x = GD.width / 2,
  855. this.animation.y = .31 * GD.height,
  856. this.normalAnimation = new PIXI.spine.Spine(GD.loader.resources.kariNormal.spineData),
  857. this.normalAnimation.state.addAnimation(0, "normal_1", !0, 0),
  858. this.normalAnimation.x = GD.width / 2,
  859. this.normalAnimation.y = .31 * GD.height,
  860. this.clearAniSpine = new PIXI.spine.Spine(GD.loader.resources.clearSpine.spineData),
  861. this.clearAniSpine.state.addAnimation(0, "cha_clear_1", !0, 0),
  862. this.clearAniSpine.x = GD.width / 2,
  863. this.clearAniSpine.y = .3 * GD.height,
  864. this.failAniSpine = new PIXI.spine.Spine(GD.loader.resources.failSpine.spineData),
  865. this.failAniSpine.state.addAnimation(0, "cha_fail_1", !1, 0),
  866. this.failAniSpine.x = GD.width / 2,
  867. this.failAniSpine.y = .3 * GD.height,
  868. this.gameBlackBG = PIXI.Sprite.fromFrame("puzzle_bg.png"),
  869. this.gameBlackBG.anchor.y = 1,
  870. this.gameBlackBG.y = .976 * GD.height,
  871. this.gameBlackBG.x = 46,
  872. this.gameLineBG = PIXI.Sprite.fromFrame("puzzle_line.png"),
  873. this.gameLineBG.x = .108 * GD.width,
  874. this.gameLineBG.y = .469 * GD.height,
  875. gc.isLowPhone || (this.addChild(this.gameBlackBG),
  876. this.addChild(this.gameLineBG)),
  877. gc.isLowPhone && (this.topLowBG = new PIXI.Sprite(GD.loader.resources.stage1.texture),
  878. this.topLowBG.scale.set(2),
  879. this.addChild(this.topLowBG)),
  880. this.addChild(this.itemLineEffectContainer),
  881. this.gameBaceContiner.addChild(this.gameShipEffectContiner),
  882. this.addChild(this.gameBaceContiner),
  883. gc.isLowPhone || (this.topBG = PIXI.Sprite.fromFrame(this.randMarkArray[this.stageNum] + ".png"),
  884. this.addChild(this.topBG)),
  885. this.building = new gc.GameBuilding,
  886. this.dayCountBG = PIXI.Sprite.fromFrame("ui_move_bg.png"),
  887. this.dayCountBG.x = .01 * GD.width,
  888. this.dayCountBG.y = .01 * GD.height,
  889. this.topUIContainer.addChild(this.dayCountBG),
  890. this.moveNumber = new gc.NumberText("ui_move1_", "center", -20),
  891. this.moveNumber.setValue(this.turnCount),
  892. this.moveNumber.x = 72,
  893. this.moveNumber.y = 62,
  894. this.moveNumber.scale.x = .8,
  895. this.topUIContainer.addChild(this.moveNumber),
  896. this.moveGauge = PIXI.Sprite.fromFrame("ui_move_gauge.png"),
  897. this.moveGauge.x = 31.5,
  898. this.moveGauge.y = 130.5,
  899. this.topUIContainer.addChild(this.moveGauge),
  900. this.moveGaugeMask = new PIXI.Graphics,
  901. this.moveGaugeMask.lineStyle(0, 255, 0),
  902. this.moveGaugeMask.beginFill(16740363, 1),
  903. this.moveGaugeMask.drawRect(30, 130, 84, 15),
  904. this.moveGaugeMask.endFill(),
  905. this.topUIContainer.addChild(this.moveGaugeMask),
  906. this.moveGauge.mask = this.moveGaugeMask,
  907. this.moveGaugeMask.x = 0,
  908. this.addChild(this.gameTopEffectContiner),
  909. gc.isLowPhone || (this.gameEarth = PIXI.Sprite.fromFrame(this.groundArray[this.stageNum] + ".png"),
  910. this.gameEarth.y = GD.height - this.gameEarth.height,
  911. this.addChild(this.gameEarth)),
  912. gc.isLowPhone || this.addChild(this.building),
  913. this.turnBarBG = PIXI.Sprite.fromFrame("ui_distance_bar.png"),
  914. this.turnBarBG.x = (GD.width - this.turnBarBG.width) / 2,
  915. this.turnBarBG.y = .36 * GD.height,
  916. this.topUIContainer.addChild(this.turnBarBG),
  917. this.turnBar = PIXI.Sprite.fromFrame("ui_distance_gauge.png"),
  918. this.turnBar.x = this.turnBarBG.x + 14,
  919. this.turnBar.y = this.turnBarBG.y + 14,
  920. this.turnBar.scale.x = 1,
  921. this.topUIContainer.addChild(this.turnBar),
  922. this.turnBarMask = new PIXI.Graphics,
  923. this.turnBarMask.lineStyle(2, 255, 1),
  924. this.turnBarMask.beginFill(16740363, 1),
  925. this.turnBarMask.drawRect(110, 410, 500, 40),
  926. this.turnBarMask.endFill(),
  927. this.turnBar.mask = this.turnBarMask,
  928. this.topUIContainer.addChild(this.turnBarMask),
  929. this.turnBarMask.x = -500,
  930. this.overFlag = new gc.MovieClip("ui_distance_flag000", 1, 6, .5, 0),
  931. this.overFlag.loop = !0,
  932. this.overFlag.anchor.set(.5, 0),
  933. this.overFlag.x = this.turnBarBG.x + this.turnBarBG.width,
  934. this.overFlag.y = this.turnBarBG.y - 50,
  935. this.topUIContainer.addChild(this.overFlag),
  936. this.overFlag.stop(),
  937. this.turnBarRod = PIXI.Sprite.fromFrame("ui_distance_position.png"),
  938. this.turnBarRod.anchor.x = .5,
  939. this.turnBarRod.x = this.turnBarMask.x + 610,
  940. this.turnBarRod.y = this.turnBarBG.y - 20,
  941. this.topUIContainer.addChild(this.turnBarRod),
  942. this.initPuzzle(),
  943. this.karictorContainer.addChild(this.normalAnimation),
  944. this.popUp = new gc.GamePopup,
  945. this.gameStageClearPopup = new gc.GameStageClearPopup,
  946. this.scoreNumberText = new gc.NumberText("ui_score_", "center", -10),
  947. this.scoreNumberText.setValue(0),
  948. this.scoreNumberText.x = (GD.width - this.scoreNumberText.width) / 2,
  949. this.scoreNumberText.y = .01 * GD.height,
  950. this.topUIContainer.addChild(this.scoreNumberText),
  951. this.addChild(this.gameTransportContianer),
  952. this.addChild(this.popUp),
  953. this.popUp.showPopup(0),
  954. this.messageText = new gc.GameKariMessage,
  955. this.moveLineSpine = new PIXI.spine.Spine(GD.loader.resources.moveLineSpine.spineData),
  956. this.moveLineSpine.state.addAnimation(0, "animation", !0, 0),
  957. this.moveLineSpine.x = 72,
  958. this.moveLineSpine.y = 90,
  959. this.move5CountPopup = PIXI.Sprite.fromFrame("ui_notice_2.png"),
  960. this.move5CountPopup.anchor.set(.5, .5),
  961. this.move5CountPopup.x = GD.width / 2,
  962. this.move5CountPopup.y = .7 * GD.height,
  963. this.move5CountPopup.flag = !1,
  964. this.topUIContainer.addChild(this.moveLineContainer),
  965. this.topUIContainer.addChild(this.movePopupContainer),
  966. this.daytonightSprite = PIXI.Sprite.fromFrame("level_next_0001.png"),
  967. this.addChild(this.dayAndNightContainer),
  968. this.loadingShow(),
  969. this.pointUseCheck(),
  970. this.scoreInterval = null,
  971. this.aniScore = 0,
  972. gc.isLowPhone || this.addChild(this.karictorContainer),
  973. "ios" != GD.AGENT && (GD.bgmStop(),
  974. gc.bgmFlag && GD.bgmPlay(1))
  975. }
  976. ,
  977. gc.GamePlayPage.prototype.loadingShow = function () {
  978. null == this.loading && (this.loading = new gc.DataLoadingView,
  979. GD.stage.addChild(this.loading),
  980. this.loading.init())
  981. }
  982. ,
  983. gc.GamePlayPage.prototype.loadingHide = function () {
  984. null != this.loading && (GD.stage.removeChild(this.loading),
  985. this.loading = null)
  986. }
  987. ,
  988. gc.GamePlayPage.prototype.pointUseCheck = function () {
  989. return gc.game_idx = null,
  990. this.loadingHide(),
  991. this.gameStared = !0,
  992. void NetworkManager.sendData2("gameStart", {
  993. gameId: gc.gameId,
  994. type: gc.gameType
  995. }, this.gameStartResult, this)
  996. }
  997. ,
  998. gc.GamePlayPage.prototype.gameStartResult = function (t) {
  999. t = t || {}
  1000. t.result ? (gc.game_idx = t.game_idx,
  1001. gc.startDatetime = t.start_datetime) : (gc.game_idx = null,
  1002. gc.startDatetime = null)
  1003. }
  1004. ,
  1005. gc.GamePlayPage.prototype.pointUseCheckResult = function (t) {
  1006. gc.localTest || (gc.playSeq = t.result.playSeq),
  1007. console.log("pointUseCheckResult"),
  1008. this.loadingHide(),
  1009. this.gameStared = !0
  1010. }
  1011. ,
  1012. gc.GamePlayPage.prototype.setTurnCountFlag = function (t) {
  1013. t ? this.turnCountFlag = !0 : this.turnCountFlag = !1,
  1014. this.turnCountNum = 0,
  1015. this.moveGaugeMask.x = 0,
  1016. this.moveGaugeTween && this.moveGaugeTween.kill(!1)
  1017. }
  1018. ,
  1019. gc.GamePlayPage.prototype.startGame = function () {
  1020. this.initTouch(),
  1021. this.addChild(this.darkBgContainer),
  1022. this.addChild(this.canDragBgContainer),
  1023. this.addChild(this.canDragPuzzleContainer),
  1024. this.addChild(this.gameMergeAniContiner),
  1025. this.addChild(this.gameLineContiner),
  1026. this.addChild(this.messageText),
  1027. this.messageText.startMessage(),
  1028. this.addChild(this.guiedContainer),
  1029. this.test = new gc.GameGuied,
  1030. this.guiedContainer.addChild(this.test),
  1031. this.addChild(this.topUIContainer),
  1032. this.addChild(this.gameEffectContiner),
  1033. this.scoreEffect.init(),
  1034. this.addChild(this.scoreEffect),
  1035. this.addChild(this.turnCountMusContiner),
  1036. this.addChild(this.gameStageClearPopup),
  1037. this.gameBaceContiner.interactive = !0,
  1038. this.guidTime = setInterval(function () {
  1039. if (this.gameStared && !gc.isPaused) {
  1040. var t = (new Date).getTime();
  1041. t - this.guiedTime > 5e3 && 0 == this.dragedArray.length && (this.test.checkPuzzle(this.puzzleArray),
  1042. this.test.inGuied = !0),
  1043. this.turnCountFlag && (this.turnCountNum++ ,
  1044. this.moveGaugeDc())
  1045. }
  1046. }
  1047. .bind(this), 1e3),
  1048. this.guiedTime = (new Date).getTime()
  1049. }
  1050. ,
  1051. gc.GamePlayPage.prototype.moveGaugeDc = function () {
  1052. var t = !1;
  1053. if (this.turnCountNum >= this.moveGaugeMax && (t = !0,
  1054. this.moveGaugeMask.x = 0,
  1055. this.turnCountNum = 1,
  1056. this.turnCount > 0))
  1057. if (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvminus"),
  1058. this.turnCount-- ,
  1059. this.showTurnMusAnimation(),
  1060. this.moveNumber.setValue(this.turnCount),
  1061. this.turnCount <= 0)
  1062. this.setTurnCountFlag(!1),
  1063. this.gameover();
  1064. else if (this.turnCount <= 5)
  1065. try {
  1066. this.moveNumber.fileName = "ui_move3_",
  1067. this.moveLineContainer.removeChildren(),
  1068. gc.isLowPhone || this.moveLineContainer.addChild(this.moveLineSpine),
  1069. this.move5CountPopup.flag || (this.move5CountPopup.flag = !0,
  1070. this.move5CountPopupAnimation())
  1071. } catch (e) { }
  1072. 1 == this.turnCountNum && (this.moveGaugeTween && this.moveGaugeTween.kill(!1),
  1073. this.moveGaugeTween = TweenMax.to(this.moveGaugeMask, 3.8, {
  1074. x: -83,
  1075. onComplete: function () { }
  1076. .bind(this),
  1077. ease: Linear.easeInOut
  1078. }))
  1079. }
  1080. ,
  1081. gc.GamePlayPage.prototype.showTurnMusAnimation = function () {
  1082. var t = PIXI.Sprite.fromFrame("move_minus0001.png");
  1083. t.anchor.set(.5, .5),
  1084. t.scale.x = .7,
  1085. t.scale.y = .7,
  1086. t.x = 70,
  1087. t.y = 100,
  1088. this.turnCountMusContiner.addChild(t),
  1089. TweenMax.to(t, .5, {
  1090. y: "-=60",
  1091. onComplete: function (t) {
  1092. this.turnCountMusContiner.removeChild(t)
  1093. }
  1094. .bind(this),
  1095. onCompleteParams: [t]
  1096. })
  1097. }
  1098. ,
  1099. gc.GamePlayPage.prototype.resumeGame = function () {
  1100. TweenMax.resumeAll()
  1101. }
  1102. ,
  1103. gc.GamePlayPage.prototype.pauseGame = function () {
  1104. TweenMax.pauseAll()
  1105. }
  1106. ,
  1107. gc.GamePlayPage.prototype.popupCloseCallBack = function (t) {
  1108. 4 != t && this.removeChild(this.popUp),
  1109. 0 == t ? (this.addChild(this.popUp),
  1110. this.popUp.showPopup(6)) : 1 == t ? (this.setTurnCountFlag(!0),
  1111. this.gameBaceContiner.interactive = !0) : 2 == t ? this.showStageTunrPlusAnimation() : 3 == t ? (TweenMax.killAll(!1),
  1112. gc.flag = 0,
  1113. GD.soundAllStop(),
  1114. clearInterval(this.guidTime),
  1115. this.messageText.stopAllTime(),
  1116. this.removeChild(this.messageText),
  1117. gc.isLowPhone || this.building.stopInterval(),
  1118. this.gameStared = !1,
  1119. this.showEndingPage()) : 4 == t ? (TweenMax.killAll(!1),
  1120. gc.flag = 0,
  1121. GD.soundAllStop(),
  1122. gc.gameOver = !0,
  1123. clearInterval(this.guidTime),
  1124. this.messageText.stopAllTime(),
  1125. this.removeChild(this.messageText),
  1126. gc.isLowPhone || this.building.stopInterval(),
  1127. this.gameStared = !1,
  1128. this.scoreSave()) : 5 == t ? this.gameOverItemBomb() : 6 == t ? (this.startGame(),
  1129. this.setTurnCountFlag(!0)) : (this.feverTimeStart = !1,
  1130. gc.isLowPhone || (this.building.resetTime(1e3),
  1131. this.building.stopInterval(),
  1132. this.building.resetBudingTexture(this.stageNum)),
  1133. this.dropPuzzleAnimation())
  1134. }
  1135. ,
  1136. gc.GamePlayPage.prototype.setScoreInterval = function () {
  1137. null == this.scoreInterval && (this.scoreInterval = setInterval(function () {
  1138. this.aniScore >= this.totalScore ? (clearInterval(this.scoreInterval),
  1139. this.scoreInterval = null) : (this.aniScore += 100,
  1140. this.scoreNumberText.setValue(this.aniScore))
  1141. }
  1142. .bind(this), 30))
  1143. }
  1144. ,
  1145. gc.GamePlayPage.prototype.reStartGame = function () {
  1146. this.moveNumber.fileName = "ui_move1_",
  1147. this.messageText.showMessage = !0;
  1148. var t = Math.floor(this.stageNum / 2) + 1;
  1149. this.karictorContainer.removeChildren(),
  1150. this.normalAnimation.state.setAnimation(0, "normal_" + t, !0, 0),
  1151. this.normalAnimation.skeleton.setToSetupPose(),
  1152. this.karictorContainer.addChild(this.normalAnimation),
  1153. this.karictorContainer.removeChild(this.clearAniSpine),
  1154. this.addChild(this.messageText),
  1155. this.stageNum++ ,
  1156. this.stageStoneBlockNum = 0,
  1157. this.buildingMoveBlockNum = 0,
  1158. this.totalClearBlockNum = 0,
  1159. this.turnBar.scale.x = 1e-4,
  1160. this.turnBarRod.x = this.turnBar.x + this.turnBar.width,
  1161. gc.isLowPhone || (this.building.resetBudingTexture(this.stageNum),
  1162. this.building.setBuildingRotation());
  1163. var e = this.randMarkArray[this.stageNum] + ".png";
  1164. gc.isLowPhone ? this.topLowBG.texture = GD.loader.resources["stage" + this.stageNum].texture : this.topBG.texture = PIXI.Texture.fromFrame(e),
  1165. gc.isLowPhone || (this.gameEarth.texture = PIXI.Texture.fromFrame(this.groundArray[this.stageNum] + ".png")),
  1166. this.turnCount = this.turnCountArray[this.stageNum],
  1167. this.overAnimationFlag = !1,
  1168. this.moveNumber.setValue(this.turnCount)
  1169. }
  1170. ,
  1171. gc.GamePlayPage.prototype.stageChangeRedarwPuzzle = function () {
  1172. for (var t = 0; 6 > t; t++)
  1173. for (var e = 0; 7 > e; e++)
  1174. this.puzzleArray[t][e][1].alpha = 0
  1175. }
  1176. ,
  1177. gc.GamePlayPage.prototype.dropPuzzleAnimation = function () {
  1178. for (var t = 0; 7 > t; t++)
  1179. for (var e = 0; 6 > e; e++) {
  1180. var i = Math.floor(100 * Math.random()) % 5 + 1;
  1181. 0 == e && 0 == t && (i = 1),
  1182. 0 == e && 1 == t && (i = 1),
  1183. 0 == e && 2 == t && (i = 1),
  1184. this.puzzleArray[e][t][0] = i;
  1185. var a = this.blockNameArray[this.stageNum] + i + ".png";
  1186. this.puzzleArray[e][t][1].texture = new PIXI.Texture.fromFrame(a),
  1187. this.puzzleArray[e][t][2] = 0,
  1188. this.puzzleArray[e][t][1].alpha = 1;
  1189. var s = this.puzzleArray[e][t][1].y - 660;
  1190. 6 == t && 5 == e ? TweenMax.from(this.puzzleArray[e][t][1], .5, {
  1191. y: s,
  1192. onComplete: function () {
  1193. this.gameBaceContiner.interactive = !0,
  1194. this.guiedTime = (new Date).getTime(),
  1195. this.test.inGuied = !1,
  1196. this.setTurnCountFlag(!0)
  1197. }
  1198. .bind(this)
  1199. }) : TweenMax.from(this.puzzleArray[e][t][1], .5, {
  1200. y: s
  1201. })
  1202. }
  1203. }
  1204. ,
  1205. gc.GamePlayPage.prototype.resetMovePuzzleImg = function (t) {
  1206. for (var e = 0; 6 > e; e++)
  1207. for (var i = 0; 7 > i; i++)
  1208. 14 == this.puzzleArray[e][i][0] && (0 == t ? this.puzzleArray[e][i][1].texture = PIXI.Texture.fromFrame("block_00014.png") : this.puzzleArray[e][i][1].texture = PIXI.Texture.fromFrame("special_puzzle_move_000" + t + ".png"))
  1209. }
  1210. ,
  1211. gc.GamePlayPage.prototype.initTouch = function () {
  1212. this.gameBaceContiner.interactive = !0,
  1213. this.gameBaceContiner.mousedown = this.gameBaceContiner.touchstart = function (t) {
  1214. t.stopPropagation();
  1215. var e = t.data.getLocalPosition(this.parent)
  1216. , i = this.getTouchPosition(e);
  1217. if (!(i[1] > 5 || i[1] < 0 || i[0] < 0 || i[0] > 6)) {
  1218. if (this.test.inGuied && (this.test.removeAll(),
  1219. this.test.inGuied = !1),
  1220. this.guiedTime = (new Date).getTime(),
  1221. this.puzzleArray[i[1]][i[0]][0] > 5 && this.puzzleArray[i[1]][i[0]][0] < 14)
  1222. return this.itemLineEffectContainer.removeChildren(),
  1223. this.clickedItemBlock(i[1], i[0]),
  1224. void (this.gameBaceContiner.interactive = !1);
  1225. if (!(i[0] >= 0 && i[0] <= 6 && i[1] >= 0 && i[1] <= 5 && 0 == this.dragedArray.length))
  1226. return this.startTouchX = -1,
  1227. void (this.startTouchY = -1);
  1228. this.startTouchX = i[0],
  1229. this.startTouchY = i[1],
  1230. this.dragedArray.push(this.puzzleArray[i[1]][i[0]]);
  1231. var a = PIXI.Sprite.fromFrame("puzzle_effect_bg.png");
  1232. a.anchor.set(.5, .5),
  1233. a.x = this.dragedArray[0][1].x,
  1234. a.y = this.dragedArray[0][1].y,
  1235. this.puzzleArray[i[1]][i[0]][0] > 5 || gc.isLowPhone ? this.gameShipEffectContiner.addChild(a) : (this.showCanDragPuzzle(this.puzzleArray[i[1]][i[0]]),
  1236. this.canDragBgContainer.addChild(a));
  1237. var s = PIXI.Sprite.fromFrame("puzzle_effect_select.png");
  1238. s.anchor.set(.5, .5),
  1239. s.x = this.dragedArray[0][1].x,
  1240. s.y = this.dragedArray[0][1].y,
  1241. this.gameLineContiner.addChild(s)
  1242. }
  1243. }
  1244. .bind(this),
  1245. this.gameBaceContiner.mousemove = this.gameBaceContiner.touchmove = function (t) {
  1246. if (this.startTouchX >= 0 && this.startTouchY >= 0) {
  1247. var e = t.data.getLocalPosition(this.parent)
  1248. , i = this.getTouchPosition(e);
  1249. if (i[0] >= 0 && i[0] <= 6 && i[1] >= 0 && i[1] <= 5 && (i[0] != this.startTouchX || i[1] != this.startTouchY) && (this.puzzleArray[i[1]][i[0]][0] == this.dragedArray[0][0] || 14 == this.puzzleArray[i[1]][i[0]][0]) && this.puzzleArray[i[1]][i[0]][0] < 15) {
  1250. for (var a = -1, s = 0; s < this.dragedArray.length; s++)
  1251. if (this.dragedArray[s][1] == this.puzzleArray[i[1]][i[0]][1]) {
  1252. a = s;
  1253. break
  1254. }
  1255. -1 != a ? (this.dragedArray.splice(a + 1, this.dragedArray.length - a - 1),
  1256. this.startTouchX = i[0],
  1257. this.startTouchY = i[1],
  1258. this.drawDragEffect()) : Math.abs(this.puzzleArray[i[1]][i[0]][1].x - this.puzzleArray[this.startTouchY][this.startTouchX][1].x) <= this.pXp && Math.abs(this.puzzleArray[i[1]][i[0]][1].y - this.puzzleArray[this.startTouchY][this.startTouchX][1].y) <= this.pYp && (this.dragedArray.push(this.puzzleArray[i[1]][i[0]]),
  1259. this.dragedArray.length <= 10 ? gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_drag0" + this.dragedArray.length) : gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_drag_max"),
  1260. this.startTouchX = i[0],
  1261. this.startTouchY = i[1],
  1262. this.drawDragEffect())
  1263. }
  1264. }
  1265. }
  1266. .bind(this),
  1267. this.gameBaceContiner.mouseup = this.gameBaceContiner.touchend = this.gameBaceContiner.mouseupoutside = this.gameBaceContiner.touchendoutside = this.gameBaceContiner.pointerupoutside = function (t) {
  1268. t.stopPropagation(),
  1269. this.guiedTime = (new Date).getTime(),
  1270. this.gameLineContiner.removeChildren(),
  1271. this.gameShipEffectContiner.removeChildren(),
  1272. this.canDragBgContainer.removeChildren(),
  1273. this.closeCanDragPuzzle(),
  1274. gc.isPaused || this.drawDragPuzzle(),
  1275. this.startTouchX = -1,
  1276. this.startTouchY = -1,
  1277. this.dragedArray = []
  1278. }
  1279. .bind(this)
  1280. }
  1281. ,
  1282. gc.GamePlayPage.prototype.move5CountPopupAnimation = function () {
  1283. try {
  1284. TweenMax.kill(this.movePopupTween)
  1285. } catch (t) { }
  1286. this.movePopupContainer.removeChildren(),
  1287. this.movePopupContainer.addChild(this.move5CountPopup),
  1288. this.movePopupTween = TweenMax.delayedCall(1, function () {
  1289. this.movePopupContainer.removeChildren()
  1290. }
  1291. .bind(this))
  1292. }
  1293. ,
  1294. gc.GamePlayPage.prototype.showCanDragPuzzle = function (t) {
  1295. var e = t[0];
  1296. if (5 >= e) {
  1297. this.darkBgContainer.addChild(this.canDragBg);
  1298. for (var i = 0; i < this.puzzleArray.length; i++)
  1299. for (var a = 0; a < this.puzzleArray[i].length; a++)
  1300. e == this.puzzleArray[i][a][0] && this.canDragPuzzleContainer.addChild(this.puzzleArray[i][a][1])
  1301. }
  1302. }
  1303. ,
  1304. gc.GamePlayPage.prototype.closeCanDragPuzzle = function () {
  1305. this.darkBgContainer.removeChildren();
  1306. var t = null;
  1307. try {
  1308. for (var e = this.canDragPuzzleContainer.children.length - 1; e >= 0; e--)
  1309. t = this.canDragPuzzleContainer.getChildAt(e),
  1310. this.canDragPuzzleContainer.removeChild(t),
  1311. this.gameBaceContiner.addChild(t)
  1312. } catch (i) { }
  1313. }
  1314. ,
  1315. gc.GamePlayPage.prototype.clickedItemBlock = function (t, e) {
  1316. this.guiedTime = (new Date).getTime(),
  1317. 14 == this.puzzleArray[t][e][0] ? (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvplus"),
  1318. this.totalScore += 333,
  1319. this.turnCount++ ,
  1320. this.turnCount > 5 && (this.moveLineContainer.removeChildren(),
  1321. this.moveNumber.fileName = "ui_move1_"),
  1322. this.timeAddAnimation(t, e, 1),
  1323. this.puzzleArray[t][e][1].alpha = 0,
  1324. this.puzzleArray[t][e][0] = 0,
  1325. this.reDarwPuzzle()) : this.itemSelectedFun(this.puzzleArray[t][e][0], [e, t])
  1326. }
  1327. ,
  1328. gc.GamePlayPage.prototype.drawLine = function () {
  1329. this.graphics.clear(),
  1330. this.gameLineContiner.removeChildren();
  1331. for (var t = 0; t < this.dragedArray.length - 1; t++)
  1332. this.graphics.beginFill(0),
  1333. this.graphics.lineStyle(3, 39423, 10),
  1334. this.graphics.moveTo(this.dragedArray[t][1].x, this.dragedArray[t][1].y),
  1335. this.graphics.lineTo(this.dragedArray[t + 1][1].x, this.dragedArray[t + 1][1].y),
  1336. this.graphics.endFill();
  1337. this.gameLineContiner.addChild(this.graphics)
  1338. }
  1339. ,
  1340. gc.GamePlayPage.prototype.drawDragEffect = function () {
  1341. this.gameShipEffectContiner.removeChildren(),
  1342. this.canDragBgContainer.removeChildren(),
  1343. this.gameLineContiner.removeChildren();
  1344. for (var t = 0; t < this.dragedArray.length; t++) {
  1345. if (t != this.dragedArray.length - 1 && this.dragedArray.length > 1) {
  1346. var e = this.checkDragRotation(this.dragedArray[t][1].x, this.dragedArray[t][1].y, this.dragedArray[t + 1][1].x, this.dragedArray[t + 1][1].y)
  1347. , i = PIXI.Sprite.fromFrame("puzzle_effect_line.png");
  1348. i.anchor.set(0, .5),
  1349. i.scale.x = .9,
  1350. i.rotation = e,
  1351. i.x = this.dragedArray[t][1].x,
  1352. i.y = this.dragedArray[t][1].y,
  1353. this.gameLineContiner.addChild(i)
  1354. }
  1355. var a = PIXI.Sprite.fromFrame("puzzle_effect_bg.png");
  1356. a.anchor.set(.5, .5),
  1357. a.x = this.dragedArray[t][1].x,
  1358. a.y = this.dragedArray[t][1].y,
  1359. gc.isLowPhone ? this.gameShipEffectContiner.addChild(a) : this.canDragBgContainer.addChild(a);
  1360. var s = PIXI.Sprite.fromFrame("puzzle_effect_select.png");
  1361. s.anchor.set(.5, .5),
  1362. s.x = this.dragedArray[t][1].x,
  1363. s.y = this.dragedArray[t][1].y,
  1364. this.gameLineContiner.addChild(s)
  1365. }
  1366. }
  1367. ,
  1368. gc.GamePlayPage.prototype.checkDragRotation = function (t, e, i, a) {
  1369. var s = 0
  1370. , r = Math.abs(Math.pow(t - i, 2) + Math.pow(e - a, 2));
  1371. r = Math.sqrt(r);
  1372. var n = Math.abs(t - i)
  1373. , o = Math.acos(n / r);
  1374. return s = t >= i && e >= a ? -Math.PI + o : t >= i && a >= e ? -Math.PI - o : i >= t && e >= a ? -o : o
  1375. }
  1376. ,
  1377. gc.GamePlayPage.prototype.newReDarwPuzzle = function () {
  1378. for (var t = 0; 6 > t; t++)
  1379. for (var e = 0; 7 > e; e++)
  1380. 0 == this.puzzleArray[t][e][0] && this.gameBaceContiner.removeChild(this.puzzleArray[t][e][1]);
  1381. for (var t = 0; 7 > t; t++) {
  1382. for (var i = 0, e = 5; e >= 0; e--) {
  1383. if (i > 0 && 0 != this.puzzleArray[e][t][0]) {
  1384. this.puzzleArray[e + i][t][0] = this.puzzleArray[e][t][0];
  1385. var a = this.puzzleArray[e + i][t][1].y;
  1386. this.puzzleArray[e + i][t][1] = this.puzzleArray[e][t][1],
  1387. this.puzzleArray[e + i][t][1].alpha = 1,
  1388. this.puzzleArray[e + i][t][2] = this.puzzleArray[e][t][2],
  1389. this.dropPuzzleCount++ ,
  1390. TweenMax.to(this.puzzleArray[e][t][1], .2, {
  1391. y: a,
  1392. onComplete: function () {
  1393. this.dropPuzzleCount-- ,
  1394. 0 == this.dropPuzzleCount && this.newCheckNextItemBlock()
  1395. }
  1396. .bind(this)
  1397. })
  1398. }
  1399. 0 == this.puzzleArray[e][t][0] && i++
  1400. }
  1401. for (var s = 0; i > s; s++) {
  1402. this.stageStoneBlockNum < 0 && (this.stageStoneBlockNum = 0);
  1403. var r = 0;
  1404. if (this.stageStoneBlockNum < this.stoneBlockArray[this.stageNum])
  1405. if (100 * Math.random() < 50)
  1406. r = Math.floor(100 * Math.random()) % 5 + 1;
  1407. else {
  1408. var n = 100 * Math.random();
  1409. n <= this.stageBlockTypeArray[this.stageNum][0] ? r = 15 : n <= this.stageBlockTypeArray[this.stageNum][1] ? r = 16 : n <= this.stageBlockTypeArray[this.stageNum][2] ? r = 17 : n <= this.stageBlockTypeArray[this.stageNum][3] && (r = 18)
  1410. }
  1411. else
  1412. r = Math.floor(100 * Math.random()) % 5 + 1;
  1413. r > 14 && this.stageStoneBlockNum++ ,
  1414. 0 == r && (r = 1),
  1415. this.puzzleArray[s][t][0] = r,
  1416. r > 5 ? this.puzzleArray[s][t][1] = PIXI.Sprite.fromFrame("block_000" + r + ".png") : this.puzzleArray[s][t][1] = PIXI.Sprite.fromFrame(this.blockNameArray[this.stageNum] + r + ".png"),
  1417. this.puzzleArray[s][t][1].anchor.set(.5, .5),
  1418. t % 2 == 0 ? this.puzzleArray[s][t][1].y = this.sPuzzleStartY + s * this.pYp : this.puzzleArray[s][t][1].y = this.dPuzzleStartY + s * this.pYp,
  1419. this.puzzleArray[s][t][1].x = this.puzzleStartX + t * this.pXp,
  1420. this.gameBaceContiner.addChild(this.puzzleArray[s][t][1]),
  1421. this.puzzleArray[s][t][1].alpha = 1,
  1422. this.puzzleArray[s][t][2] = 0;
  1423. var o = this.puzzleArray[s][t][1].y - (i + 1) * this.pYp;
  1424. this.dropPuzzleCount++ ,
  1425. TweenMax.from(this.puzzleArray[s][t][1], .2, {
  1426. y: o,
  1427. onComplete: function () {
  1428. this.dropPuzzleCount-- ,
  1429. 0 == this.dropPuzzleCount && this.newCheckNextItemBlock()
  1430. }
  1431. .bind(this)
  1432. })
  1433. }
  1434. }
  1435. }
  1436. ,
  1437. gc.GamePlayPage.prototype.reDarwPuzzle = function () {
  1438. for (var t = 0; 6 > t; t++)
  1439. for (var e = 0; 7 > e; e++)
  1440. 0 == this.puzzleArray[t][e][0] && this.gameBaceContiner.removeChild(this.puzzleArray[t][e][1]);
  1441. for (var t = 0; 7 > t; t++) {
  1442. for (var i = 0, e = 5; e >= 0; e--) {
  1443. if (i > 0 && 0 != this.puzzleArray[e][t][0]) {
  1444. this.puzzleArray[e + i][t][0] = this.puzzleArray[e][t][0];
  1445. var a = this.puzzleArray[e + i][t][1].y;
  1446. this.puzzleArray[e + i][t][1] = this.puzzleArray[e][t][1],
  1447. this.puzzleArray[e + i][t][1].alpha = 1,
  1448. this.puzzleArray[e + i][t][2] = this.puzzleArray[e][t][2],
  1449. this.dropPuzzleCount++ ,
  1450. TweenMax.to(this.puzzleArray[e][t][1], .2, {
  1451. y: a,
  1452. onComplete: function () {
  1453. this.dropPuzzleCount-- ,
  1454. 0 == this.dropPuzzleCount && this.dropPuzzleOver()
  1455. }
  1456. .bind(this)
  1457. })
  1458. }
  1459. 0 == this.puzzleArray[e][t][0] && i++
  1460. }
  1461. for (var s = 0; i > s; s++) {
  1462. this.stageStoneBlockNum < 0 && (this.stageStoneBlockNum = 0);
  1463. var r = 0;
  1464. if (this.stageStoneBlockNum < this.stoneBlockArray[this.stageNum]) {
  1465. var n = this.stageStonBlockChance[this.stageNum];
  1466. if (100 * Math.random() < 100 - n)
  1467. r = Math.floor(100 * Math.random()) % 5 + 1;
  1468. else {
  1469. var o = 100 * Math.random();
  1470. o <= this.stageBlockTypeArray[this.stageNum][0] ? r = 15 : o <= this.stageBlockTypeArray[this.stageNum][1] ? r = 16 : o <= this.stageBlockTypeArray[this.stageNum][2] ? r = 17 : o <= this.stageBlockTypeArray[this.stageNum][3] && (r = 18)
  1471. }
  1472. } else
  1473. r = Math.floor(100 * Math.random()) % 5 + 1;
  1474. r > 14 && this.stageStoneBlockNum++ ,
  1475. 0 == r && (r = 1),
  1476. this.puzzleArray[s][t][0] = r,
  1477. r > 5 ? this.puzzleArray[s][t][1] = PIXI.Sprite.fromFrame("block_000" + r + ".png") : this.puzzleArray[s][t][1] = PIXI.Sprite.fromFrame(this.blockNameArray[this.stageNum] + r + ".png"),
  1478. this.puzzleArray[s][t][1].anchor.set(.5, .5),
  1479. t % 2 == 0 ? this.puzzleArray[s][t][1].y = this.sPuzzleStartY + s * this.pYp : this.puzzleArray[s][t][1].y = this.dPuzzleStartY + s * this.pYp,
  1480. this.puzzleArray[s][t][1].x = this.puzzleStartX + t * this.pXp,
  1481. this.gameBaceContiner.addChild(this.puzzleArray[s][t][1]),
  1482. this.puzzleArray[s][t][1].alpha = 1,
  1483. this.puzzleArray[s][t][2] = 0;
  1484. var h = this.puzzleArray[s][t][1].y - (i + 1) * this.pYp;
  1485. gc.isLowPhone && (h = t % 2 == 0 ? this.sPuzzleStartY - this.pYp : this.dPuzzleStartY - this.pYp),
  1486. this.dropPuzzleCount++ ,
  1487. TweenMax.from(this.puzzleArray[s][t][1], .2, {
  1488. y: h,
  1489. onComplete: function () {
  1490. this.dropPuzzleCount-- ,
  1491. 0 == this.dropPuzzleCount && this.dropPuzzleOver()
  1492. }
  1493. .bind(this)
  1494. })
  1495. }
  1496. }
  1497. }
  1498. ,
  1499. gc.GamePlayPage.prototype.gameOverPopupAnimation = function () {
  1500. this.addChild(this.popUp),
  1501. this.popUp.showPopup(4)
  1502. }
  1503. ,
  1504. gc.GamePlayPage.prototype.showStageTunrPlusAnimation = function () {
  1505. this.newStageChange()
  1506. }
  1507. ,
  1508. gc.GamePlayPage.prototype.newShowTurnPlusBring = function () {
  1509. var t = PIXI.Sprite.fromFrame("special1_effect_0008.png");
  1510. t.anchor.set(.5),
  1511. t.x = 50,
  1512. t.y = 100,
  1513. this.addChild(t),
  1514. TweenMax.to(t, .2, {
  1515. alpha: .2,
  1516. onComplete: function () {
  1517. this.removeChild(t),
  1518. t = null
  1519. }
  1520. .bind(this),
  1521. onCompleteParams: [t]
  1522. })
  1523. }
  1524. ,
  1525. gc.GamePlayPage.prototype.newStageChange = function () {
  1526. if (14 == this.stageNum)
  1527. return this.totalScore += 1111 * this.turnCount,
  1528. this.scoreNumberText.valueTween(this.totalScore),
  1529. TweenMax.killAll(!1),
  1530. gc.flag = 0,
  1531. GD.soundAllStop(),
  1532. clearInterval(this.guidTime),
  1533. this.messageText.stopAllTime(),
  1534. this.removeChild(this.messageText),
  1535. gc.isLowPhone || this.building.stopInterval(),
  1536. this.gameStared = !1,
  1537. void this.showEndingPage();
  1538. this.totalClear = this.stageTurnNum[this.stageNum],
  1539. this.totalClearBlockNum = 0,
  1540. this.totalFlag = this.stageTurnNum[this.stageNum] + this.stageTurnNum[this.stageNum + 1],
  1541. gc.isLowPhone || this.building.resetBudingTexture(this.stageNum);
  1542. var t = this.randMarkArray[this.stageNum] + ".png";
  1543. gc.isLowPhone ? this.topLowBG.texture = GD.loader.resources["stage" + this.stageNum].texture : this.topBG.texture = PIXI.Texture.fromFrame(t),
  1544. gc.isLowPhone || (this.gameEarth.texture = PIXI.Texture.fromFrame(this.groundArray[this.stageNum] + ".png"));
  1545. var e = Math.floor((this.stageNum + 1) / 2);
  1546. this.normalAnimation.state.setAnimation(0, "normal_" + e, !0, 0),
  1547. this.normalAnimation.skeleton.setToSetupPose(),
  1548. this.moveNumber.fileName = "ui_move1_";
  1549. try {
  1550. this.moveLineContainer.removeChildren(),
  1551. this.move5CountPopup.flag = !1
  1552. } catch (i) { }
  1553. this.turnBarMask.x = -500,
  1554. this.turnBarRod.x = this.turnBarMask.x + 610,
  1555. this.addChild(this.popUp),
  1556. this.popUp.showPopup(1)
  1557. }
  1558. ,
  1559. gc.GamePlayPage.prototype.newClearStage = function () {
  1560. if (this.setTurnCountFlag(!1),
  1561. 14 == this.stageNum) {
  1562. var t = Math.ceil(this.stageNum / 2) - 1;
  1563. return this.totalScore += this.stageClearBonusSocre[t],
  1564. this.scoreNumberText.valueTween(this.totalScore),
  1565. this.gameStageClearPopup.show(this.countryClearPlusVal[t], this.stageClearBonusSocre[t]),
  1566. TweenMax.from(this.gameStageClearPopup.bg.scale, .5, {
  1567. x: .2,
  1568. y: .2
  1569. }),
  1570. void TweenMax.to(this.gameStageClearPopup, 2.5, {
  1571. alpha: 1,
  1572. onComplete: function () {
  1573. this.gameStageClearPopup.remove(),
  1574. this.addChild(this.popUp),
  1575. this.popUp.showPopup(2)
  1576. }
  1577. .bind(this)
  1578. })
  1579. }
  1580. if (this.stageNum % 2 == 1)
  1581. this.stageNum++ ,
  1582. this.totalClear += this.stageTurnNum[this.stageNum],
  1583. this.moveNumber.fileName = "ui_move1_",
  1584. this.moveNumber.setValue(this.turnCount),
  1585. this.changeStageBGAnimation(),
  1586. this.gameBaceContiner.interactive = !0,
  1587. this.setTurnCountFlag(!0);
  1588. else {
  1589. this.stageNum++ ,
  1590. this.turnBar.scale.x = 1,
  1591. this.turnBarRod.x = this.turnBarMask.x + 610,
  1592. TweenMax.killAll(!0),
  1593. this.buildingMoveBlockNum = 0;
  1594. var t = Math.ceil((this.stageNum - 1) / 2) - 1;
  1595. this.totalScore += this.stageClearBonusSocre[t],
  1596. this.scoreNumberText.valueTween(this.totalScore),
  1597. this.turnCount += this.countryClearPlusVal[t],
  1598. this.moveNumber.fileName = "ui_move1_",
  1599. this.moveNumber.setValue(this.turnCount),
  1600. this.gameStageClearPopup.show(this.countryClearPlusVal[t], this.stageClearBonusSocre[t]),
  1601. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_camera"),
  1602. gc.isLowPhone ? setTimeout(function () {
  1603. this.gameStageClearPopup.remove(),
  1604. this.popupCloseCallBack(2)
  1605. }
  1606. .bind(this), 2e3) : (TweenMax.from(this.gameStageClearPopup.bg.scale, .5, {
  1607. x: .2,
  1608. y: .2
  1609. }),
  1610. TweenMax.to(this.gameStageClearPopup, 2.5, {
  1611. alpha: 1,
  1612. onComplete: function () {
  1613. this.gameStageClearPopup.remove(),
  1614. this.popupCloseCallBack(2)
  1615. }
  1616. .bind(this)
  1617. }))
  1618. }
  1619. }
  1620. ,
  1621. gc.GamePlayPage.prototype.changeStageBGAnimation = function () {
  1622. gc.isLowPhone ? this.topLowBG.texture = GD.loader.resources["stage" + this.stageNum].texture : (TweenMax.to(this.building, 1, {
  1623. alpha: .3,
  1624. ease: Linear.easeInOut
  1625. }),
  1626. TweenMax.to(this.topBG, 1, {
  1627. alpha: .3,
  1628. ease: Linear.easeInOut
  1629. }),
  1630. TweenMax.to(this.gameEarth, 1, {
  1631. alpha: .3,
  1632. onComplete: function () {
  1633. this.building.resetBudingTexture(this.stageNum);
  1634. var t = this.randMarkArray[this.stageNum] + ".png";
  1635. this.topBG.texture = PIXI.Texture.fromFrame(t),
  1636. this.gameEarth.texture = PIXI.Texture.fromFrame(this.groundArray[this.stageNum] + ".png"),
  1637. this.building.alpha = .3,
  1638. this.topBG.alpha = .3,
  1639. this.gameEarth.alpha = .3,
  1640. TweenMax.to(this.building, 1, {
  1641. alpha: 1,
  1642. ease: Linear.easeInOut
  1643. }),
  1644. TweenMax.to(this.topBG, 1, {
  1645. alpha: 1,
  1646. ease: Linear.easeInOut
  1647. }),
  1648. TweenMax.to(this.gameEarth, 1, {
  1649. alpha: 1,
  1650. ease: Linear.easeInOut
  1651. })
  1652. }
  1653. .bind(this),
  1654. ease: Linear.easeInOut
  1655. }))
  1656. }
  1657. ,
  1658. gc.GamePlayPage.prototype.clearStage = function () {
  1659. if (this.setTurnCountFlag(!1),
  1660. this.test.inGuied = !0,
  1661. gc.isLowPhone || (this.building.stopInterval(),
  1662. this.building.setBuildingRotation()),
  1663. this.itemBombOver)
  1664. this.gameOverItemBomb();
  1665. else {
  1666. this.messageText.showMessage = !1,
  1667. this.removeChild(this.messageText),
  1668. this.turnCount < 0 && (this.turnCount = 0);
  1669. try {
  1670. this.moveLineContainer.removeChildren(),
  1671. this.move5CountPopup.flag = !1
  1672. } catch (t) { }
  1673. this.moveNumber.fileName = "ui_move1_",
  1674. this.moveNumber.setValue(this.turnCount);
  1675. var e = Math.floor((this.stageNum + 1) / 2);
  1676. this.karictorContainer.removeChildren(),
  1677. this.normalAnimation.state.setAnimation(0, "normal_" + e, !0, 0),
  1678. this.normalAnimation.skeleton.setToSetupPose(),
  1679. this.clearAniSpine.state.setAnimation(0, "cha_clear_" + e, !0, 0),
  1680. this.clearAniSpine.skeleton.setToSetupPose(),
  1681. this.karictorContainer.addChild(this.clearAniSpine);
  1682. for (var i = !1, a = 0; 6 > a; a++)
  1683. for (var s = 0; 7 > s; s++)
  1684. if (this.puzzleArray[a][s][0] > 5 && this.puzzleArray[a][s][0] < 14) {
  1685. i = !0;
  1686. break
  1687. }
  1688. if (i || this.turnCount >= this.feverTurnCount)
  1689. this.addChild(this.popUp),
  1690. this.popUp.showPopup(5);
  1691. else {
  1692. this.addChild(this.popUp);
  1693. var r = 0;
  1694. r = this.stageNum % 2 == 0 ? 3 : 2,
  1695. this.popUp.showPopup(r)
  1696. }
  1697. }
  1698. }
  1699. ,
  1700. gc.GamePlayPage.prototype.showItemLine = function () {
  1701. this.itemLineEffectContainer.removeChildren();
  1702. for (var t = 0; 6 > t; t++)
  1703. for (var e = 0; 7 > e; e++)
  1704. if (this.puzzleArray[t][e][0] > 5 && this.puzzleArray[t][e][0] < 14) {
  1705. var i = null;
  1706. i = this.puzzleArray[t][e][0] % 2 == 0 ? new gc.MovieClip("special1_effect_000", 1, 9, .2, 0) : new gc.MovieClip("special2_effect_000", 1, 9, .2, 0),
  1707. i.anchor.set(.5, .5),
  1708. i.x = this.puzzleArray[t][e][1].x,
  1709. i.y = this.puzzleArray[t][e][1].y,
  1710. this.itemLineEffectContainer.addChild(i)
  1711. }
  1712. }
  1713. ,
  1714. gc.GamePlayPage.prototype.gameover = function () {
  1715. var t = Math.floor((this.stageNum + 1) / 2);
  1716. this.failAniSpine.state.setAnimation(0, "cha_fail_" + t, !1, 0),
  1717. this.failAniSpine.skeleton.setToSetupPose(),
  1718. this.karictorContainer.removeChildren(),
  1719. this.karictorContainer.addChild(this.failAniSpine),
  1720. this.turnCount = 0,
  1721. this.moveNumber.setValue(this.turnCount),
  1722. gc.isLowPhone || this.building.stopInterval(),
  1723. this.gameOverPopupAnimation()
  1724. }
  1725. ,
  1726. gc.GamePlayPage.prototype.dropPuzzleOver = function () {
  1727. if (this.itemSelectedArray.length > 0)
  1728. return void this.newCheckNextItemBlock();
  1729. var t, e = this.checkDragPuzzle();
  1730. if (e) {
  1731. if (this.turnCount < 0 && (this.turnCount = 0),
  1732. this.moveNumber.setValue(this.turnCount),
  1733. !(this.totalClearBlockNum < this.totalClear))
  1734. return void (this.stageNum % 2 == 1 ? TweenMax.to(this.turnBarMask, .1, {
  1735. x: 500 * this.totalClearBlockNum / this.totalFlag - 500,
  1736. onUpdate: function () {
  1737. this.turnBarRod.x = this.turnBarMask.x + 610
  1738. }
  1739. .bind(this),
  1740. onComplete: function () {
  1741. this.newClearStage()
  1742. }
  1743. .bind(this)
  1744. }) : TweenMax.to(this.turnBarMask, .1, {
  1745. x: 0,
  1746. onUpdate: function () {
  1747. this.turnBarRod.x = this.turnBarMask.x + 610
  1748. }
  1749. .bind(this),
  1750. onComplete: function () {
  1751. this.newClearStage()
  1752. }
  1753. .bind(this)
  1754. }));
  1755. if (TweenMax.to(this.turnBarMask, .1, {
  1756. x: 500 * this.totalClearBlockNum / this.totalFlag - 500,
  1757. onUpdate: function () {
  1758. this.turnBarRod.x = this.turnBarMask.x + 610
  1759. }
  1760. .bind(this)
  1761. }),
  1762. this.turnCount <= 0) {
  1763. var t = Math.floor((this.stageNum + 1) / 2);
  1764. this.failAniSpine.state.setAnimation(0, "cha_fail_" + t, !1, 0),
  1765. this.failAniSpine.skeleton.setToSetupPose(),
  1766. this.karictorContainer.removeChildren(),
  1767. this.karictorContainer.addChild(this.failAniSpine),
  1768. this.turnCount = 0,
  1769. this.moveNumber.setValue(this.turnCount),
  1770. gc.isLowPhone || this.building.stopInterval(),
  1771. this.gameOverPopupAnimation()
  1772. } else
  1773. this.test.inGuied = !1,
  1774. this.guiedTime = (new Date).getTime(),
  1775. this.gameBaceContiner.interactive = !0,
  1776. this.setTurnCountFlag(!0)
  1777. } else
  1778. this.notDragPuzzleReset()
  1779. }
  1780. ,
  1781. gc.GamePlayPage.prototype.gameOverItemBomb = function () {
  1782. this.overAnimationFlag = !0,
  1783. this.itemBombOver = !0,
  1784. this.feverTimeStart = !0;
  1785. for (var t = [], e = 0; 6 > e; e++)
  1786. for (var i = 0; 7 > i; i++)
  1787. this.puzzleArray[e][i][0] > 5 && this.puzzleArray[e][i][0] < 14 && t.push([e, i]);
  1788. t.length > 0 ? this.itemSelectedFun(this.puzzleArray[t[0][0]][t[0][1]][0], [t[0][1], t[0][0]]) : this.randomBomb()
  1789. }
  1790. ,
  1791. gc.GamePlayPage.prototype.randomBomb = function () {
  1792. if (this.itemBombOver = !1,
  1793. 0 == this.turnCount) {
  1794. this.addChild(this.popUp);
  1795. var t = 0;
  1796. return t = this.stageNum % 2 == 0 ? 3 : 2,
  1797. void this.popUp.showPopup(t)
  1798. }
  1799. this.totalScore += this.turnScoreArray[this.stageNum] * this.turnCount,
  1800. this.randomBombCount = Math.floor(this.turnCount / this.feverTurnCount);
  1801. for (var e = [], i = [], a = 0; 6 > a; a++)
  1802. for (var s = 0; 7 > s; s++)
  1803. this.puzzleArray[a][s][0] < 6 && this.puzzleArray[a][s][0] > 0 && e.push([a, s]);
  1804. for (; ;) {
  1805. if (e.length <= 0)
  1806. break;
  1807. if (!(i.length < this.randomBombCount))
  1808. break;
  1809. var r = Math.floor(100 * Math.random()) % e.length;
  1810. i.push(e.splice(r, 1))
  1811. }
  1812. if (i.length > 0)
  1813. this.randomBombAnimation(i);
  1814. else {
  1815. this.addChild(this.popUp);
  1816. var t = 0;
  1817. t = this.stageNum % 2 == 0 ? 3 : 2,
  1818. this.popUp.showPopup(t)
  1819. }
  1820. }
  1821. ,
  1822. gc.GamePlayPage.prototype.stageChangeOver = function () {
  1823. this.addChild(this.popUp),
  1824. this.stageNum % 2 == 0 ? this.popUp.showPopup(1) : this.popUp.showPopup(6)
  1825. }
  1826. ,
  1827. gc.GamePlayPage.prototype.showEndingPage = function () {
  1828. this.addChild(this.endingPage),
  1829. this.endingPage.showChaAniamtion()
  1830. }
  1831. ,
  1832. gc.GamePlayPage.prototype.scoreSave = function () {
  1833. return gc.soundBt.x = GD.width + 500,
  1834. null != gc.game_idx && NetworkManager.sendData2("gameScoreSave", {
  1835. gameId: gc.gameId,
  1836. type: gc.gameType,
  1837. score: this.totalScore,
  1838. stage: this.stageNum,
  1839. game_idx: gc.game_idx,
  1840. start_datetime: gc.startDatetime
  1841. }, this.saveScoreResult, this),
  1842. this.loadingShow(),
  1843. this.emit("GOTO_MAINPAGE")
  1844. // void GamePocket.Sdk.Ranking.add(this.totalScore, function (t) {
  1845. // if (this.loadingHide(),
  1846. // t.code === GamePocket.Sdk.ResponseCode.SUCCESS) {
  1847. // var e = t.result;
  1848. // console.log("랭킹을 남긴 사용자 수 : " + e.countOfAllUsers),
  1849. // console.log("" + e.percentile),
  1850. // console.log("" + e.group),
  1851. // console.log("" + e.score),
  1852. // this.showResultPopup(this.totalScore, e.score, e.percentile, e.group, 1)
  1853. // } else
  1854. // t.code == GamePocket.Sdk.ResponseCode.NOT_FOUND_GAME || t.code == GamePocket.Sdk.ResponseCode.NO_AUTHENTICATION ? this.showResultPopup(this.totalScore, 0, 0, "DIAMOND", 2, 2) : this.showResultPopup(this.totalScore, 0, 0, "DIAMOND", 2, 1),
  1855. // console.log(t.code)
  1856. // }
  1857. // .bind(this))
  1858. }
  1859. ,
  1860. gc.GamePlayPage.prototype.saveScoreResult = function (t) {
  1861. gc.gameType = 1
  1862. }
  1863. ,
  1864. gc.GamePlayPage.prototype.showResultPopup = function (t, e, i, a, s, r) {
  1865. console.log(t, e, i),
  1866. this.resultBox.init(t, e, i, a, s, r),
  1867. this.addChild(this.resultBox)
  1868. }
  1869. ,
  1870. gc.GamePlayPage.prototype.scoreSaveResult = function (t) {
  1871. this.loadingHide(),
  1872. this.resultBox.init(t.result.endInfo.nowScore, t.result.endInfo.maxScore, t.result.endInfo.myRank, t.result.endInfo.playOpportunity),
  1873. this.addChild(this.resultBox),
  1874. console.log("scoreSaveResult===result data === " + t)
  1875. }
  1876. ,
  1877. gc.GamePlayPage.prototype.randomBombAnimationOver = function (t) {
  1878. for (var e = 0; e < t.length; e++) {
  1879. var i = new gc.MovieClip("puzzle_effect_000", 1, 15, 1, 0);
  1880. i.loop = !1,
  1881. i.anchor.set(.5, .5),
  1882. this.puzzleArray[t[e][0][0]][t[e][0][1]][1].alpha = 0,
  1883. i.x = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].x,
  1884. i.y = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].y,
  1885. this.gameEffectContiner.addChild(i);
  1886. var a = new gc.NumberText("ui_puzzle_000", "center", 0);
  1887. a.x = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].x,
  1888. a.y = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].y - 5,
  1889. a.setValue(this.turnScoreArray[this.stageNum]),
  1890. this.topUIContainer.addChild(a),
  1891. this.scoreNumberText.valueTween(this.totalScore),
  1892. TweenMax.to(a, .3, {
  1893. delay: .5,
  1894. alpha: .5,
  1895. y: "-=20",
  1896. onComplete: function (t) {
  1897. this.topUIContainer.removeChild(t)
  1898. }
  1899. .bind(this),
  1900. onCompleteParams: [a],
  1901. onStart: function (t) {
  1902. this.gameEffectContiner.removeChild(t)
  1903. }
  1904. .bind(this),
  1905. onStartParams: [i]
  1906. }),
  1907. e == t.length - 1 ? TweenMax.to(i, .8, {
  1908. alpha: 1,
  1909. onComplete: function () {
  1910. this.gameEffectContiner.removeChildren(),
  1911. this.addChild(this.popUp);
  1912. var t = 0;
  1913. t = this.stageNum % 2 == 0 ? 3 : 2,
  1914. this.popUp.showPopup(t)
  1915. }
  1916. .bind(this)
  1917. }) : TweenMax.to(i, .8, {
  1918. alpha: 1
  1919. })
  1920. }
  1921. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle")
  1922. }
  1923. ,
  1924. gc.GamePlayPage.prototype.randomBombAnimation = function (t) {
  1925. for (var e = 0; e < t.length; e++) {
  1926. var i = null;
  1927. i = PIXI.Sprite.fromFrame("puzzle_effect_0001.png"),
  1928. i.anchor.set(.5, .5),
  1929. i.x = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].x,
  1930. i.y = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].y,
  1931. e == t.length - 1 ? TweenMax.from(i, 1, {
  1932. delay: .1 * e,
  1933. x: .1 * GD.width,
  1934. y: .18 * GD.height,
  1935. onComplete: function (e) {
  1936. this.gameEffectContiner.removeChildren(),
  1937. this.randomBombAnimationOver(t)
  1938. }
  1939. .bind(this),
  1940. onCompleteParams: [i],
  1941. onStart: function (t) {
  1942. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
  1943. this.turnCount -= this.feverTurnCount,
  1944. this.turnCount < 0 && (this.turnCount = 0),
  1945. this.moveNumber.setValue(this.turnCount),
  1946. this.gameEffectContiner.addChild(t)
  1947. }
  1948. .bind(this),
  1949. onStartParams: [i]
  1950. }) : TweenMax.from(i, 1, {
  1951. delay: .1 * e,
  1952. x: .1 * GD.width,
  1953. y: .18 * GD.height,
  1954. onStart: function (t) {
  1955. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
  1956. this.turnCount -= this.feverTurnCount,
  1957. this.turnCount < 0 && (this.turnCount = 0),
  1958. this.moveNumber.setValue(this.turnCount),
  1959. this.gameEffectContiner.addChild(t)
  1960. }
  1961. .bind(this),
  1962. onStartParams: [i]
  1963. })
  1964. }
  1965. }
  1966. ,
  1967. gc.GamePlayPage.prototype.checkStoneBlockDrop = function () {
  1968. for (var t = !1, e = 0; 7 > e; e++)
  1969. if (this.puzzleArray[5][e][0] > 14)
  1970. return !0;
  1971. return t
  1972. }
  1973. ,
  1974. gc.GamePlayPage.prototype.shuffleAnimation = function () {
  1975. for (var t = null, e = [], i = 0; 6 > i; i++)
  1976. for (var a = 0; 7 > a; a++)
  1977. t = this.puzzleArray[i][a][1],
  1978. a % 2 == 0 ? t.y = this.sPuzzleStartY + i * this.pYp : t.y = this.dPuzzleStartY + i * this.pYp,
  1979. t.x = this.puzzleStartX + a * this.pXp,
  1980. e.push(t);
  1981. TweenMax.from(e, .5, {
  1982. x: this.puzzleArray[3][3][1].x,
  1983. y: this.puzzleArray[3][3][1].y,
  1984. onComplete: function () {
  1985. this.gameTopEffectContiner.removeChildren(),
  1986. this.dropPuzzleOver()
  1987. }
  1988. .bind(this)
  1989. })
  1990. }
  1991. ,
  1992. gc.GamePlayPage.prototype.notDragPuzzleReset = function () {
  1993. this.gameBaceContiner.interactive = !1;
  1994. var t = PIXI.Sprite.fromFrame("ui_notice.png");
  1995. t.anchor.set(.5, .5),
  1996. t.x = GD.width / 2,
  1997. t.y = .7 * GD.height,
  1998. this.gameTopEffectContiner.addChild(t);
  1999. for (var e = [], i = 0; 6 > i; i++)
  2000. for (var a = 0; 7 > a; a++)
  2001. if (gc.isLowPhone) {
  2002. if (this.puzzleArray[i][a][1].visible = !1,
  2003. this.puzzleArray[i][a][0] < 6) {
  2004. var s = Math.floor(100 * Math.random()) % 5 + 1;
  2005. this.puzzleArray[i][a][0] = s,
  2006. this.puzzleArray[i][a][1].texture = new PIXI.Texture.fromFrame(this.blockNameArray[this.stageNum] + s + ".png")
  2007. }
  2008. } else
  2009. e.push(this.puzzleArray[i][a][1]);
  2010. gc.isLowPhone ? TweenMax.delayedCall(1, function () {
  2011. for (var t = 0; 6 > t; t++)
  2012. for (var e = 0; 7 > e; e++)
  2013. this.puzzleArray[t][e][1].visible = !0;
  2014. this.gameTopEffectContiner.removeChildren(),
  2015. this.dropPuzzleOver()
  2016. }
  2017. .bind(this)) : TweenMax.to(e, .5, {
  2018. x: this.puzzleArray[3][3][1].x,
  2019. y: this.puzzleArray[3][3][1].y,
  2020. delay: .5,
  2021. onComplete: function () {
  2022. for (var t = 0; 6 > t; t++)
  2023. for (var e = 0; 7 > e; e++)
  2024. if (this.puzzleArray[t][e][0] < 6) {
  2025. var i = Math.floor(100 * Math.random()) % 5 + 1;
  2026. this.puzzleArray[t][e][0] = i,
  2027. this.puzzleArray[t][e][1].texture = new PIXI.Texture.fromFrame(this.blockNameArray[this.stageNum] + i + ".png")
  2028. }
  2029. this.shuffleAnimation()
  2030. }
  2031. .bind(this)
  2032. })
  2033. }
  2034. ,
  2035. gc.GamePlayPage.prototype.drawDragPuzzle = function () {
  2036. if (this.turnCountFlag && this.dragedArray.length >= 3) {
  2037. if (this.setTurnCountFlag(!1),
  2038. this.itemLineEffectContainer.removeChildren(),
  2039. this.test.inGuied = !0,
  2040. this.turnCount-- ,
  2041. this.turnCount < 0 && (this.turnCount = 0),
  2042. this.turnCount <= 5)
  2043. try {
  2044. this.moveNumber.fileName = "ui_move3_",
  2045. this.moveLineContainer.removeChildren(),
  2046. this.moveLineContainer.addChild(this.moveLineSpine),
  2047. this.move5CountPopup.flag || (this.move5CountPopup.flag = !0,
  2048. this.move5CountPopupAnimation())
  2049. } catch (t) { }
  2050. this.moveNumber.setValue(this.turnCount),
  2051. this.buildingMoveBlockNum += this.dragedArray.length,
  2052. this.changeBuildingMoveTime(1),
  2053. this.gameBaceContiner.interactive = !1,
  2054. this.copyDrageArray = [];
  2055. for (var e = 0; e < this.dragedArray.length; e++) {
  2056. var i = this.dragedArray[e][0]
  2057. , a = [i, this.dragedArray[e]];
  2058. this.copyDrageArray.push(a);
  2059. var s = null;
  2060. this.blockCallBackLists.length > 0 ? (s = this.blockCallBackLists.shift(),
  2061. i > 5 ? s.texture = PIXI.Texture.fromFrame("block_000" + this.dragedArray[e][0] + ".png") : s.texture = PIXI.Texture.fromFrame(this.blockNameArray[this.stageNum] + this.dragedArray[e][0] + ".png")) : s = i > 5 ? PIXI.Sprite.fromFrame("block_000" + this.dragedArray[e][0] + ".png") : PIXI.Sprite.fromFrame(this.blockNameArray[this.stageNum] + this.dragedArray[e][0] + ".png"),
  2062. s.anchor.set(.5, .5),
  2063. s.x = this.dragedArray[e][1].x,
  2064. s.y = this.dragedArray[e][1].y;
  2065. var r = [];
  2066. r.push(s),
  2067. r.push(i),
  2068. this.gameMergeAniContiner.addChildAt(s, 0),
  2069. this.mergeDragedArray.push(r)
  2070. }
  2071. this.puzzleMergeAnimation()
  2072. }
  2073. }
  2074. ,
  2075. gc.GamePlayPage.prototype.changeDragBlock = function (t) {
  2076. if (t > 1) {
  2077. var e = 2 * this.copyDrageArray[0][0] + 2 + t;
  2078. if (10 == e) {
  2079. var i = Math.floor(20 * Math.random()) % 3 + 1
  2080. , a = this.getTouchPosition(this.copyDrageArray[this.copyDrageArray.length - 1][1][1]);
  2081. 5 == a[1] && 0 == a[0] ? i = 1 : 5 == a[1] && 0 == a[6] && (i = 1),
  2082. this.copyDrageArray[this.copyDrageArray.length - 1][1][0] = e,
  2083. this.copyDrageArray[this.copyDrageArray.length - 1][1][1].texture = new PIXI.Texture.fromFrame("block_000" + e + ".png"),
  2084. this.copyDrageArray[this.copyDrageArray.length - 1][1][1].alpha = 1,
  2085. this.copyDrageArray[this.copyDrageArray.length - 1][1][2] = i,
  2086. this.itemSelectedArray.push(this.copyDrageArray[this.copyDrageArray.length - 1][1][1])
  2087. } else
  2088. this.copyDrageArray[this.copyDrageArray.length - 1][1][0] = e,
  2089. this.copyDrageArray[this.copyDrageArray.length - 1][1][1].texture = new PIXI.Texture.fromFrame("block_000" + e + ".png"),
  2090. this.copyDrageArray[this.copyDrageArray.length - 1][1][1].alpha = 1,
  2091. this.itemSelectedArray.push(this.copyDrageArray[this.copyDrageArray.length - 1][1][1])
  2092. }
  2093. }
  2094. ,
  2095. gc.GamePlayPage.prototype.drawDragItem = function () {
  2096. if (!this.overAnimationFlag)
  2097. if (5 == this.copyDrageArray[0][0]) {
  2098. var t = Math.floor(this.copyDrageArray.length / 3);
  2099. t > 5 && (t = 5);
  2100. var e = this.copyDrageArray.length - 1
  2101. , i = this.getTouchPosition(this.copyDrageArray[e][1][1]);
  2102. this.showTurnPlusAnimation(i[1], i[0], t);
  2103. for (var a = this.copyDrageArray.length - 1; a > this.copyDrageArray.length - 1 - t; a--)
  2104. this.copyDrageArray[a][1][0] = 0,
  2105. this.copyDrageArray[a][1][1].alpha = 0
  2106. } else
  2107. this.copyDrageArray.length >= 8 ? (this.goldLevelClearCount++ ,
  2108. this.changeDragBlock(3)) : this.copyDrageArray.length >= 5 ? this.changeDragBlock(2) : this.changeDragBlock(1)
  2109. }
  2110. ,
  2111. gc.GamePlayPage.prototype.changeBuildingMoveTime = function (t) {
  2112. if (!this.feverTimeStart)
  2113. if (gc.isLowPhone || this.building.stopInterval(),
  2114. 1 == t) {
  2115. var e = Math.ceil(this.stageNum / 2);
  2116. this.animation.state.setAnimation(0, "flag_" + e, !0, 0),
  2117. this.animation.skeleton.setToSetupPose(),
  2118. this.karictorContainer.removeChildren(),
  2119. this.karictorContainer.addChild(this.animation),
  2120. gc.isLowPhone || (this.building.resetTime(200 - 30 * this.buildingMoveBlockNum),
  2121. this.building.startMove())
  2122. } else {
  2123. var e = Math.ceil(this.stageNum / 2);
  2124. this.karictorContainer.removeChildren(),
  2125. this.normalAnimation.state.setAnimation(0, "normal_" + e, !0, 0),
  2126. this.normalAnimation.skeleton.setToSetupPose(),
  2127. this.karictorContainer.addChild(this.normalAnimation),
  2128. gc.isLowPhone || this.building.resetTime(1e3)
  2129. }
  2130. }
  2131. ,
  2132. gc.GamePlayPage.prototype.meansOfTransportAnimation = function (t, e) {
  2133. if (!gc.isLowPhone && !this.itemBombOver)
  2134. if (this.topImgType = t,
  2135. 1 == t) {
  2136. this.animation.visible = !1;
  2137. var i = new gc.MovieClip("special_airplane_ani", 2, 2, .5, 10);
  2138. i.anchor.set(.5, .5),
  2139. i.x = GD.width / 2,
  2140. i.y = .2 * GD.height,
  2141. this.gameTransportContianer.addChild(i),
  2142. TweenMax.to(i, .4, {
  2143. y: .1 * GD.height,
  2144. onComplete: function (t) {
  2145. TweenMax.to(t, .4, {
  2146. delay: .2,
  2147. y: .2 * GD.height,
  2148. onStart: function () { }
  2149. .bind(this),
  2150. onComplete: function (t) {
  2151. this.animation.visible = !0,
  2152. this.gameTransportContianer.removeChild(t)
  2153. }
  2154. .bind(this),
  2155. onCompleteParams: [t],
  2156. ease: Linear.easeInOut
  2157. })
  2158. }
  2159. .bind(this),
  2160. onCompleteParams: [i],
  2161. ease: Linear.easeInOut
  2162. })
  2163. } else if (2 == t) {
  2164. var i = new gc.MovieClip("special_helicopter_ani", 3, 4, .5, 10);
  2165. i.anchor.set(.5, .5),
  2166. i.x = GD.width / 2,
  2167. i.y = .2 * GD.height,
  2168. this.gameTransportContianer.addChild(i),
  2169. this.animation.visible = !1,
  2170. TweenMax.to(i, .5, {
  2171. y: .1 * GD.height,
  2172. onComplete: function (t) {
  2173. TweenMax.to(t, .5, {
  2174. delay: .2,
  2175. y: .2 * GD.height,
  2176. onStart: function () { }
  2177. .bind(this),
  2178. onComplete: function (t) {
  2179. this.animation.visible = !0,
  2180. this.gameTransportContianer.removeChild(t)
  2181. }
  2182. .bind(this),
  2183. onCompleteParams: [t],
  2184. ease: Linear.easeInOut
  2185. })
  2186. }
  2187. .bind(this),
  2188. onCompleteParams: [i],
  2189. ease: Linear.easeInOut
  2190. })
  2191. } else if (3 == t) {
  2192. var i = new gc.MovieClip("special_boat_ani", 1, 2, .2, 10);
  2193. i.anchor.set(.5, .5),
  2194. i.y = .2 * GD.height + 100,
  2195. i.x = -i.width / 2,
  2196. i.rotation = -Math.PI / 12,
  2197. this.gameTransportContianer.addChild(i),
  2198. TweenMax.to(i, .2, {
  2199. rotation: 0,
  2200. bezier: [{
  2201. x: GD.width / 4,
  2202. y: .19 * GD.height + 50
  2203. }, {
  2204. x: GD.width / 2,
  2205. y: .21 * GD.height
  2206. }],
  2207. x: GD.width / 2,
  2208. onComplete: function (t) {
  2209. t.textures = new gc.MovieClip("special_boat_ani", 3, 4, 2, 10).textures,
  2210. this.animation.visible = !1,
  2211. TweenMax.to(t, .2, {
  2212. rotation: Math.PI / 12,
  2213. bezier: [{
  2214. x: 3 * GD.width / 4,
  2215. y: .19 * GD.height + 50
  2216. }, {
  2217. x: GD.width + t.width / 2,
  2218. y: .2 * GD.height + 100
  2219. }],
  2220. delay: 1.2,
  2221. x: GD.width + t.width,
  2222. onStart: function () {
  2223. t.textures = new gc.MovieClip("special_boat_ani", 1, 2, 1, 10).textures,
  2224. this.animation.visible = !0
  2225. }
  2226. .bind(this),
  2227. onComplete: function (t) {
  2228. this.gameTransportContianer.removeChild(t)
  2229. }
  2230. .bind(this),
  2231. onCompleteParams: [t]
  2232. })
  2233. }
  2234. .bind(this),
  2235. onCompleteParams: [i]
  2236. })
  2237. } else if (4 == t) {
  2238. var i = new gc.MovieClip("special_train_ani", 1, 3, .1, 10);
  2239. i.anchor.set(.5, .5),
  2240. i.y = .2 * GD.height + 100,
  2241. i.x = -i.width / 2,
  2242. i.rotation = -Math.PI / 12,
  2243. this.gameTransportContianer.addChild(i),
  2244. TweenMax.to(i, .2, {
  2245. rotation: 0,
  2246. bezier: [{
  2247. x: GD.width / 4,
  2248. y: .19 * GD.height + 50
  2249. }, {
  2250. x: GD.width / 2,
  2251. y: .21 * GD.height
  2252. }],
  2253. onComplete: function (t) {
  2254. this.animation.visible = !1,
  2255. t.textures = new gc.MovieClip("special_train_ani", 4, 5, 2, 10).textures,
  2256. TweenMax.to(t, .2, {
  2257. rotation: Math.PI / 12,
  2258. bezier: [{
  2259. x: 3 * GD.width / 4,
  2260. y: .19 * GD.height + 50
  2261. }, {
  2262. x: GD.width + t.width / 2,
  2263. y: .2 * GD.height + 100
  2264. }],
  2265. delay: e - .2,
  2266. x: GD.width + t.width,
  2267. onStart: function () {
  2268. t.textures = new gc.MovieClip("special_train_ani", 1, 3, 1, 10).textures,
  2269. this.gameTransportContianer.children.length > 1 ? this.topImgType > 2 && (this.animation.visible = !0) : this.animation.visible = !0
  2270. }
  2271. .bind(this),
  2272. onComplete: function (t) {
  2273. this.gameTransportContianer.removeChild(t)
  2274. }
  2275. .bind(this),
  2276. onCompleteParams: [t]
  2277. })
  2278. }
  2279. .bind(this),
  2280. onCompleteParams: [i],
  2281. ease: Linear.easeNone
  2282. })
  2283. }
  2284. }
  2285. ,
  2286. gc.GamePlayPage.prototype.showScoreEffect = function (t, e) {
  2287. gc.isLowPhone || this.scoreEffect.showScore(t, this.puzzleArray[e[1]][e[0]][1].x, this.puzzleArray[e[1]][e[0]][1].y)
  2288. }
  2289. ,
  2290. gc.GamePlayPage.prototype.itemSelectedFun = function (t, e) {
  2291. switch (this.totalClearBlockNum++ ,
  2292. t) {
  2293. case 1:
  2294. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
  2295. this.totalScore += 100,
  2296. this.showScoreEffect(100, e);
  2297. break;
  2298. case 2:
  2299. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
  2300. this.totalScore += 100,
  2301. this.showScoreEffect(100, e);
  2302. break;
  2303. case 3:
  2304. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
  2305. this.totalScore += 100,
  2306. this.showScoreEffect(100, e);
  2307. break;
  2308. case 4:
  2309. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
  2310. this.totalScore += 100,
  2311. this.showScoreEffect(100, e);
  2312. break;
  2313. case 5:
  2314. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
  2315. this.totalScore += 100,
  2316. this.showScoreEffect(100, e);
  2317. break;
  2318. case 6:
  2319. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_helicopter"),
  2320. this.meansOfTransportAnimation(2, .2),
  2321. this.buildingMoveBlockNum += this.item6Num,
  2322. this.changeBuildingMoveTime(1),
  2323. this.totalScore += 1111,
  2324. this.showScoreEffect(1111, e),
  2325. this.puzzleArray[e[1]][e[0]][1].alpha = 0;
  2326. var i = null;
  2327. i = this.sixBombEffectLists.length > 0 ? this.sixBombEffectLists.shift() : new gc.MovieClip("special_helicopter", 1, 3, 2, 0),
  2328. i.anchor.set(.5, .5),
  2329. i.scale.set(1),
  2330. i.x = this.puzzleArray[e[1]][e[0]][1].x,
  2331. i.y = this.puzzleArray[e[1]][e[0]][1].y,
  2332. this.gameEffectContiner.addChild(i),
  2333. i.gotoAndPlay(1);
  2334. TweenMax.to(i.scale, 1, {
  2335. x: 2,
  2336. y: 2,
  2337. onComplete: function (t, e) {
  2338. this.gameEffectContiner.removeChild(t),
  2339. t.gotoAndStop(1),
  2340. this.sixBombEffectLists.push(t),
  2341. this.copterBomb(e)
  2342. }
  2343. .bind(this),
  2344. onCompleteParams: [i, e]
  2345. });
  2346. break;
  2347. case 7:
  2348. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_helicopter"),
  2349. this.meansOfTransportAnimation(2, .2),
  2350. this.buildingMoveBlockNum += this.item12Num,
  2351. this.changeBuildingMoveTime(1),
  2352. this.totalScore += 2222,
  2353. this.showScoreEffect(2222, e),
  2354. this.puzzleArray[e[1]][e[0]][1].alpha = 0;
  2355. var i = null;
  2356. i = this.sixBombEffectLists.length > 0 ? this.sixBombEffectLists.shift() : new gc.MovieClip("special_helicopter", 1, 3, 2, 0),
  2357. i.anchor.set(.5, .5),
  2358. i.scale.set(1),
  2359. i.x = this.puzzleArray[e[1]][e[0]][1].x,
  2360. i.y = this.puzzleArray[e[1]][e[0]][1].y,
  2361. this.gameEffectContiner.addChild(i),
  2362. i.gotoAndPlay(1);
  2363. TweenMax.to(i.scale, 1, {
  2364. x: 3,
  2365. y: 3,
  2366. onComplete: function (t, e) {
  2367. this.gameEffectContiner.removeChild(t),
  2368. t.gotoAndStop(1),
  2369. this.sixBombEffectLists.push(t),
  2370. this.strongCopterBomb(e)
  2371. }
  2372. .bind(this),
  2373. onCompleteParams: [i, e]
  2374. });
  2375. break;
  2376. case 10:
  2377. this.buildingMoveBlockNum += this.item6Num,
  2378. this.changeBuildingMoveTime(1),
  2379. this.totalScore += 1111,
  2380. this.showScoreEffect(1111, e),
  2381. this.trainBomb(e);
  2382. break;
  2383. case 11:
  2384. this.buildingMoveBlockNum += this.item12Num,
  2385. this.changeBuildingMoveTime(1),
  2386. this.totalScore += 2222,
  2387. this.showScoreEffect(2222, e),
  2388. this.strongTrainBomb(e);
  2389. break;
  2390. case 12:
  2391. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_ship"),
  2392. this.buildingMoveBlockNum += this.item6Num,
  2393. this.changeBuildingMoveTime(1),
  2394. this.totalScore += 1111,
  2395. this.showScoreEffect(1111, e),
  2396. this.shipBomb(e);
  2397. break;
  2398. case 13:
  2399. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_ship"),
  2400. this.buildingMoveBlockNum += this.item12Num,
  2401. this.changeBuildingMoveTime(1),
  2402. this.totalScore += 2222,
  2403. this.showScoreEffect(2222, e),
  2404. this.strongShipBomb(e);
  2405. break;
  2406. case 8:
  2407. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_airplane"),
  2408. this.meansOfTransportAnimation(1),
  2409. this.buildingMoveBlockNum += this.item6Num,
  2410. this.changeBuildingMoveTime(1),
  2411. this.totalScore += 1111,
  2412. this.showScoreEffect(1111, e),
  2413. this.planeBomb(e);
  2414. break;
  2415. case 9:
  2416. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_airplane"),
  2417. this.meansOfTransportAnimation(1),
  2418. this.buildingMoveBlockNum += this.item12Num,
  2419. this.changeBuildingMoveTime(1),
  2420. this.totalScore += 2222,
  2421. this.showScoreEffect(2222, e),
  2422. this.strongPlaneBomb(e);
  2423. break;
  2424. case 14:
  2425. if (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_foot"),
  2426. this.totalScore += 333,
  2427. this.showScoreEffect(333, e),
  2428. console.log(11111111111),
  2429. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvplus"),
  2430. this.turnCount++ ,
  2431. this.turnCount > 5)
  2432. try {
  2433. this.moveNumber.fileName = "ui_move1_",
  2434. this.moveLineContainer.removeChildren(),
  2435. this.move5CountPopup.flag = !1
  2436. } catch (a) { }
  2437. this.timeAddAnimation(e[1], e[0], 1)
  2438. }
  2439. }
  2440. ,
  2441. gc.GamePlayPage.prototype.timeAddAnimation = function (t, e, i) {
  2442. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvplus"),
  2443. this.moveNumber.setValue(this.turnCount);
  2444. var a = PIXI.Sprite.fromFrame("move_plus000" + i + ".png");
  2445. a.anchor.set(.5, .5),
  2446. a.x = this.puzzleArray[t][e][1].x,
  2447. a.y = this.puzzleArray[t][e][1].y,
  2448. this.turnCountMusContiner.addChild(a),
  2449. TweenMax.to(a, .5, {
  2450. y: "-=20",
  2451. onComplete: function (t) {
  2452. this.turnCountMusContiner.removeChild(t)
  2453. }
  2454. .bind(this),
  2455. onCompleteParams: [a]
  2456. });
  2457. var s = 0
  2458. , r = null;
  2459. r = PIXI.Sprite.fromFrame("effect_move_plus.png"),
  2460. r.anchor.set(.5, .5),
  2461. r.x = this.puzzleArray[t][e][1].x,
  2462. r.y = this.puzzleArray[t][e][1].y,
  2463. r.scale.x = 1.2,
  2464. r.scale.y = 1.2,
  2465. this.turnCountMusContiner.addChild(r),
  2466. TweenMax.to(r, .3, {
  2467. delay: s,
  2468. x: .15 * GD.width,
  2469. y: .06 * GD.height,
  2470. onComplete: function (t, e, i) {
  2471. this.moveNumber.setValue(this.turnCount),
  2472. this.turnCountMusContiner.removeChild(t)
  2473. }
  2474. .bind(this),
  2475. onCompleteParams: [r, t, e],
  2476. ease: Linear.easeNone
  2477. })
  2478. }
  2479. ,
  2480. gc.GamePlayPage.prototype.singleShipBombAni = function (t, e, i) {
  2481. var a = null;
  2482. a = new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
  2483. a.loop = !1,
  2484. a.anchor.set(.5, .5),
  2485. a.x = this.puzzleArray[t][e][1].x,
  2486. a.y = this.puzzleArray[t][e][1].y,
  2487. this.gameEffectContiner.addChild(a),
  2488. TweenMax.delayedCall(.2, function (t, e, i, a) {
  2489. this.bombEffectArray.push(t),
  2490. this.gameEffectContiner.removeChild(t),
  2491. this.shipBombCheckAni(e, i, a)
  2492. }
  2493. .bind(this), [a, t, e, i])
  2494. }
  2495. ,
  2496. gc.GamePlayPage.prototype.singleItemBombAni = function (t, e) {
  2497. var i = null;
  2498. i = new gc.MovieClip("puzzle_effect_000", 1, 15, this.copterMovieClipTime, 0),
  2499. i.loop = !1,
  2500. i.anchor.set(.5, .5),
  2501. i.x = this.puzzleArray[t][e][1].x,
  2502. i.y = this.puzzleArray[t][e][1].y,
  2503. this.gameEffectContiner.addChild(i),
  2504. TweenMax.delayedCall(this.copterBombTime, function (t) {
  2505. this.bombEffectArray.push(t),
  2506. this.gameEffectContiner.removeChild(t),
  2507. this.gameEffectContiner.children.length <= 0 && this.checkNextItemBlock()
  2508. }
  2509. .bind(this), [i])
  2510. }
  2511. ,
  2512. gc.GamePlayPage.prototype.stoneItemAni = function (t, e) {
  2513. var i = PIXI.Sprite.fromFrame("disturb_puzzle_effect.png");
  2514. i.anchor.set(.5, .5),
  2515. i.x = this.puzzleArray[t][e][1].x,
  2516. i.y = this.puzzleArray[t][e][1].y,
  2517. this.gameTopEffectContiner.addChild(i),
  2518. TweenMax.to(i, this.stonClearTime, {
  2519. alpha: 1,
  2520. onComplete: function (t) {
  2521. this.gameTopEffectContiner.removeChild(t)
  2522. }
  2523. .bind(this),
  2524. onCompleteParams: [i]
  2525. })
  2526. }
  2527. ,
  2528. gc.GamePlayPage.prototype.checkInDragArray = function (t) {
  2529. for (var e = -1, i = 0; i < this.mergeDragedArray.length; i++) {
  2530. var a = this.getTouchPosition(this.mergeDragedArray[i][0]);
  2531. if (a[0] == t[0] && a[1] == t[1]) {
  2532. e = i;
  2533. break
  2534. }
  2535. }
  2536. -1 != e && (this.gameMergeAniContiner.removeChild(this.mergeDragedArray[e][0]),
  2537. this.mergeDragedArray.splice(e, 1))
  2538. }
  2539. ,
  2540. gc.GamePlayPage.prototype.checkInArray = function (t, e) {
  2541. return t >= 0 && 6 > t && e >= 0 && 7 > e
  2542. }
  2543. ,
  2544. gc.GamePlayPage.prototype.copterBomb = function (t) {
  2545. var e = t[1]
  2546. , i = t[0];
  2547. if (this.puzzleArray[e][i][0] = 0,
  2548. this.puzzleArray[e][i][1].alpha = 0,
  2549. i % 2 == 0) {
  2550. for (var a = e; e + 1 >= a; a++)
  2551. for (var s = i - 1; i + 1 >= s; s++)
  2552. this.copterBombCheckFun(a, s, e, i);
  2553. this.copterBombCheckFun(e - 1, i, e, i)
  2554. } else {
  2555. for (var a = e - 1; e >= a; a++)
  2556. for (var s = i - 1; i + 1 >= s; s++)
  2557. this.copterBombCheckFun(a, s, e, i);
  2558. this.copterBombCheckFun(e + 1, i, e, i)
  2559. }
  2560. }
  2561. ,
  2562. gc.GamePlayPage.prototype.strongCopterBomb = function (t) {
  2563. var e = t[1]
  2564. , i = t[0];
  2565. this.puzzleArray[e][i][0] = 0,
  2566. this.puzzleArray[e][i][1].alpha = 0;
  2567. for (var a = e - 1; e + 1 >= a; a++)
  2568. for (var s = i - 2; i + 2 >= s; s++)
  2569. this.copterBombCheckFun(a, s, e, i);
  2570. if (i % 2 == 0) {
  2571. this.copterBombCheckFun(e - 2, i, e, i);
  2572. for (var a = i - 1; i + 1 >= a; a++)
  2573. this.copterBombCheckFun(e + 2, a, e, i)
  2574. } else {
  2575. this.copterBombCheckFun(e + 2, i, e, i);
  2576. for (var a = i - 1; i + 1 >= a; a++)
  2577. this.copterBombCheckFun(e - 2, a, e, i)
  2578. }
  2579. }
  2580. ,
  2581. gc.GamePlayPage.prototype.copterBombCheckFun = function (t, e, i, a) {
  2582. var s = !1;
  2583. if (!(0 > t || t > 5 || 0 > e || e > 6)) {
  2584. if (t == i && a == e)
  2585. ;
  2586. else if (0 == this.puzzleArray[t][e][0])
  2587. return;
  2588. if (this.checkInDragArray([e, t]),
  2589. s = this.checkPuzzleTypeAndBomb(t, e),
  2590. !s) {
  2591. var r = null;
  2592. r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.copterMovieClipTime, 0),
  2593. r.loop = !1,
  2594. r.animationSpeed = this.copterMovieClipTime,
  2595. r.anchor.set(.5, .5),
  2596. r.x = this.puzzleArray[t][e][1].x,
  2597. r.y = this.puzzleArray[t][e][1].y,
  2598. this.gameEffectContiner.addChild(r),
  2599. r.gotoAndPlay(1),
  2600. TweenMax.delayedCall(this.copterBombTime, function (t) {
  2601. this.bombEffectArray.push(t),
  2602. this.gameEffectContiner.removeChild(t),
  2603. t.gotoAndStop(1),
  2604. this.effectCallBackLists.push(t),
  2605. this.gameEffectContiner.children.length <= 0 && this.checkNextItemBlock()
  2606. }
  2607. .bind(this), [r])
  2608. }
  2609. }
  2610. }
  2611. ,
  2612. gc.GamePlayPage.prototype.recoverTrainEffect = function () {
  2613. if (this.trainEffectSaveLists.length > 0) {
  2614. var t = null;
  2615. try {
  2616. for (var e = this.trainEffectSaveLists.length - 1; e >= 0; e--)
  2617. t = this.trainEffectSaveLists.shift(),
  2618. t.rotation = 0,
  2619. this.trainEffectLists.push(t);
  2620. this.trainEffectSaveLists = []
  2621. } catch (i) { }
  2622. }
  2623. }
  2624. ,
  2625. gc.GamePlayPage.prototype.trainBombOverAnimation = function () {
  2626. if (this.trainTypeDU.length > 1 || this.trainTypeLR.length > 1 || this.trainTypeRL.length > 1) {
  2627. var t = 0;
  2628. if (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_train"),
  2629. this.trainTypeDU.length > 0) {
  2630. 6 * this.trainThrowTime > t && (t = 6 * this.trainThrowTime);
  2631. var e = null;
  2632. e = this.trainMoveEffectLists.length > 0 ? this.trainMoveEffectLists.shift() : new gc.MovieClip("special_train", 1, 13, 2, 0),
  2633. e.rotation = 0,
  2634. e.y = this.puzzleArray[this.trainTypeDU[0][0]][this.trainTypeDU[0][1]][1].y + 50,
  2635. e.x = this.puzzleArray[this.trainTypeDU[0][0]][this.trainTypeDU[0][1]][1].x,
  2636. e.anchor.set(.5, .5),
  2637. this.gameTopEffectContiner.addChild(e),
  2638. e.gotoAndPlay(1),
  2639. TweenMax.to(e, 6 * this.trainThrowTime, {
  2640. y: this.puzzleArray[this.trainTypeDU[this.trainTypeDU.length - 1][0]][this.trainTypeDU[this.trainTypeDU.length - 1][1]][1].y - 50,
  2641. onComplete: function (t) {
  2642. this.gameTopEffectContiner.removeChild(t),
  2643. t.gotoAndStop(1),
  2644. this.trainMoveEffectLists.push(t),
  2645. 0 == this.gameTopEffectContiner.children.length && (this.gameTopEffectContiner.removeChildren(),
  2646. this.gameShipEffectContiner.removeChildren(),
  2647. this.recoverTrainEffect(),
  2648. this.checkNextItemBlock())
  2649. }
  2650. .bind(this),
  2651. onCompleteParams: [e]
  2652. })
  2653. }
  2654. if (this.trainTypeLR.length > 0) {
  2655. this.trainThrowTime * this.trainTypeLR.length > t && (t = this.trainThrowTime * this.trainTypeLR.length);
  2656. var e = null;
  2657. e = this.trainMoveEffectLists.length > 0 ? this.trainMoveEffectLists.shift() : new gc.MovieClip("special_train", 1, 13, 2, 0),
  2658. e.anchor.set(.5, .5),
  2659. e.rotation = Math.PI / 3,
  2660. e.y = this.puzzleArray[this.trainTypeLR[0][0]][this.trainTypeLR[0][1]][1].y + 30,
  2661. e.x = this.puzzleArray[this.trainTypeLR[0][0]][this.trainTypeLR[0][1]][1].x - 50,
  2662. this.gameTopEffectContiner.addChild(e),
  2663. e.gotoAndPlay(1),
  2664. TweenMax.to(e, this.trainThrowTime * this.trainTypeLR.length, {
  2665. y: this.puzzleArray[this.trainTypeLR[this.trainTypeLR.length - 1][0]][this.trainTypeLR[this.trainTypeLR.length - 1][1]][1].y - 30,
  2666. x: this.puzzleArray[this.trainTypeLR[this.trainTypeLR.length - 1][0]][this.trainTypeLR[this.trainTypeLR.length - 1][1]][1].x + 50,
  2667. onComplete: function (t) {
  2668. this.gameTopEffectContiner.removeChild(t),
  2669. t.gotoAndStop(1),
  2670. this.trainMoveEffectLists.push(t),
  2671. 0 == this.gameTopEffectContiner.children.length && (this.gameTopEffectContiner.removeChildren(),
  2672. this.gameShipEffectContiner.removeChildren(),
  2673. this.recoverTrainEffect(),
  2674. this.checkNextItemBlock())
  2675. }
  2676. .bind(this),
  2677. onCompleteParams: [e]
  2678. })
  2679. }
  2680. if (this.trainTypeRL.length > 0) {
  2681. this.trainThrowTime * this.trainTypeRL.length > t && (t = this.trainThrowTime * this.trainTypeRL.length);
  2682. var e = null;
  2683. e = this.trainMoveEffectLists.length > 0 ? this.trainMoveEffectLists.shift() : new gc.MovieClip("special_train", 1, 13, 2, 0),
  2684. e.anchor.set(.5, .5),
  2685. e.rotation = 5 * Math.PI / 3,
  2686. e.y = this.puzzleArray[this.trainTypeRL[0][0]][this.trainTypeRL[0][1]][1].y - 30,
  2687. e.x = this.puzzleArray[this.trainTypeRL[0][0]][this.trainTypeRL[0][1]][1].x - 50,
  2688. this.gameTopEffectContiner.addChild(e),
  2689. e.gotoAndPlay(1),
  2690. TweenMax.from(e, this.trainThrowTime * this.trainTypeRL.length, {
  2691. y: this.puzzleArray[this.trainTypeRL[this.trainTypeRL.length - 1][0]][this.trainTypeRL[this.trainTypeRL.length - 1][1]][1].y + 30,
  2692. x: this.puzzleArray[this.trainTypeRL[this.trainTypeRL.length - 1][0]][this.trainTypeRL[this.trainTypeRL.length - 1][1]][1].x + 50,
  2693. onComplete: function (t) {
  2694. this.gameTopEffectContiner.removeChild(t),
  2695. t.gotoAndStop(1),
  2696. this.trainMoveEffectLists.push(t),
  2697. 0 == this.gameTopEffectContiner.children.length && (this.gameTopEffectContiner.removeChildren(),
  2698. this.gameShipEffectContiner.removeChildren(),
  2699. this.checkNextItemBlock())
  2700. }
  2701. .bind(this),
  2702. onCompleteParams: [e]
  2703. })
  2704. }
  2705. this.meansOfTransportAnimation(4, t)
  2706. } else
  2707. this.checkNextItemBlock()
  2708. }
  2709. ,
  2710. gc.GamePlayPage.prototype.trainBombCheckAni = function (t, e, i, a) {
  2711. if (0 > t || t > 5 || 0 > e || e > 6)
  2712. return this.trainCount++ ,
  2713. void (6 == this.trainCount && (this.trainCount = 0,
  2714. this.trainBombOverAnimation()));
  2715. 3 == a ? 1 == i ? this.trainTypeLR.unshift([t, e]) : this.trainTypeLR.push([t, e]) : 2 == a ? 1 == i ? this.trainTypeRL.push([t, e]) : this.trainTypeRL.unshift([t, e]) : 1 == i ? this.trainTypeDU.unshift([t, e]) : this.trainTypeDU.push([t, e]),
  2716. this.checkInDragArray([e, t]),
  2717. flag = this.checkPuzzleTypeAndBomb(t, e);
  2718. var s = null;
  2719. s = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
  2720. s.loop = !1,
  2721. s.animationSpeed = this.moveClipTime,
  2722. s.anchor.set(.5, .5),
  2723. s.x = this.puzzleArray[t][e][1].x,
  2724. s.y = this.puzzleArray[t][e][1].y,
  2725. this.gameEffectContiner.addChild(s),
  2726. s.gotoAndPlay(1),
  2727. TweenMax.delayedCall(this.shipAniTime, function (t, e, i, a, s) {
  2728. this.bombEffectArray.push(t),
  2729. this.gameEffectContiner.removeChild(t),
  2730. t.gotoAndStop(1),
  2731. this.effectCallBackLists.push(t);
  2732. var r = null;
  2733. r = this.trainEffectLists.length > 0 ? this.trainEffectLists.shift() : PIXI.Sprite.fromFrame("special_train_0001.png"),
  2734. r.anchor.set(.5, .5),
  2735. r.x = this.puzzleArray[e][i][1].x,
  2736. r.y = this.puzzleArray[e][i][1].y,
  2737. this.gameShipEffectContiner.addChild(r),
  2738. this.trainEffectSaveLists.push(r),
  2739. r.rotation = 0,
  2740. 3 == s ? r.rotation = Math.PI / 3 : 2 == s && (r.rotation = -Math.PI / 3),
  2741. TweenMax.delayedCall(this.shipAniTime, function (t, e, i, a) {
  2742. 1 == i ? 3 == a ? e % 2 == 0 ? this.trainBombCheckAni(t + 1, e - 1, i, a) : this.trainBombCheckAni(t, e - 1, i, a) : 2 == a ? e % 2 == 0 ? this.trainBombCheckAni(t + 1, e + 1, i, a) : this.trainBombCheckAni(t, e + 1, i, a) : this.trainBombCheckAni(t + 1, e, i, a) : 3 == a ? e % 2 == 0 ? this.trainBombCheckAni(t, e + 1, i, a) : this.trainBombCheckAni(t - 1, e + 1, i, a) : 2 == a ? e % 2 == 0 ? this.trainBombCheckAni(t, e - 1, i, a) : this.trainBombCheckAni(t - 1, e - 1, i, a) : this.trainBombCheckAni(t - 1, e, i, a)
  2743. }
  2744. .bind(this), [e, i, a, s])
  2745. }
  2746. .bind(this), [s, t, e, i, a])
  2747. }
  2748. ,
  2749. gc.GamePlayPage.prototype.trainBombCheckType1 = function (t, e) {
  2750. var i = PIXI.Sprite.fromFrame("special_train_0001.png");
  2751. i.anchor.set(.5, .5),
  2752. i.x = this.puzzleArray[t][e][1].x,
  2753. i.y = this.puzzleArray[t][e][1].y,
  2754. i.rotation = Math.PI / 3,
  2755. this.gameShipEffectContiner.addChild(i);
  2756. var i = PIXI.Sprite.fromFrame("special_train_0001.png");
  2757. i.anchor.set(.5, .5),
  2758. i.x = this.puzzleArray[t][e][1].x,
  2759. i.y = this.puzzleArray[t][e][1].y,
  2760. i.rotation = 2 * Math.PI / 3,
  2761. this.gameShipEffectContiner.addChild(i);
  2762. var i = PIXI.Sprite.fromFrame("special_train_0001.png");
  2763. i.anchor.set(.5, .5),
  2764. i.x = this.puzzleArray[t][e][1].x,
  2765. i.y = this.puzzleArray[t][e][1].y,
  2766. this.gameShipEffectContiner.addChild(i),
  2767. TweenMax.delayedCall(this.shipAniTime, function (t, e) {
  2768. var i = 0
  2769. , a = 0
  2770. , s = 0
  2771. , r = 0;
  2772. e % 2 == 0 ? (i = t + 1,
  2773. a = t) : (i = t,
  2774. a = t - 1),
  2775. s = e - 1,
  2776. r = e + 1,
  2777. this.trainBombCheckAni(i, s, 1, 3),
  2778. this.trainBombCheckAni(a, r, 2, 3),
  2779. e % 2 == 0 ? (i = t,
  2780. a = t + 1) : (i = t - 1,
  2781. a = t),
  2782. s = e - 1,
  2783. r = e + 1,
  2784. this.trainBombCheckAni(i, s, 2, 2),
  2785. this.trainBombCheckAni(a, r, 1, 2),
  2786. i = t - 1,
  2787. a = t + 1,
  2788. this.trainBombCheckAni(i, e, 2, 1),
  2789. this.trainBombCheckAni(a, e, 1, 1)
  2790. }
  2791. .bind(this), [t, e])
  2792. }
  2793. ,
  2794. gc.GamePlayPage.prototype.trainBombCheckType = function (t, e, i, a) {
  2795. var s = null;
  2796. s = this.trainEffectLists.length > 0 ? this.trainEffectLists.shift() : PIXI.Sprite.fromFrame("special_train_0001.png"),
  2797. s.anchor.set(.5, .5),
  2798. s.x = this.puzzleArray[t][e][1].x,
  2799. s.y = this.puzzleArray[t][e][1].y,
  2800. s.rotation = 0,
  2801. 3 == a ? s.rotation = Math.PI / 3 : 2 == a && (s.rotation = 2 * Math.PI / 3),
  2802. this.gameShipEffectContiner.addChild(s),
  2803. this.trainEffectSaveLists.push(s),
  2804. TweenMax.delayedCall(this.shipAniTime, function (t, e, i, s) {
  2805. if (3 == a) {
  2806. var r = 0
  2807. , n = 0
  2808. , o = 0
  2809. , h = 0;
  2810. e % 2 == 0 ? (r = t + 1,
  2811. n = t) : (r = t,
  2812. n = t - 1),
  2813. o = e - 1,
  2814. h = e + 1,
  2815. this.trainBombCheckAni(r, o, 1, a),
  2816. this.trainBombCheckAni(n, h, 2, a)
  2817. } else if (2 == a) {
  2818. var r = 0
  2819. , n = 0
  2820. , o = 0
  2821. , h = 0;
  2822. e % 2 == 0 ? (r = t,
  2823. n = t + 1) : (r = t - 1,
  2824. n = t),
  2825. o = e - 1,
  2826. h = e + 1,
  2827. this.trainBombCheckAni(r, o, 2, a),
  2828. this.trainBombCheckAni(n, h, 1, a)
  2829. } else {
  2830. var r = 0
  2831. , n = 0;
  2832. r = t - 1,
  2833. n = t + 1,
  2834. this.trainBombCheckAni(r, e, 2, a),
  2835. this.trainBombCheckAni(n, e, 1, a)
  2836. }
  2837. }
  2838. .bind(this), [t, e, i, a])
  2839. }
  2840. ,
  2841. gc.GamePlayPage.prototype.trainBomb = function (t) {
  2842. var e = Math.floor(100 * Math.random()) % 3
  2843. , i = t[1]
  2844. , a = t[0];
  2845. this.puzzleArray[i][a][0] = 0,
  2846. this.puzzleArray[i][a][1].alpha = 0,
  2847. this.trainTypeDU = [],
  2848. this.trainTypeLR = [],
  2849. this.trainTypeRL = [],
  2850. this.trainCount = 4,
  2851. e = 1,
  2852. 1 == e ? this.trainTypeDU.push([i, a]) : 2 == e ? this.trainTypeRL.push([i, a]) : this.trainTypeLR.push([i, a]);
  2853. var s = null;
  2854. s = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
  2855. s.loop = !1,
  2856. s.animationSpeed = this.moveClipTime,
  2857. s.anchor.set(.5, .5),
  2858. s.x = this.puzzleArray[i][a][1].x,
  2859. s.y = this.puzzleArray[i][a][1].y,
  2860. this.gameEffectContiner.addChild(s),
  2861. s.gotoAndPlay(1),
  2862. TweenMax.delayedCall(this.shipAniTime, function (t, e, i, a) {
  2863. this.bombEffectArray.push(t),
  2864. this.gameEffectContiner.removeChild(t),
  2865. t.gotoAndStop(1),
  2866. this.effectCallBackLists.push(t),
  2867. this.trainBombCheckType(e, i, 0, a)
  2868. }
  2869. .bind(this), [s, i, a, e])
  2870. }
  2871. ,
  2872. gc.GamePlayPage.prototype.strongTrainBomb = function (t) {
  2873. var e = t[1]
  2874. , i = t[0];
  2875. this.puzzleArray[e][i][0] = 0,
  2876. this.puzzleArray[e][i][1].alpha = 0,
  2877. this.trainTypeDU = [],
  2878. this.trainTypeLR = [],
  2879. this.trainTypeRL = [],
  2880. this.trainTypeDU.push([e, i]),
  2881. this.trainTypeLR.push([e, i]),
  2882. this.trainTypeRL.push([e, i]);
  2883. var a = null;
  2884. a = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
  2885. a.loop = !1,
  2886. a.animationSpeed = this.moveClipTime,
  2887. a.anchor.set(.5, .5),
  2888. a.x = this.puzzleArray[e][i][1].x,
  2889. a.y = this.puzzleArray[e][i][1].y,
  2890. this.gameEffectContiner.addChild(a),
  2891. a.gotoAndPlay(1),
  2892. TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
  2893. this.bombEffectArray.push(t),
  2894. this.gameEffectContiner.removeChild(t),
  2895. t.gotoAndStop(1),
  2896. this.effectCallBackLists.push(t),
  2897. this.trainBombCheckType1(e, i)
  2898. }
  2899. .bind(this), [a, e, i])
  2900. }
  2901. ,
  2902. gc.GamePlayPage.prototype.singleShipMoveAnimation = function (t, e) {
  2903. e % 2 == 0 ? t.rotation = 2 * Math.PI / 3 : t.rotation = Math.PI / 3,
  2904. 7 > e ? TweenMax.to(t, this.shipThrowTime, {
  2905. x: this.puzzleArray[this.shipStartX][e][1].x,
  2906. y: this.puzzleArray[this.shipStartX][e][1].y,
  2907. onComplete: function (t, e) {
  2908. this.singleShipMoveAnimation(t, e)
  2909. }
  2910. .bind(this),
  2911. onCompleteParams: [t, e + 1],
  2912. ease: Linear.easeNone
  2913. }) : TweenMax.to(t, this.shipThrowTime, {
  2914. x: this.puzzleArray[this.shipStartX][6][1].x + 50,
  2915. y: this.puzzleArray[this.shipStartX][6][1].y - 50,
  2916. onComplete: function (t) {
  2917. this.gameTopEffectContiner.removeChildren(),
  2918. this.gameShipEffectContiner.removeChildren(),
  2919. t.gotoAndStop(1),
  2920. this.shipMoveEffectLists.push(t),
  2921. this.recoverShipEffect(),
  2922. this.checkNextItemBlock()
  2923. }
  2924. .bind(this),
  2925. onCompleteParams: [t],
  2926. ease: Linear.easeNone
  2927. })
  2928. }
  2929. ,
  2930. gc.GamePlayPage.prototype.shipOverBombAnimation = function (t) {
  2931. this.meansOfTransportAnimation(3, 8 * this.shipThrowTime);
  2932. var e = null;
  2933. 0 == t ? (e = this.shipMoveEffectLists.length > 0 ? this.shipMoveEffectLists.shift() : new gc.MovieClip("special_boat", 1, 2, .5, 10),
  2934. e.anchor.set(.5, .5),
  2935. e.x = this.puzzleArray[this.shipStartX][0][1].x - 50,
  2936. e.y = this.puzzleArray[this.shipStartX][0][1].y + 50,
  2937. e.scale.set(1),
  2938. e.rotation = Math.PI / 3,
  2939. this.gameTopEffectContiner.addChild(e),
  2940. e.gotoAndPlay(1),
  2941. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_boattrans"),
  2942. TweenMax.to(e, this.shipThrowTime, {
  2943. x: this.puzzleArray[this.shipStartX][0][1].x,
  2944. y: this.puzzleArray[this.shipStartX][0][1].y,
  2945. onComplete: function (t, e) {
  2946. this.singleShipMoveAnimation(t, e)
  2947. }
  2948. .bind(this),
  2949. onCompleteParams: [e, 1]
  2950. })) : (e = this.shipMoveEffectLists.length > 0 ? this.shipMoveEffectLists.shift() : new gc.MovieClip("special_boat", 1, 2, .5, 10),
  2951. e.anchor.set(.5, .5),
  2952. e.x = this.puzzleArray[this.shipStartX][0][1].x - 100,
  2953. e.y = this.puzzleArray[this.shipStartX][0][1].y - 50,
  2954. e.rotation = Math.PI / 2,
  2955. e.scale.x = 2,
  2956. e.scale.y = 2,
  2957. this.gameTopEffectContiner.addChild(e),
  2958. e.gotoAndPlay(1),
  2959. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_boattrans"),
  2960. TweenMax.to(e, 8 * this.shipThrowTime, {
  2961. x: this.puzzleArray[this.shipStartX][6][1].x + 100,
  2962. onComplete: function (t) {
  2963. this.gameTopEffectContiner.removeChildren(),
  2964. this.gameShipEffectContiner.removeChildren(),
  2965. t.gotoAndStop(1),
  2966. this.shipMoveEffectLists.push(t),
  2967. this.recoverShipEffect(),
  2968. this.checkNextItemBlock()
  2969. }
  2970. .bind(this),
  2971. onCompleteParams: [e]
  2972. }))
  2973. }
  2974. ,
  2975. gc.GamePlayPage.prototype.recoverShipEffect = function () {
  2976. var t = null;
  2977. try {
  2978. for (var e = this.shipEffectSaveLists.length - 1; e >= 0; e--)
  2979. t = this.shipEffectSaveLists.splice(e, 1),
  2980. t.gotoAndStop(1),
  2981. this.shipEffectLists.push(t);
  2982. this.shipEffectSaveLists = []
  2983. } catch (i) { }
  2984. }
  2985. ,
  2986. gc.GamePlayPage.prototype.shipBombCheckAni = function (t, e, i, a) {
  2987. if (0 > t || t > 5 || 0 > e || e > 6)
  2988. return void (0 == a ? (this.singleShipCount++ ,
  2989. 2 == this.singleShipCount && (this.singleShipCount = 0,
  2990. this.shipOverBombAnimation(0))) : (this.singleShipCount++ ,
  2991. 6 == this.singleShipCount && (this.singleShipCount = 0,
  2992. this.shipOverBombAnimation(1))));
  2993. this.checkInDragArray([e, t]);
  2994. var s;
  2995. s = this.checkPuzzleTypeAndBomb(t, e);
  2996. var r = null;
  2997. r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
  2998. r.loop = !1,
  2999. r.animationSpeed = this.moveClipTime,
  3000. r.anchor.set(.5, .5),
  3001. r.x = this.puzzleArray[t][e][1].x,
  3002. r.y = this.puzzleArray[t][e][1].y,
  3003. this.gameEffectContiner.addChild(r),
  3004. r.gotoAndPlay(1);
  3005. var n = null;
  3006. 1 == i ? TweenMax.delayedCall(this.shipBombBtweenTime, function (t, e, i, a) {
  3007. this.bombEffectArray.push(t),
  3008. this.gameEffectContiner.removeChild(t),
  3009. t.gotoAndStop(1),
  3010. this.effectCallBackLists.push(t),
  3011. n = this.shipEffectLists.length > 0 ? this.shipEffectLists.shift() : new gc.MovieClip("special_boat_000", 1, 5, this.shipClipTime, 1),
  3012. n.loop = !1,
  3013. n.anchor.set(.5, .5),
  3014. n.x = this.puzzleArray[e][i][1].x,
  3015. n.y = this.puzzleArray[e][i][1].y,
  3016. n.scale.x = -1,
  3017. this.gameShipEffectContiner.addChild(n),
  3018. this.shipEffectSaveLists.push(n),
  3019. n.gotoAndPlay(1),
  3020. TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
  3021. this.shipBombCheckAni(t, e - 1, 1, i)
  3022. }
  3023. .bind(this), [e, i, a])
  3024. }
  3025. .bind(this), [r, t, e, a]) : 2 == i && TweenMax.delayedCall(this.shipBombBtweenTime, function (t, e, i, a) {
  3026. this.bombEffectArray.push(t),
  3027. this.gameEffectContiner.removeChild(t),
  3028. t.gotoAndStop(1),
  3029. this.effectCallBackLists.push(t),
  3030. n = this.shipEffectLists.length > 0 ? this.shipEffectLists.shift() : new gc.MovieClip("special_boat_000", 1, 5, this.shipClipTime, 1),
  3031. n.loop = !1,
  3032. n.anchor.set(.5, .5),
  3033. n.x = this.puzzleArray[e][i][1].x,
  3034. n.y = this.puzzleArray[e][i][1].y,
  3035. n.scale.x = 1,
  3036. this.gameShipEffectContiner.addChild(n),
  3037. this.shipEffectSaveLists.push(n),
  3038. n.gotoAndPlay(1),
  3039. TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
  3040. this.shipBombCheckAni(t, e + 1, 2, i)
  3041. }
  3042. .bind(this), [e, i, a])
  3043. }
  3044. .bind(this), [r, t, e, a])
  3045. }
  3046. ,
  3047. gc.GamePlayPage.prototype.shipBombCheckType = function (t, e, i) {
  3048. var a = null;
  3049. a = this.shipPointEffectLists.length > 0 ? this.shipPointEffectLists.shift() : PIXI.Sprite.fromFrame("special_boat_0005.png"),
  3050. a.anchor.set(.5, .5),
  3051. a.x = this.puzzleArray[t][e][1].x,
  3052. a.y = this.puzzleArray[t][e][1].y,
  3053. this.gameShipEffectContiner.addChild(a),
  3054. TweenMax.delayedCall(this.shipAniTime, function (t, e, a) {
  3055. this.shipPointEffectLists.push(a),
  3056. this.shipBombCheckAni(t, e - 1, 1, i),
  3057. this.shipBombCheckAni(t, e + 1, 2, i)
  3058. }
  3059. .bind(this), [t, e, a, i])
  3060. }
  3061. ,
  3062. gc.GamePlayPage.prototype.shipBomb = function (t) {
  3063. var e = t[1]
  3064. , i = t[0];
  3065. this.puzzleArray[e][i][0] = 0,
  3066. this.puzzleArray[e][i][1].alpha = 0,
  3067. this.shipStartX = e;
  3068. var a = null;
  3069. a = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
  3070. a.loop = !1,
  3071. a.animationSpeed = this.moveClipTime,
  3072. a.anchor.set(.5, .5),
  3073. a.x = this.puzzleArray[e][i][1].x,
  3074. a.y = this.puzzleArray[e][i][1].y,
  3075. this.gameEffectContiner.addChild(a),
  3076. a.gotoAndPlay(1),
  3077. TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
  3078. this.bombEffectArray.push(t),
  3079. this.gameEffectContiner.removeChild(t),
  3080. t.gotoAndStop(1),
  3081. this.effectCallBackLists.push(t),
  3082. this.shipBombCheckType(e, i, 0)
  3083. }
  3084. .bind(this), [a, e, i])
  3085. }
  3086. ,
  3087. gc.GamePlayPage.prototype.strongShipBomb = function (t) {
  3088. var e = t[1]
  3089. , i = t[0];
  3090. this.shipStartX = e;
  3091. for (var a = e - 1; e + 1 >= a; a++)
  3092. if (6 > a && a >= 0) {
  3093. this.checkInDragArray([i, a]);
  3094. var s = !1;
  3095. this.shipStartX != a && (s = this.checkPuzzleTypeAndBomb(a, i)),
  3096. s || this.puzzleArray[a][i][0] < 15 && (this.puzzleArray[a][i][0] = 0,
  3097. this.puzzleArray[a][i][1].alpha = 0);
  3098. var r = null;
  3099. r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
  3100. r.loop = !1,
  3101. r.animationSpeed = this.moveClipTime,
  3102. r.anchor.set(.5, .5),
  3103. r.x = this.puzzleArray[a][i][1].x,
  3104. r.y = this.puzzleArray[a][i][1].y,
  3105. s && (r.alpha = 0),
  3106. this.gameEffectContiner.addChild(r),
  3107. r.gotoAndPlay(1),
  3108. TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
  3109. this.bombEffectArray.push(t),
  3110. this.gameEffectContiner.removeChild(t),
  3111. t.alpha = 1,
  3112. t.gotoAndStop(1),
  3113. this.effectCallBackLists.push(t),
  3114. this.shipBombCheckType(e, i, 1)
  3115. }
  3116. .bind(this), [r, a, i])
  3117. } else
  3118. this.singleShipCount += 2
  3119. }
  3120. ,
  3121. gc.GamePlayPage.prototype.itemSelectedAnimation = function (t, e) {
  3122. null != this.puzzleArray[t][e][3] && this.puzzleArray[t][e][3].kill(!0),
  3123. this.puzzleArray[t][e][3] = TweenMax.to(this.puzzleArray[t][e][1].scale, .5, {
  3124. repeat: -1,
  3125. yoyo: !0,
  3126. x: .8,
  3127. y: .8,
  3128. onComplete: function (i, a) {
  3129. this.puzzleArray[t][e][1].scale.x = 1,
  3130. this.puzzleArray[t][e][1].scale.y = 1
  3131. }
  3132. .bind(this),
  3133. onCompleteParams: [t, e]
  3134. })
  3135. }
  3136. ,
  3137. gc.GamePlayPage.prototype.checkPuzzleTypeAndBomb = function (t, e) {
  3138. var i = !1;
  3139. this.puzzleArray[t][e][0];
  3140. if (this.puzzleArray[t][e][0] > 5 && this.puzzleArray[t][e][0] < 14) {
  3141. for (var a = !1, s = 0; s < this.itemSelectedArray.length; s++)
  3142. if (this.itemSelectedArray[s] == this.puzzleArray[t][e][1]) {
  3143. a = !0;
  3144. break
  3145. }
  3146. a || (this.itemSelectedArray.push(this.puzzleArray[t][e][1]),
  3147. this.itemSelectedAnimation(t, e)),
  3148. i = !0
  3149. } else
  3150. this.puzzleArray[t][e][0] > 14 ? (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_block"),
  3151. this.puzzleArray[t][e][0] > 17 ? (this.totalScore += 500,
  3152. this.showScoreEffect(500, [e, t]),
  3153. this.stoneItemAni(t, e),
  3154. this.puzzleArray[t][e][0] = 17,
  3155. this.puzzleArray[t][e][1].texture = new PIXI.Texture.fromFrame("block_00017.png"),
  3156. this.stonLevelClearCount++) : this.puzzleArray[t][e][0] > 16 ? (this.totalScore += 400,
  3157. this.showScoreEffect(400, [e, t]),
  3158. this.stoneItemAni(t, e),
  3159. this.puzzleArray[t][e][0] = 16,
  3160. this.puzzleArray[t][e][1].texture = new PIXI.Texture.fromFrame("block_00016.png"),
  3161. this.stonLevelClearCount++) : this.puzzleArray[t][e][0] > 15 ? (this.totalScore += 550,
  3162. this.showScoreEffect(550, [e, t]),
  3163. this.stoneItemAni(t, e),
  3164. this.puzzleArray[t][e][0] = 15,
  3165. this.puzzleArray[t][e][1].texture = new PIXI.Texture.fromFrame("block_00015.png"),
  3166. this.stonLevelClearCount++) : (this.stageStoneBlockNum-- ,
  3167. this.puzzleArray[t][e][0] = 0,
  3168. this.puzzleArray[t][e][1].alpha = 0,
  3169. this.totalScore += 330,
  3170. this.showScoreEffect(330, [e, t]),
  3171. this.stonLevelClearCount++)) : (this.itemSelectedFun(this.puzzleArray[t][e][0], [e, t]),
  3172. this.puzzleArray[t][e][0] = 0,
  3173. this.puzzleArray[t][e][1].alpha = 0);
  3174. return i
  3175. }
  3176. ,
  3177. gc.GamePlayPage.prototype.checkPlaneBomb = function (t, e) {
  3178. var i = !1;
  3179. if (!(0 > t || t > 5 || 0 > e || e > 6 || 0 == this.puzzleArray[t][e][0] || (this.checkInDragArray([e, t]),
  3180. i = this.checkPuzzleTypeAndBomb(t, e)))) {
  3181. var a = null;
  3182. a = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
  3183. a.loop = !1,
  3184. a.animationSpeed = this.moveClipTime,
  3185. a.anchor.set(.5, .5),
  3186. a.x = this.puzzleArray[t][e][1].x,
  3187. a.y = this.puzzleArray[t][e][1].y,
  3188. this.gameEffectContiner.addChild(a),
  3189. a.gotoAndPlay(1),
  3190. TweenMax.delayedCall(this.planeBombTime, function (t) {
  3191. this.bombEffectArray.push(t),
  3192. this.gameEffectContiner.removeChild(t),
  3193. t.gotoAndStop(1),
  3194. this.effectCallBackLists.push(t),
  3195. this.gameEffectContiner.children.length <= 0 && this.checkNextItemBlock()
  3196. }
  3197. .bind(this), [a])
  3198. }
  3199. }
  3200. ,
  3201. gc.GamePlayPage.prototype.planeBombAnimation = function (t, e, i) {
  3202. for (var a = 0; a < t.length; a++) {
  3203. var s = null;
  3204. s = this.planEffectLists.length > 0 ? this.planEffectLists.shift() : PIXI.Sprite.fromFrame("special_airplane.png"),
  3205. s.anchor.set(.5, .25),
  3206. s.x = this.puzzleArray[e][i][1].x,
  3207. s.y = this.puzzleArray[e][i][1].y;
  3208. var r = Math.abs(Math.pow(this.puzzleArray[e][i][1].x - this.puzzleArray[t[a][0]][t[a][1]][1].x, 2) + Math.pow(this.puzzleArray[e][i][1].y - this.puzzleArray[t[a][0]][t[a][1]][1].y, 2));
  3209. r = Math.sqrt(r);
  3210. var n = Math.abs(this.puzzleArray[e][i][1].x - this.puzzleArray[t[a][0]][t[a][1]][1].x)
  3211. , o = Math.acos(n / r);
  3212. this.puzzleArray[e][i][1].x >= this.puzzleArray[t[a][0]][t[a][1]][1].x && this.puzzleArray[e][i][1].y >= this.puzzleArray[t[a][0]][t[a][1]][1].y ? s.rotation = 3 * Math.PI / 2 + o : this.puzzleArray[e][i][1].x >= this.puzzleArray[t[a][0]][t[a][1]][1].x && this.puzzleArray[e][i][1].y <= this.puzzleArray[t[a][0]][t[a][1]][1].y ? s.rotation = 3 * Math.PI / 2 - o : this.puzzleArray[e][i][1].x <= this.puzzleArray[t[a][0]][t[a][1]][1].x && this.puzzleArray[e][i][1].y >= this.puzzleArray[t[a][0]][t[a][1]][1].y ? s.rotation = Math.PI / 2 - o : s.rotation = Math.PI / 2 + o,
  3213. this.gameEffectContiner.addChild(s),
  3214. TweenMax.to(s, .8, {
  3215. x: this.puzzleArray[t[a][0]][t[a][1]][1].x,
  3216. y: this.puzzleArray[t[a][0]][t[a][1]][1].y,
  3217. onComplete: function (t, e) {
  3218. if (this.gameEffectContiner.removeChild(t),
  3219. this.planEffectLists.push(t),
  3220. 0 == this.gameEffectContiner.children.length)
  3221. for (var i = 0; i < e.length; i++)
  3222. this.checkPlaneBomb(e[i][0], e[i][1]);
  3223. }
  3224. .bind(this),
  3225. onCompleteParams: [s, t]
  3226. })
  3227. }
  3228. }
  3229. ,
  3230. gc.GamePlayPage.prototype.planeBomb = function (t) {
  3231. var e = t[1]
  3232. , i = t[0];
  3233. this.puzzleArray[e][i][0] = 0,
  3234. this.puzzleArray[e][i][1].alpha = 0;
  3235. var a = []
  3236. , s = []
  3237. , r = []
  3238. , n = 0
  3239. , o = 1;
  3240. 0 != this.copyDrageArray.length && (o = this.copyDrageArray[0][0]);
  3241. for (var h = 0; 6 > h; h++)
  3242. for (var l = 0; 7 > l; l++)
  3243. this.puzzleArray[h][l][0] > 14 ? (n++ ,
  3244. a.unshift([h, l])) : this.puzzleArray[h][l][0] > 0 && r.push([h, l]);
  3245. for (var h = 0; 5 > h && !(a.length <= 0); h++)
  3246. if (n > 0) {
  3247. n--;
  3248. var p = a.shift();
  3249. s.push([p[0], p[1]])
  3250. } else {
  3251. var u = Math.floor(100 * Math.random()) % a.length
  3252. , c = a.splice(u, 1);
  3253. s.push([c[0][0], c[0][1]])
  3254. }
  3255. if (s.length < 5)
  3256. for (var g = s.length, h = 0; 5 - g > h; h++) {
  3257. var u = Math.floor(100 * Math.random()) % r.length
  3258. , c = r.splice(u, 1);
  3259. s.push([c[0][0], c[0][1]])
  3260. }
  3261. this.planeBombAnimation(s, e, i)
  3262. }
  3263. ,
  3264. gc.GamePlayPage.prototype.strongPlaneBomb = function (t) {
  3265. var e = t[1]
  3266. , i = t[0];
  3267. this.puzzleArray[e][i][0] = 0,
  3268. this.puzzleArray[e][i][1].alpha = 0;
  3269. for (var a = !1, s = [], r = [], n = [], o = [], h = [], l = [], p = [], u = [], c = 0; 6 > c; c++)
  3270. for (var g = 0; 7 > g; g++)
  3271. this.puzzleArray[c][g][0] > 14 && u.unshift([c, g]);
  3272. for (var c = 0; c < u.length; c++) {
  3273. var d = u[c];
  3274. p.push([d[0], d[1]])
  3275. }
  3276. for (var c = 0; 6 > c; c++)
  3277. for (var g = 0; 7 > g; g++)
  3278. 1 == this.puzzleArray[c][g][0] ? r.push([c, g]) : 2 == this.puzzleArray[c][g][0] ? n.push([c, g]) : 3 == this.puzzleArray[c][g][0] ? o.push([c, g]) : 4 == this.puzzleArray[c][g][0] ? h.push([c, g]) : 5 == this.puzzleArray[c][g][0] && l.push([c, g]);
  3279. if (s.push(r),
  3280. s.push(n),
  3281. s.push(o),
  3282. s.push(h),
  3283. s.push(l),
  3284. a = !1)
  3285. for (var d = s.splice(this.copyDrageArray[0][0] - 1, 1), c = 0; c < d[0].length; c++)
  3286. p.push([d[0][c][0], d[0][c][1]]);
  3287. else {
  3288. var m = 0
  3289. , f = [];
  3290. r.length > m && (m = r.length,
  3291. f = r),
  3292. n.length > m && (m = n.length,
  3293. f = [],
  3294. f = n),
  3295. o.length > m && (m = o.length,
  3296. f = [],
  3297. f = o),
  3298. h.length > m && (m = h.length,
  3299. f = [],
  3300. f = h),
  3301. l.length > m && (m = l.length,
  3302. f = [],
  3303. f = l);
  3304. for (var c = 0; c < f.length; c++)
  3305. p.push([f[c][0], f[c][1]])
  3306. }
  3307. this.planeBombAnimation(p, e, i)
  3308. }
  3309. ,
  3310. gc.GamePlayPage.prototype.checkNextItemBlock = function () {
  3311. 0 == this.itemSelectedArray.length ? (this.resetScale(),
  3312. this.scoreNumberText.valueTween(this.totalScore),
  3313. this.gameMergeAniContiner.removeChildren(),
  3314. this.changeBuildingMoveTime(0),
  3315. this.buildingMoveBlockNum = 0,
  3316. this.reDarwPuzzle()) : (this.scoreNumberText.valueTween(this.totalScore),
  3317. this.newReDarwPuzzle())
  3318. }
  3319. ,
  3320. gc.GamePlayPage.prototype.newCheckNextItemBlock = function () {
  3321. if (this.itemSelectedArray.length > 0) {
  3322. this.guiedTime = (new Date).getTime(),
  3323. this.test.inGuied = !0;
  3324. var t = this.itemSelectedArray.shift()
  3325. , e = this.getTouchPosition(t)
  3326. , i = e[1]
  3327. , a = e[0];
  3328. try {
  3329. this.puzzleArray[i][a][3].kill()
  3330. } catch (s) { }
  3331. this.resetScale(),
  3332. this.itemSelectedFun(this.puzzleArray[i][a][0], [a, i])
  3333. }
  3334. }
  3335. ,
  3336. gc.GamePlayPage.prototype.resetScale = function () {
  3337. for (var t = 0; 6 > t; t++)
  3338. for (var e = 0; 7 > e; e++)
  3339. this.puzzleArray[t][e][1].scale.x = 1,
  3340. this.puzzleArray[t][e][1].scale.y = 1
  3341. }
  3342. ,
  3343. gc.GamePlayPage.prototype.puzzleMergeAnimation = function () {
  3344. if (0 == this.mergeDragedArray.length) {
  3345. this.scoreNumberText.valueTween(this.totalScore);
  3346. for (var t = 0; t < this.gameMergeAniContiner.children.length; t++)
  3347. this.blockCallBackLists.push(this.gameMergeAniContiner.getChildAt(t));
  3348. return this.gameMergeAniContiner.removeChildren(),
  3349. this.changeBuildingMoveTime(0),
  3350. this.buildingMoveBlockNum = 0,
  3351. this.drawDragItem(),
  3352. void this.reDarwPuzzle()
  3353. }
  3354. var e = this.mergeDragedArray.shift()
  3355. , i = e[0];
  3356. i.texture = PIXI.Texture.fromFrame("puzzle_effect_combine.png");
  3357. var a = e[1]
  3358. , s = this.getTouchPosition(i);
  3359. if (this.puzzleArray[s[1]][s[0]][0] = 0,
  3360. this.puzzleArray[s[1]][s[0]][1].alpha = 0,
  3361. 6 > a ? gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle_mix") : gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_sp_puzzle_mix"),
  3362. this.mergeDragedArray.length > 0) {
  3363. var r = null;
  3364. a > 5 && 14 > a ? this.mergePuzzleTween = TweenMax.to(i, .1, {
  3365. x: this.mergeDragedArray[0][0].x,
  3366. y: this.mergeDragedArray[0][0].y,
  3367. onComplete: function (t, e) {
  3368. r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, 1.5, 0),
  3369. r.loop = !1,
  3370. r.anchor.set(.5, .5),
  3371. r.x = t,
  3372. r.y = e,
  3373. this.gameMergeAniContiner.addChild(r),
  3374. r.gotoAndPlay(1),
  3375. this.itemSelectedFun(a, s),
  3376. TweenMax.delayedCall(.3, function (t) {
  3377. this.gameMergeAniContiner.removeChild(t),
  3378. t.gotoAndStop(1),
  3379. this.effectCallBackLists.push(t)
  3380. }
  3381. .bind(this), [r]),
  3382. i.alpha = 0
  3383. }
  3384. .bind(this),
  3385. onCompleteParams: [this.mergeDragedArray[0][0].x, this.mergeDragedArray[0][0].y]
  3386. }) : this.mergePuzzleTween = TweenMax.to(i, .1, {
  3387. x: this.mergeDragedArray[0][0].x,
  3388. y: this.mergeDragedArray[0][0].y,
  3389. onComplete: function (t, e) {
  3390. r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, 1.5, 0),
  3391. r.loop = !1,
  3392. r.anchor.set(.5, .5),
  3393. r.x = t,
  3394. r.y = e,
  3395. this.gameMergeAniContiner.addChild(r),
  3396. r.gotoAndPlay(1),
  3397. TweenMax.delayedCall(.3, function (t) {
  3398. this.gameMergeAniContiner.removeChild(t),
  3399. t.gotoAndStop(1),
  3400. this.effectCallBackLists.push(t)
  3401. }
  3402. .bind(this), [r]),
  3403. this.itemSelectedFun(a, s),
  3404. this.puzzleMergeAnimation(),
  3405. i.alpha = 0
  3406. }
  3407. .bind(this),
  3408. onCompleteParams: [this.mergeDragedArray[0][0].x, this.mergeDragedArray[0][0].y]
  3409. })
  3410. } else {
  3411. if (this.totalClearBlockNum++ ,
  3412. a > 5 && 14 > a)
  3413. this.itemSelectedFun(a, s),
  3414. i.alpha = 0;
  3415. else {
  3416. if (14 == a) {
  3417. if (console.log(22222222222),
  3418. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvplus"),
  3419. this.turnCount++ ,
  3420. this.turnCount > 5)
  3421. try {
  3422. this.moveNumber.fileName = "ui_move1_",
  3423. this.moveLineContainer.removeChildren(),
  3424. this.move5CountPopup.flag = flag
  3425. } catch (n) { }
  3426. this.totalScore += 300,
  3427. this.showScoreEffect(300, s),
  3428. this.timeAddAnimation(s[1], s[0], 1)
  3429. } else
  3430. this.totalScore += 100,
  3431. this.showScoreEffect(100, s);
  3432. this.changeBuildingMoveTime(0),
  3433. this.buildingMoveBlockNum = 0,
  3434. this.gameMergeAniContiner.removeChildren(),
  3435. this.drawDragItem(),
  3436. this.reDarwPuzzle()
  3437. }
  3438. this.scoreNumberText.valueTween(this.totalScore)
  3439. }
  3440. }
  3441. ,
  3442. gc.GamePlayPage.prototype.showTurnPlusAnimation = function (t, e, i) {
  3443. if (this.turnCount += i,
  3444. this.turnCount > 5)
  3445. try {
  3446. this.moveNumber.fileName = "ui_move1_",
  3447. this.moveLineContainer.removeChildren(),
  3448. this.move5CountPopup.flag = flag
  3449. } catch (a) { }
  3450. this.totalScore += 300 * i,
  3451. this.timeAddAnimation(t, e, i)
  3452. }
  3453. ,
  3454. gc.GamePlayPage.prototype.getTouchPosition = function (t) {
  3455. var e = (t.x - this.puzzleStartX + 50) / this.pXp;
  3456. e = Math.floor(e);
  3457. var i = 0;
  3458. i = e % 2 == 0 ? (t.y - this.sPuzzleStartY + 50) / this.pYp : (t.y - this.dPuzzleStartY + 50) / this.pYp,
  3459. i = Math.floor(i);
  3460. var a = [];
  3461. return a.push(e),
  3462. a.push(i),
  3463. a
  3464. }
  3465. ,
  3466. gc.GamePlayPage.prototype.initPuzzle = function () {
  3467. this.puzzleArray = [];
  3468. for (var t = 0; t < this.puzzleYSIZE; t++) {
  3469. for (var e = [], i = 0; i < this.puzzleXSIZE; i++) {
  3470. var a = []
  3471. , s = Math.floor(100 * Math.random()) % 5 + 1;
  3472. 0 == s && (s = 1);
  3473. var r = null;
  3474. r = s > 5 ? PIXI.Sprite.fromFrame("block_000" + s + ".png") : PIXI.Sprite.fromFrame(this.blockNameArray[this.stageNum] + s + ".png"),
  3475. i % 2 == 0 ? r.y = this.sPuzzleStartY + t * this.pYp : r.y = this.dPuzzleStartY + t * this.pYp,
  3476. r.x = this.puzzleStartX + i * this.pXp,
  3477. r.anchor.set(.5, .5),
  3478. this.gameBaceContiner.addChild(r),
  3479. a.push(s),
  3480. a.push(r),
  3481. a.push(0);
  3482. var n = null;
  3483. a.push(n),
  3484. e.push(a)
  3485. }
  3486. this.puzzleArray.push(e)
  3487. }
  3488. }
  3489. ,
  3490. gc.GamePlayPage.prototype.checkDragPuzzle = function () {
  3491. for (var t = 0; 6 > t; t++)
  3492. for (var e = 0; 7 > e; e++) {
  3493. var i = this.puzzleArray[t][e][0];
  3494. if (!(i > 14)) {
  3495. if (i > 5 && 14 > i)
  3496. return !0;
  3497. if (14 == i) {
  3498. var a = []
  3499. , s = []
  3500. , r = []
  3501. , n = []
  3502. , o = []
  3503. , h = [];
  3504. if (t - 1 >= 0 && (1 == this.puzzleArray[t - 1][e][0] ? a.push([t - 1, e]) : 2 == this.puzzleArray[t - 1][e][0] ? s.push([t - 1, e]) : 3 == this.puzzleArray[t - 1][e][0] ? r.push([t - 1, e]) : 4 == this.puzzleArray[t - 1][e][0] ? n.push([t - 1, e]) : 5 == this.puzzleArray[t - 1][e][0] ? o.push([t - 1, e]) : 14 == this.puzzleArray[t - 1][e][0] && h.push([t - 1, e])),
  3505. 5 >= t + 1 && (1 == this.puzzleArray[t + 1][e][0] ? a.push([t + 1, e]) : 2 == this.puzzleArray[t + 1][e][0] ? s.push([t + 1, e]) : 3 == this.puzzleArray[t + 1][e][0] ? r.push([t + 1, e]) : 4 == this.puzzleArray[t + 1][e][0] ? n.push([t + 1, e]) : 5 == this.puzzleArray[t + 1][e][0] ? o.push([t + 1, e]) : 14 == this.puzzleArray[t + 1][e][0] && h.push([t + 1, e])),
  3506. e - 1 >= 0 && (1 == this.puzzleArray[t][e - 1][0] ? a.push([t, e - 1]) : 2 == this.puzzleArray[t][e - 1][0] ? s.push([t, e - 1]) : 3 == this.puzzleArray[t][e - 1][0] ? r.push([t, e - 1]) : 4 == this.puzzleArray[t][e - 1][0] ? n.push([t, e - 1]) : 5 == this.puzzleArray[t][e - 1][0] ? o.push([t, e - 1]) : 14 == this.puzzleArray[t][e - 1][0] && h.push([t, e - 1])),
  3507. 6 >= e + 1 && (1 == this.puzzleArray[t][e + 1][0] ? a.push([t, e + 1]) : 2 == this.puzzleArray[t][e + 1][0] ? s.push([t, e + 1]) : 3 == this.puzzleArray[t][e + 1][0] ? r.push([t, e + 1]) : 4 == this.puzzleArray[t][e + 1][0] ? n.push([t, e + 1]) : 5 == this.puzzleArray[t][e + 1][0] ? o.push([t, e + 1]) : 14 == this.puzzleArray[t][e + 1][0] && h.push([t, e + 1])),
  3508. e % 2 == 0 ? (e - 1 >= 0 && 5 >= t + 1 && (1 == this.puzzleArray[t + 1][e - 1][0] ? a.push([t + 1, e - 1]) : 2 == this.puzzleArray[t + 1][e - 1][0] ? s.push([t + 1, e - 1]) : 3 == this.puzzleArray[t + 1][e - 1][0] ? r.push([t + 1, e - 1]) : 4 == this.puzzleArray[t + 1][e - 1][0] ? n.push([t + 1, e - 1]) : 5 == this.puzzleArray[t + 1][e - 1][0] ? o.push([t + 1, e - 1]) : 14 == this.puzzleArray[t + 1][e - 1][0] && h.push([t + 1, e - 1])),
  3509. 6 >= e + 1 && 5 >= t + 1 && (1 == this.puzzleArray[t + 1][e + 1][0] ? a.push([t + 1, e + 1]) : 2 == this.puzzleArray[t + 1][e + 1][0] ? s.push([t + 1, e + 1]) : 3 == this.puzzleArray[t + 1][e + 1][0] ? r.push([t + 1, e + 1]) : 4 == this.puzzleArray[t + 1][e + 1][0] ? n.push([t + 1, e + 1]) : 5 == this.puzzleArray[t + 1][e + 1][0] ? o.push([t + 1, e + 1]) : 14 == this.puzzleArray[t + 1][e + 1][0] && h.push([t + 1, e + 1]))) : (e - 1 >= 0 && t - 1 >= 0 && (1 == this.puzzleArray[t - 1][e - 1][0] ? a.push([t - 1, e - 1]) : 2 == this.puzzleArray[t - 1][e - 1][0] ? s.push([t - 1, e - 1]) : 3 == this.puzzleArray[t - 1][e - 1][0] ? r.push([t - 1, e - 1]) : 4 == this.puzzleArray[t - 1][e - 1][0] ? n.push([t - 1, e - 1]) : 5 == this.puzzleArray[t - 1][e - 1][0] ? o.push([t - 1, e - 1]) : 14 == this.puzzleArray[t - 1][e - 1][0] && h.push([t - 1, e - 1])),
  3510. 6 >= e + 1 && t - 1 >= 0 && (1 == this.puzzleArray[t - 1][e + 1][0] ? a.push([t - 1, e + 1]) : 2 == this.puzzleArray[t - 1][e + 1][0] ? s.push([t - 1, e + 1]) : 3 == this.puzzleArray[t - 1][e + 1][0] ? r.push([t - 1, e + 1]) : 4 == this.puzzleArray[t - 1][e + 1][0] ? n.push([t - 1, e + 1]) : 5 == this.puzzleArray[t - 1][e + 1][0] ? o.push([t - 1, e + 1]) : 14 == this.puzzleArray[t - 1][e + 1][0] && h.push([t - 1, e + 1]))),
  3511. h.length > 0) {
  3512. if (a.length > 0)
  3513. return !0;
  3514. if (s.length > 0)
  3515. return !0;
  3516. if (r.length > 0)
  3517. return !0;
  3518. if (n.length > 0)
  3519. return !0;
  3520. if (o.length > 0)
  3521. return !0
  3522. } else {
  3523. if (a.length > 1)
  3524. return !0;
  3525. if (s.length > 1)
  3526. return !0;
  3527. if (r.length > 1)
  3528. return !0;
  3529. if (n.length > 1)
  3530. return !0;
  3531. if (o.length > 1)
  3532. return !0
  3533. }
  3534. } else {
  3535. var l = 0
  3536. , p = 0;
  3537. if (t - 1 >= 0 && (i == this.puzzleArray[t - 1][e][0] && l++ ,
  3538. 14 == this.puzzleArray[t - 1][e][0] && p++),
  3539. 5 >= t + 1 && (i == this.puzzleArray[t + 1][e][0] && l++ ,
  3540. 14 == this.puzzleArray[t + 1][e][0] && p++),
  3541. e - 1 >= 0 && (i == this.puzzleArray[t][e - 1][0] && l++ ,
  3542. 14 == this.puzzleArray[t][e - 1][0] && p++),
  3543. 6 >= e + 1 && (i == this.puzzleArray[t][e + 1][0] && l++ ,
  3544. 14 == this.puzzleArray[t][e + 1][0] && p++),
  3545. e % 2 == 0 ? (e - 1 >= 0 && 5 >= t + 1 && (i == this.puzzleArray[t + 1][e - 1][0] && l++ ,
  3546. 14 == this.puzzleArray[t + 1][e - 1][0] && p++),
  3547. 6 >= e + 1 && 5 >= t + 1 && (i == this.puzzleArray[t + 1][e + 1][0] && l++ ,
  3548. 14 == this.puzzleArray[t + 1][e + 1][0] && p++)) : (e - 1 >= 0 && t - 1 >= 0 && (i == this.puzzleArray[t - 1][e - 1][0] && l++ ,
  3549. 14 == this.puzzleArray[t - 1][e - 1][0] && p++),
  3550. 6 >= e + 1 && t - 1 >= 0 && (i == this.puzzleArray[t - 1][e + 1][0] && l++ ,
  3551. 14 == this.puzzleArray[t - 1][e + 1][0] && p++)),
  3552. l + p >= 2 && l >= 1)
  3553. return !0
  3554. }
  3555. }
  3556. }
  3557. return !1
  3558. }
  3559. ,
  3560. gc.GamePlayPage.prototype.pause = function () { }
  3561. ,
  3562. gc.GamePlayPage.prototype.resume = function () { }
  3563. ,
  3564. gc.GamePlayPage.prototype.updateTransform = function () {
  3565. PIXI.Container.prototype.updateTransform.call(this)
  3566. }
  3567. }
  3568. , function (t, e) {
  3569. gc.GamePopup = function () {
  3570. PIXI.Container.call(this),
  3571. this.shadow = PIXI.Sprite.fromFrame("puzzle_popup_shadow.png"),
  3572. this.popupSprite = PIXI.Sprite.fromFrame("ui_start1.png"),
  3573. this.popupSprite.anchor.set(.5, .5),
  3574. this.popupSprite.x = GD.width / 2,
  3575. this.popupSprite.y = GD.height / 2 + 200,
  3576. this.tweenTime = 2,
  3577. this.tweenMax = null,
  3578. this.shadow.anchor.set(.5, 0),
  3579. this.shadow.x = GD.width / 2,
  3580. this.shadow.y = .417 * GD.height,
  3581. this.addChild(this.shadow),
  3582. this.addChild(this.popupSprite),
  3583. this.countryFlagSprite = PIXI.Sprite.fromFrame("ui_nation_0001.png"),
  3584. this.countryFlagSprite.anchor.set(.5, .5),
  3585. this.countryFlagSprite.x = GD.width / 2,
  3586. this.countryFlagSprite.y = .7 * GD.height
  3587. }
  3588. ,
  3589. gc.GamePopup.constructor = gc.GamePopup,
  3590. gc.GamePopup.prototype = Object.create(PIXI.Container.prototype),
  3591. gc.GamePopup.prototype.showPopup = function (t) {
  3592. null != this.tweenMax && this.tweenMax.kill(!1);
  3593. var e = !0;
  3594. if (0 == t)
  3595. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_start"),
  3596. this.popupSprite.texture = PIXI.Texture.fromFrame("ui_start.png"),
  3597. this.removeChild(this.popupSprite);
  3598. else if (1 == t) {
  3599. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_stage");
  3600. var i = Math.ceil(this.parent.stageNum / 2);
  3601. this.popupSprite.texture = PIXI.Texture.fromFrame("ui_nation_000" + i + ".png")
  3602. } else if (2 == t)
  3603. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_clear"),
  3604. this.popupSprite.texture = PIXI.Texture.fromFrame("ui_clear1.png");
  3605. else if (3 == t)
  3606. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_clear"),
  3607. this.popupSprite.texture = PIXI.Texture.fromFrame("ui_clear2.png");
  3608. else if (4 == t)
  3609. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_gameover"),
  3610. this.popupSprite.texture = PIXI.Texture.fromFrame("ui_gameover.png");
  3611. else if (5 == t)
  3612. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_fever"),
  3613. this.popupSprite.texture = PIXI.Texture.fromFrame("ui_bonus.png");
  3614. else if (6 == t) {
  3615. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_stage");
  3616. var i = Math.ceil(this.parent.stageNum / 2);
  3617. this.popupSprite.texture = PIXI.Texture.fromFrame("ui_nation_0001.png")
  3618. } else
  3619. gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_start"),
  3620. this.popupSprite.texture = PIXI.Texture.fromFrame("ui_start1.png"),
  3621. this.removeChild(this.popupSprite),
  3622. e = !1;
  3623. if (e)
  3624. this.addChild(this.popupSprite),
  3625. gc.isLowPhone ? (this.popupSprite.scale.set(1),
  3626. 0 == t ? this.tweenMax = TweenMax.from(this.popupSprite.scale, this.tweenTime, {
  3627. x: 1,
  3628. y: 1,
  3629. onComplete: function (t) {
  3630. this.parent.popupCloseCallBack(t)
  3631. }
  3632. .bind(this),
  3633. onCompleteParams: [t]
  3634. }) : this.tweenMax = TweenMax.from(this.popupSprite, this.tweenTime, {
  3635. y: "-=0",
  3636. onComplete: function (t) {
  3637. this.parent.popupCloseCallBack(t)
  3638. }
  3639. .bind(this),
  3640. onCompleteParams: [t]
  3641. })) : 0 == t ? this.tweenMax = TweenMax.from(this.popupSprite.scale, this.tweenTime, {
  3642. x: .2,
  3643. y: .2,
  3644. ease: Elastic.easeOut,
  3645. onComplete: function (t) {
  3646. this.parent.popupCloseCallBack(t)
  3647. }
  3648. .bind(this),
  3649. onCompleteParams: [t]
  3650. }) : this.tweenMax = TweenMax.from(this.popupSprite, this.tweenTime, {
  3651. y: -this.popupSprite.height / 2,
  3652. ease: Elastic.easeOut,
  3653. onComplete: function (t) {
  3654. this.parent.popupCloseCallBack(t)
  3655. }
  3656. .bind(this),
  3657. onCompleteParams: [t]
  3658. });
  3659. else {
  3660. var i = Math.ceil(this.parent.stageNum / 2);
  3661. this.countryFlagSprite.texture = PIXI.Texture.fromFrame("ui_nation_000" + i + ".png"),
  3662. this.addChild(this.countryFlagSprite),
  3663. gc.isLowPhone ? (this.countryFlagSprite.scale.set(1),
  3664. TweenMax.from(this.countryFlagSprite.scale, .5, {
  3665. x: 1,
  3666. y: 1,
  3667. onComplete: function () {
  3668. this.addChild(this.popupSprite),
  3669. this.popupSprite.y = GD.height / 2,
  3670. this.tweenMax = TweenMax.from(this.popupSprite, this.tweenTime, {
  3671. delay: .5,
  3672. y: GD.height / 2,
  3673. onStart: function () {
  3674. this.removeChild(this.countryFlagSprite)
  3675. }
  3676. .bind(this),
  3677. onComplete: function (t) {
  3678. this.parent.popupCloseCallBack(t)
  3679. }
  3680. .bind(this),
  3681. onCompleteParams: [t]
  3682. })
  3683. }
  3684. .bind(this)
  3685. })) : TweenMax.from(this.countryFlagSprite.scale, .5, {
  3686. x: 1.5,
  3687. y: 1.5,
  3688. onComplete: function () {
  3689. this.addChild(this.popupSprite),
  3690. this.tweenMax = TweenMax.from(this.popupSprite, this.tweenTime, {
  3691. delay: 1,
  3692. y: -this.popupSprite.height / 2,
  3693. ease: Elastic.easeOut,
  3694. onStart: function () {
  3695. this.removeChild(this.countryFlagSprite)
  3696. }
  3697. .bind(this),
  3698. onComplete: function (t) {
  3699. this.parent.popupCloseCallBack(t)
  3700. }
  3701. .bind(this),
  3702. onCompleteParams: [t]
  3703. })
  3704. }
  3705. .bind(this)
  3706. })
  3707. }
  3708. }
  3709. ,
  3710. gc.GamePopup.prototype.updateTransform = function () {
  3711. PIXI.Container.prototype.updateTransform.call(this)
  3712. }
  3713. }
  3714. , function (t, e) {
  3715. gc.GameScoreEffectContianer = function () {
  3716. PIXI.Container.call(this),
  3717. this.scoreTxtLists = []
  3718. }
  3719. ,
  3720. gc.GameScoreEffectContianer.constructor = gc.GameScoreEffectContianer,
  3721. gc.GameScoreEffectContianer.prototype = Object.create(PIXI.Container.prototype),
  3722. gc.GameScoreEffectContianer.prototype.init = function () {
  3723. this.removeAll()
  3724. }
  3725. ,
  3726. gc.GameScoreEffectContianer.prototype.showScore = function (t, e, i) {
  3727. var a = null
  3728. , s = null;
  3729. a = this.scoreTxtLists.length > 0 ? this.scoreTxtLists.shift() : new gc.NumberText("ui_effec_score", "center", -3),
  3730. a.x = e,
  3731. a.y = i - 20,
  3732. this.addChild(a),
  3733. a.setValue(t),
  3734. a.scale.set(1),
  3735. a.alpha = 1,
  3736. s = new TimelineMax,
  3737. s.to(a.scale, .3, {
  3738. x: 1.5,
  3739. y: 1.5,
  3740. yoyo: !0,
  3741. repeat: 0,
  3742. ease: Elastic.easeOut
  3743. }),
  3744. s.to(a, .3, {
  3745. y: "-=50",
  3746. alpha: .5,
  3747. onComplete: function (t, e) {
  3748. try {
  3749. this.removeChild(t),
  3750. e.kill(!1),
  3751. e = null
  3752. } catch (i) { }
  3753. }
  3754. .bind(this),
  3755. onCompleteParams: [a, s],
  3756. ease: Sine.easeOut
  3757. })
  3758. }
  3759. ,
  3760. gc.GameScoreEffectContianer.prototype.removeAll = function () {
  3761. this.removeChildren()
  3762. }
  3763. ,
  3764. gc.GameScoreEffectContianer.prototype.updateTransform = function () {
  3765. PIXI.Container.prototype.updateTransform.call(this)
  3766. }
  3767. }
  3768. , function (t, e) {
  3769. gc.GameSoundPopup = function () {
  3770. PIXI.Container.call(this),
  3771. this.darkBg = new PIXI.Graphics,
  3772. this.darkBg.lineStyle(1, 0, 1),
  3773. this.darkBg.beginFill(0, .8),
  3774. this.darkBg.drawRect(0, 0, gc.width, gc.height),
  3775. this.darkBg.endFill(),
  3776. this.darkBg.interactive = !0,
  3777. this.setTouchEnd(this.darkBg),
  3778. this.bg = PIXI.Sprite.fromFrame("popup_sound.png"),
  3779. this.bg.anchor.set(.5),
  3780. this.bg.x = GD.width / 2,
  3781. this.bg.y = GD.height / 2,
  3782. this.exitBtn = PIXI.Sprite.fromFrame("btn_exit.png"),
  3783. this.exitBtn.anchor.set(.5),
  3784. this.exitBtn.x = 230,
  3785. this.exitBtn.y = -250,
  3786. this.bg.addChild(this.exitBtn),
  3787. this.bgmBtn = PIXI.Sprite.fromFrame("sound_btn_bg1.png"),
  3788. this.bgmBtn.anchor.set(.5),
  3789. this.bgmBtn.y = -10,
  3790. this.bg.addChild(this.bgmBtn),
  3791. this.effectBtn = PIXI.Sprite.fromFrame("sound_btn_effect1.png"),
  3792. this.effectBtn.anchor.set(.5),
  3793. this.effectBtn.y = 110,
  3794. this.bg.addChild(this.effectBtn),
  3795. this.setTouchStartAction(this.bgmBtn, this.clickedBgmBtn, this),
  3796. this.setTouchStartAction(this.effectBtn, this.clickedEffectBtn, this),
  3797. this.setTouchStart(this.exitBtn, this.closePopup, this)
  3798. }
  3799. ,
  3800. gc.GameSoundPopup.constructor = gc.GameSoundPopup,
  3801. gc.GameSoundPopup.prototype = Object.create(PIXI.Container.prototype),
  3802. gc.GameSoundPopup.prototype.init = function () {
  3803. this.removeAll(),
  3804. this.setInteractive(!1),
  3805. this.initBtnSta(),
  3806. this.addChild(this.darkBg),
  3807. this.addChild(this.bg),
  3808. this.bg.scale.set(.1),
  3809. TweenMax.to(this.bg.scale, .2, {
  3810. x: 1,
  3811. y: 1,
  3812. ease: Back.easeOut,
  3813. onComplete: this.endBgMotion.bind(this)
  3814. })
  3815. }
  3816. ,
  3817. gc.GameSoundPopup.prototype.endBgMotion = function () {
  3818. this.setInteractive(!0)
  3819. }
  3820. ,
  3821. gc.GameSoundPopup.prototype.initBtnSta = function () {
  3822. gc.bgmFlag ? this.bgmBtn.texture = PIXI.Texture.fromFrame("sound_btn_bg1.png") : this.bgmBtn.texture = PIXI.Texture.fromFrame("sound_btn_bg2.png"),
  3823. gc.soundFlag ? this.effectBtn.texture = PIXI.Texture.fromFrame("sound_btn_effect1.png") : this.effectBtn.texture = PIXI.Texture.fromFrame("sound_btn_effect2.png")
  3824. }
  3825. ,
  3826. gc.GameSoundPopup.prototype.closePopup = function () {
  3827. this.setInteractive(!1),
  3828. this.removeAll(),
  3829. this.emit("CLOSE_SOUND_POPUP")
  3830. }
  3831. ,
  3832. gc.GameSoundPopup.prototype.clickedBgmBtn = function () {
  3833. gc.bgmFlag ? GD.bgmStop() : GD.bgmPlay(1),
  3834. gc.bgmFlag = !gc.bgmFlag,
  3835. gc.setStorage(gc.storagebgm, gc.bgmFlag),
  3836. this.initBtnSta()
  3837. }
  3838. ,
  3839. gc.GameSoundPopup.prototype.clickedEffectBtn = function () {
  3840. gc.soundFlag = !gc.soundFlag,
  3841. gc.setStorage(gc.storagesound, gc.soundFlag),
  3842. gc.soundFlag || gc.stopAllEffectSound(),
  3843. this.initBtnSta()
  3844. }
  3845. ,
  3846. gc.GameSoundPopup.prototype.setInteractive = function (t) {
  3847. this.bgmBtn.interactive = t,
  3848. this.effectBtn.interactive = t,
  3849. this.exitBtn.interactive = t
  3850. }
  3851. ,
  3852. gc.GameSoundPopup.prototype.removeAll = function () {
  3853. this.removeChildren()
  3854. }
  3855. ,
  3856. gc.GameSoundPopup.prototype.updateTransform = function () {
  3857. PIXI.Container.prototype.updateTransform.call(this)
  3858. }
  3859. }
  3860. , function (t, e) {
  3861. gc.GameStage = function () {
  3862. PIXI.Container.call(this),
  3863. this.GamePlayPage = new gc.GamePlayPage,
  3864. this.tutorialContianer = new gc.GameTutorial,
  3865. this.soundPopup = new gc.GameMainSound
  3866. }
  3867. ,
  3868. gc.GameStage.constructor = gc.GameStage,
  3869. gc.GameStage.prototype = Object.create(PIXI.Container.prototype),
  3870. gc.GameStage.prototype.init = function () {
  3871. this.mainPageContainer = new PIXI.Container,
  3872. this.gameStartBt = PIXI.Sprite.fromFrame("intro_start_btn.png"),
  3873. this.gameStartBt.anchor.set(.5, .5),
  3874. this.gameStartBt.y = .885 * GD.height,
  3875. this.gameStartBt.x = GD.width / 2,
  3876. this.gameHelpBt = PIXI.Sprite.fromFrame("intro_help_btn.png"),
  3877. this.gameHelpBt.anchor.set(.5, .5),
  3878. this.gameHelpBt.y = .828 * GD.height,
  3879. this.gameHelpBt.x = .855 * GD.width,
  3880. this.gameSoundBt = PIXI.Sprite.fromFrame("intro_option_btn.png"),
  3881. this.gameSoundBt.anchor.set(.5, .5),
  3882. this.gameSoundBt.y = .828 * GD.height,
  3883. this.gameSoundBt.x = .16 * GD.width,
  3884. this.gameBg = new PIXI.Sprite(GD.loader.resources.introbg.texture),
  3885. this.mainPageContainer.addChild(this.gameBg),
  3886. this.mainPageContainer.addChild(this.gameStartBt),
  3887. this.mainPageContainer.addChild(this.gameHelpBt),
  3888. this.mainPageContainer.addChild(this.gameSoundBt),
  3889. this.addChild(this.mainPageContainer),
  3890. this.gameStartBt.interactive = !0,
  3891. this.gameStartBt.mousedown = this.gameStartBt.touchstart = function (t) {
  3892. t.stopPropagation(),
  3893. this.gameStartBt.interactive = !1,
  3894. this.gameHelpBt.interactive = !1,
  3895. this.gameSoundBt.interactive = !1,
  3896. TweenMax.to(this.gameStartBt.scale, .05, {
  3897. x: 1.1,
  3898. y: 1.1,
  3899. onComplete: function () {
  3900. if (this.gameStartBt.scale.x = 1,
  3901. this.gameStartBt.scale.y = 1,
  3902. this.GamePlayPage.init(),
  3903. this.addChild(this.GamePlayPage),
  3904. GD.soundPlay("sound_bgm"),
  3905. !gc.bgSound) {
  3906. var t = gc.totolSound;
  3907. gc.totolSound = !0,
  3908. GD.soundStop("sound_bgm"),
  3909. gc.totolSound = t
  3910. }
  3911. }
  3912. .bind(this),
  3913. ease: Linear.easeInOut
  3914. })
  3915. }
  3916. .bind(this),
  3917. this.gameHelpBt.interactive = !0,
  3918. this.gameHelpBt.mousedown = this.gameHelpBt.touchstart = function (t) {
  3919. t.stopPropagation(),
  3920. this.gameHelpBt.interactive = !1,
  3921. TweenMax.to(this.gameHelpBt.scale, .05, {
  3922. x: 1.1,
  3923. y: 1.1,
  3924. onComplete: function () {
  3925. this.gameHelpBt.scale.x = 1,
  3926. this.gameHelpBt.scale.y = 1,
  3927. this.addChild(this.tutorialContianer)
  3928. }
  3929. .bind(this),
  3930. ease: Linear.easeInOut
  3931. })
  3932. }
  3933. .bind(this),
  3934. this.gameSoundBt.interactive = !0,
  3935. this.gameSoundBt.mousedown = this.gameSoundBt.touchstart = function (t) {
  3936. t.stopPropagation(),
  3937. this.gameSoundBt.interactive = !1,
  3938. TweenMax.to(this.gameSoundBt.scale, .05, {
  3939. x: 1.1,
  3940. y: 1.1,
  3941. onComplete: function () {
  3942. this.gameSoundBt.scale.x = 1,
  3943. this.gameSoundBt.scale.y = 1,
  3944. this.soundPopup.initBtType(),
  3945. this.addChild(this.soundPopup),
  3946. this.gameSoundBt.interactive = !0
  3947. }
  3948. .bind(this),
  3949. ease: Linear.easeInOut
  3950. })
  3951. }
  3952. .bind(this)
  3953. }
  3954. ,
  3955. gc.GameStage.prototype.showTutu = function () {
  3956. this.tutorialContianer.changeBtType(1),
  3957. this.addChild(this.tutorialContianer)
  3958. }
  3959. ,
  3960. gc.GameStage.prototype.removeTutu = function () {
  3961. this.removeChild(this.tutorialContianer)
  3962. }
  3963. ,
  3964. gc.GameStage.prototype.tutorialToGame = function () {
  3965. if (GD.soundPlay("sound_bgm"),
  3966. gc.soundLoop("sound_bgm", !0),
  3967. !gc.bgSound) {
  3968. var t = gc.totolSound;
  3969. gc.totolSound = !0,
  3970. GD.soundStop("sound_bgm"),
  3971. gc.totolSound = t
  3972. }
  3973. this.removeChild(this.tutorialContianer),
  3974. this.GamePlayPage.init(),
  3975. this.addChild(this.GamePlayPage),
  3976. this.gameStartBt.interactive = !1
  3977. }
  3978. ,
  3979. gc.GameStage.prototype.updateTransform = function () {
  3980. PIXI.Container.prototype.updateTransform.call(this)
  3981. }
  3982. }
  3983. , function (t, e) {
  3984. gc.GameStageClearPopup = function () {
  3985. PIXI.Container.call(this),
  3986. this.countryArry = ["", "pic_korea.png", "pic_china.png", "pic_egypt.png", "pic_greece.png", "pic_france.png", "pic_brazil.png", "pic_america.png"],
  3987. this.countryTextArray = ["", "result_korea.png", "result_china.png", "result_egypt.png", "result_greece.png", "result_france.png", "result_brazil.png", "result_america.png"],
  3988. this.popupBG = new PIXI.Sprite(GD.loader.resources.uishadow.texture),
  3989. this.popupBG.alpha = .8,
  3990. this.bg = PIXI.Sprite.fromFrame("result_korea.png"),
  3991. this.bg.anchor.set(.5),
  3992. this.bg.x = GD.width / 2,
  3993. this.bg.y = GD.height / 2,
  3994. this.countryText = PIXI.Sprite.fromFrame("result_korea.png"),
  3995. this.countryText.anchor.set(.5, .5),
  3996. this.countryText.x = GD.width / 2 - 360,
  3997. this.countryText.y = 250 - GD.height / 2,
  3998. this.countryPic = PIXI.Sprite.fromFrame("pic_korea.png"),
  3999. this.countryPic.anchor.set(.5, .5),
  4000. this.countryPic.x = GD.width / 2 - 360,
  4001. this.countryPic.y = 510 - GD.height / 2,
  4002. this.resultList = PIXI.Sprite.fromFrame("result_list.png"),
  4003. this.resultList.anchor.set(.5, .5),
  4004. this.resultList.x = GD.width / 2 - 360,
  4005. this.resultList.y = 800 - GD.height / 2,
  4006. this.bonusMove = new gc.NumberText("result_moves_", "left", 0),
  4007. this.bonusMove.x = -25,
  4008. this.bonusMove.y = 770 - GD.height / 2,
  4009. this.bonusClear = new gc.NumberText("result_clear_", "center", 0),
  4010. this.bonusClear.x = GD.width / 2 - 360,
  4011. this.bonusClear.y = 900 - GD.height / 2
  4012. }
  4013. ,
  4014. gc.GameStageClearPopup.constructor = gc.GameStageClearPopup,
  4015. gc.GameStageClearPopup.prototype = Object.create(PIXI.Container.prototype),
  4016. gc.GameStageClearPopup.prototype.show = function (t, e) {
  4017. this.removeChildren();
  4018. var i = Math.ceil((this.parent.stageNum - 1) / 2);
  4019. this.countryText.texture = PIXI.Texture.fromFrame(this.countryTextArray[i]),
  4020. this.countryPic.texture = PIXI.Texture.fromFrame(this.countryArry[i]),
  4021. this.bonusMove.setValue(t),
  4022. this.bonusClear.setValue(e),
  4023. this.addChild(this.popupBG),
  4024. this.addChild(this.bg),
  4025. this.bg.addChild(this.countryText),
  4026. this.bg.addChild(this.countryPic),
  4027. this.bg.addChild(this.resultList),
  4028. this.bg.addChild(this.bonusMove),
  4029. this.bg.addChild(this.bonusClear)
  4030. }
  4031. ,
  4032. gc.GameStageClearPopup.prototype.remove = function () {
  4033. this.removeChildren()
  4034. }
  4035. ,
  4036. gc.GameStageClearPopup.prototype.updateTransform = function () {
  4037. PIXI.Container.prototype.updateTransform.call(this)
  4038. }
  4039. }
  4040. , function (t, e) {
  4041. gc.GameIntro = function () {
  4042. PIXI.Container.call(this),
  4043. this.bg = PIXI.Sprite.fromFrame("intro_bg.png"),
  4044. // this.allPlayIcon = PIXI.Sprite.fromFrame("common_game_grade.png"),
  4045. // this.allPlayIcon.anchor.set(.5),
  4046. // this.allPlayIcon.x = 650,
  4047. // this.allPlayIcon.y = 80,
  4048. this.soundBtn = PIXI.Sprite.fromFrame("intro_option_btn.png"),
  4049. this.soundBtn.anchor.set(.5),
  4050. this.soundBtn.x = 620,
  4051. this.soundBtn.y = 1e3,
  4052. this.setTouchStartAction(this.soundBtn, this.clickedSoundBtn, this),
  4053. this.startBtn = PIXI.Sprite.fromFrame("intro_start_btn.png"),
  4054. this.startBtn.anchor.set(.5),
  4055. this.startBtn.x = 360,
  4056. this.startBtn.y = 1e3,
  4057. this.setTouchStartAction(this.startBtn, this.clickedStartBtn, this),
  4058. this.tutorialBtn = PIXI.Sprite.fromFrame("intro_help_btn.png"),
  4059. this.tutorialBtn.anchor.set(.5),
  4060. this.tutorialBtn.x = 100,
  4061. this.tutorialBtn.y = 1e3,
  4062. this.setTouchStartAction(this.tutorialBtn, this.clickedTutBtn, this),
  4063. // this.cropRightTxt = PIXI.Sprite.fromFrame("copyright_1.png"),
  4064. // this.cropRightTxt.anchor.set(.5),
  4065. // this.cropRightTxt.x = gc.width / 2,
  4066. // this.cropRightTxt.y = gc.height - this.cropRightTxt.height / 2,
  4067. this.soundPopup = new gc.GameMainSoundPopup,
  4068. this.soundPopup.on("POPUP_CLOSE_EVENT", this.closeSoundPopup.bind(this)),
  4069. this.tutorialPopup = new gc.GameTutorial,
  4070. this.tutorialPopup.on("TUTORIAL_POPUP_CLOSE_EVENT", this.closeTutorial.bind(this))
  4071. }
  4072. ,
  4073. gc.GameIntro.constructor = gc.GameIntro,
  4074. gc.GameIntro.prototype = Object.create(PIXI.Container.prototype),
  4075. gc.GameIntro.prototype.init = function () {
  4076. this.removeAll(),
  4077. this.addChild(this.bg),
  4078. // this.addChild(this.allPlayIcon),
  4079. this.addChild(this.soundBtn),
  4080. this.addChild(this.startBtn),
  4081. this.addChild(this.tutorialBtn),
  4082. // this.addChild(this.cropRightTxt),
  4083. this.setInteractive(!0)
  4084. }
  4085. ,
  4086. gc.GameIntro.prototype.clickedStartBtn = function () {
  4087. this.emit("GAMESTART_EVENT"),
  4088. this.setInteractive(!1)
  4089. }
  4090. ,
  4091. gc.GameIntro.prototype.clickedSoundBtn = function () {
  4092. this.setInteractive(!1),
  4093. this.soundPopup.init(),
  4094. this.addChild(this.soundPopup)
  4095. }
  4096. ,
  4097. gc.GameIntro.prototype.clickedTutBtn = function () {
  4098. this.setInteractive(!1),
  4099. this.tutorialPopup.initPage(),
  4100. this.addChild(this.tutorialPopup)
  4101. GD.objSdk.hideAdIcon();
  4102. }
  4103. ,
  4104. gc.GameIntro.prototype.closeTutorial = function () {
  4105. this.tutorialPopup.parent && this.removeChild(this.tutorialPopup),
  4106. this.setInteractive(!0)
  4107. GD.objSdk.showAdIcon(10, 720);
  4108. }
  4109. ,
  4110. gc.GameIntro.prototype.closeSoundPopup = function () {
  4111. this.setInteractive(!0),
  4112. this.soundPopup.parent && this.removeChild(this.soundPopup)
  4113. }
  4114. ,
  4115. gc.GameIntro.prototype.setInteractive = function (t) {
  4116. this.soundBtn.interactive = t,
  4117. this.startBtn.interactive = t,
  4118. this.tutorialBtn.interactive = t
  4119. }
  4120. ,
  4121. gc.GameIntro.prototype.removeAll = function () {
  4122. this.removeChildren()
  4123. }
  4124. ,
  4125. gc.GameIntro.prototype.updateTransform = function () {
  4126. PIXI.Container.prototype.updateTransform.call(this)
  4127. }
  4128. }
  4129. , function (t, e) {
  4130. !function () {
  4131. function t() {
  4132. var t = "win16|win32|win64|mac";
  4133. navigator.platform && 0 > t.indexOf(navigator.platform.toLowerCase()) && (navigator.userAgent.match(/Android 4./) ? gc.isLowPhone = !0 : gc.isLowPhone = !1,
  4134. (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) && (gc.phoneType = "io")),
  4135. e()
  4136. }
  4137. function e() {
  4138. var t = ["sound_bgm"]
  4139. , e = ["sound_start", "sound_gameover", "sound_clear", "sound_puzzle_mix", "sound_sp_puzzle_mix", "sound_mvminus", "sound_mvplus", "sound_stage", "sound_drag01", "sound_drag02", "sound_drag03", "sound_drag04", "sound_drag05", "sound_drag06", "sound_drag07", "sound_drag08", "sound_drag09", "sound_drag010", "sound_drag_max", "sound_puzzle", "sound_block", "sound_sp_puzzle", "sound_helicopter", "sound_train", "sound_airplane", "sound_ship", "sound_foot", "sound_fever", "sound_flag", "sound_boattrans", "sound_camera"];
  4140. 1 == GD.soundType && (t = t.concat(e)),
  4141. GD.loadSound(t, i)
  4142. }
  4143. function i() {
  4144. loading.hide(),
  4145. GD.stage.removeChild(loading),
  4146. lodingOverFlag = !0,
  4147. a()
  4148. }
  4149. function a() {
  4150. var t = gc.getStorage(gc.storagesound)
  4151. , e = gc.getStorage(gc.storagebgm);
  4152. t && ("true" == t ? gc.soundFlag = !0 : gc.soundFlag = !1),
  4153. e && ("true" == e ? gc.bgmFlag = !0 : gc.bgmFlag = !1),
  4154. GD.stage.removeChildren(),
  4155. gc.state = "intro",
  4156. gc.introPage || (gc.introPage = new gc.GameIntro,
  4157. gc.introPage.on("GAMESTART_EVENT", gc.onGame.bind(this))),
  4158. gc.introPage.init(),
  4159. GD.stage.addChild(gc.introPage);
  4160. objSdk.showAdIcon(10, 720);
  4161. GD.app.ticker.add(objSdk.update, null, PIXI.UPDATE_PRIORITY.UTILITY);
  4162. }
  4163. function s() {
  4164. gc.isPaused = !0,
  4165. gc.game.pauseGame()
  4166. }
  4167. function r() {
  4168. gc.isPaused = !1,
  4169. gc.game.resumeGame()
  4170. }
  4171. GD.init(gc.width, gc.height, 0, 0, 16777215),
  4172. loading = new GD.Progress,
  4173. loading.show(),
  4174. GD.stage.addChild(loading),
  4175. GD.loader.add("help1", RES_DIR_IMG + "intro_tutorial/help_page_0001.png"),
  4176. GD.loader.add("help2", RES_DIR_IMG + "intro_tutorial/help_page_0002.png"),
  4177. GD.loader.add("help3", RES_DIR_IMG + "intro_tutorial/help_page_0003.png"),
  4178. GD.loader.add("help4", RES_DIR_IMG + "intro_tutorial/help_page_0004.png"),
  4179. GD.loader.add("uishadow", RES_DIR_IMG + "ui_shadow.png"),
  4180. GD.loader.add("stage1", RES_DIR_IMG + "stage_1.png"),
  4181. GD.loader.add("stage2", RES_DIR_IMG + "stage_2.png"),
  4182. GD.loader.add("stage3", RES_DIR_IMG + "stage_3.png"),
  4183. GD.loader.add("stage4", RES_DIR_IMG + "stage_4.png"),
  4184. GD.loader.add("stage5", RES_DIR_IMG + "stage_5.png"),
  4185. GD.loader.add("stage6", RES_DIR_IMG + "stage_6.png"),
  4186. GD.loader.add("stage7", RES_DIR_IMG + "stage_7.png"),
  4187. GD.loader.add("stage8", RES_DIR_IMG + "stage_8.png"),
  4188. GD.loader.add("stage9", RES_DIR_IMG + "stage_9.png"),
  4189. GD.loader.add("stage10", RES_DIR_IMG + "stage_10.png"),
  4190. GD.loader.add("stage11", RES_DIR_IMG + "stage_11.png"),
  4191. GD.loader.add("stage12", RES_DIR_IMG + "stage_12.png"),
  4192. GD.loader.add("stage13", RES_DIR_IMG + "stage_13.png"),
  4193. GD.loader.add("stage14", RES_DIR_IMG + "stage_14.png"),
  4194. GD.loader.add(RES_DIR_IMG + "gameLodingPage.json"),
  4195. GD.loader.add(RES_DIR_IMG + "daytonight/daytonight1.json"),
  4196. GD.loader.add(RES_DIR_IMG + "daytonight/daytonight2.json"),
  4197. GD.loader.add(RES_DIR_IMG + "daytonight/daytonight3.json"),
  4198. GD.loader.add(RES_DIR_IMG + "daytonight/daytonight4.json"),
  4199. GD.loader.add(RES_DIR_IMG + "intro.json"),
  4200. GD.loader.add(RES_DIR_IMG + "effect.json"),
  4201. GD.loader.add(RES_DIR_IMG + "gameblock.json"),
  4202. GD.loader.add(RES_DIR_IMG + "game_result.json"),
  4203. GD.loader.add(RES_DIR_IMG + "stage/puzzleBlock.json"),
  4204. GD.loader.add(RES_DIR_IMG + "stage/koreaBuilding.json"),
  4205. GD.loader.add(RES_DIR_IMG + "stage/koreaBlock.json"),
  4206. GD.loader.add(RES_DIR_IMG + "stage/chinaBlock.json"),
  4207. GD.loader.add(RES_DIR_IMG + "stage/chinaBuilding.json"),
  4208. GD.loader.add(RES_DIR_IMG + "stage/egyptBlock.json"),
  4209. GD.loader.add(RES_DIR_IMG + "stage/egyptBuilding.json"),
  4210. GD.loader.add(RES_DIR_IMG + "stage/greeceBlock.json"),
  4211. GD.loader.add(RES_DIR_IMG + "stage/greeceBuilding.json"),
  4212. GD.loader.add(RES_DIR_IMG + "stage/americaBlock.json"),
  4213. GD.loader.add(RES_DIR_IMG + "stage/americaBuilding.json"),
  4214. GD.loader.add(RES_DIR_IMG + "stage/franceBlock.json"),
  4215. GD.loader.add(RES_DIR_IMG + "stage/franceBuilding.json"),
  4216. GD.loader.add(RES_DIR_IMG + "stage/brazilBlock.json"),
  4217. GD.loader.add(RES_DIR_IMG + "stage/stageClear.json"),
  4218. GD.loader.add(RES_DIR_IMG + "stage/brazilBuilding.json"),
  4219. GD.loader.add(RES_DIR_IMG + "stagechange/endingpage.json"),
  4220. GD.loader.add(RES_DIR_IMG + "transport2.json"),
  4221. GD.loader.add(RES_DIR_IMG + "kariNormal/ui_speech.json"),
  4222. GD.loader.add("tutoriaSpine", RES_DIR_IMG + "intro_tutorial/skeleton.json"),
  4223. GD.loader.add("spineCharacter", RES_DIR_IMG + "skeleton.json"),
  4224. GD.loader.add("clearSpine", RES_DIR_IMG + "stageclear/skeleton.json"),
  4225. GD.loader.add("failSpine", RES_DIR_IMG + "stagefail/skeleton.json"),
  4226. GD.loader.add("kariNormal", RES_DIR_IMG + "kariNormal/skeleton.json"),
  4227. GD.loader.add("moveLineSpine", RES_DIR_IMG + "movelinespine/skeleton.json"),
  4228. GD.loader.load(t),
  4229. GD.gameId = "PUZZLE_TRIP",
  4230. !gc.localTest;
  4231. gc.onGame = function () {
  4232. GD.stage.removeChildren(),
  4233. gc.gameOver = !1,
  4234. gc.soundPopup || (gc.soundPopup = new gc.GameSoundPopup,
  4235. gc.soundPopup.on("CLOSE_SOUND_POPUP", r),
  4236. gc.soundPopup.parent && GD.stage.removeChild(gc.soundPopup));
  4237. var t = PIXI.Sprite.fromFrame("sound_btn_on.png");
  4238. t.anchor.set(.5, .5),
  4239. t.x = .94 * GD.width,
  4240. t.y = 110 || .04 * GD.height,
  4241. t.interactive = !0,
  4242. t.mousedown = t.touchstart = function (t) {
  4243. t.stopPropagation(),
  4244. s(),
  4245. gc.soundPopup.init(),
  4246. GD.stage.addChild(gc.soundPopup)
  4247. }
  4248. ,
  4249. "ios" == GD.AGENT && (t.x = GD.width + 500),
  4250. gc.soundBt = t,
  4251. gc.state = "game",
  4252. gc.game || (gc.game = new gc.GamePlayPage,
  4253. gc.game.on("GOTO_MAINPAGE", a.bind(this))),
  4254. gc.game.init(),
  4255. GD.stage.addChild(gc.game),
  4256. GD.stage.addChild(t)
  4257. GD.objSdk.hideAdIcon();
  4258. }
  4259. }()
  4260. }
  4261. , function (t, e) {
  4262. NoHeartPopup = function () {
  4263. this.darkBg = null,
  4264. this.bg = null,
  4265. this.txt = null,
  4266. this.closeBtn = null,
  4267. this.imgScale = 1.4,
  4268. PIXI.Container.call(this)
  4269. }
  4270. ,
  4271. NoHeartPopup.constructor = NoHeartPopup,
  4272. NoHeartPopup.prototype = Object.create(PIXI.Container.prototype),
  4273. NoHeartPopup.prototype.init = function () {
  4274. this.removeChildren(),
  4275. this.darkBg || (this.darkBg = new PIXI.Graphics,
  4276. this.darkBg.beginFill("0x000000", .9),
  4277. this.darkBg.lineStyle(0, 0, 0),
  4278. this.darkBg.drawRect(0, 0, GD.width, GD.height),
  4279. this.darkBg.endFill()),
  4280. this.addChild(this.darkBg),
  4281. this.bg || (this.bg = new PIXI.Sprite.fromFrame("popup_chance.png"),
  4282. this.bg.anchor.set(.5),
  4283. this.bg.scale.set(this.imgScale),
  4284. this.bg.x = GD.width / 2,
  4285. this.bg.y = GD.height / 2),
  4286. this.addChild(this.bg),
  4287. this.closeBtn || (this.closeBtn = new PIXI.Sprite.fromFrame("btn_identify.png"),
  4288. this.closeBtn.anchor.set(.5),
  4289. this.closeBtn.scale.set(this.imgScale),
  4290. this.closeBtn.x = GD.width / 2,
  4291. this.closeBtn.y = GD.height / 2 + 115,
  4292. this.closeBtn.interactive = !0,
  4293. this.closeBtn.mousedown = this.closeBtn.touchstart = this.close.bind(this)),
  4294. this.addChild(this.closeBtn)
  4295. }
  4296. ,
  4297. NoHeartPopup.prototype.close = function () {
  4298. OcbApplicationJS.requestCloseWindow()
  4299. }
  4300. }
  4301. , function (t, e) {
  4302. ResultNumberText = function (t, e, i, a, s, r) {
  4303. this.CENTER = "center",
  4304. this.RIGHT = "right",
  4305. this.LEFT = "left",
  4306. this.value = 0,
  4307. this.isChange = !1,
  4308. this.list = [],
  4309. this.tmpList = [],
  4310. this.fileName = t,
  4311. this.align = e,
  4312. this.space = i,
  4313. this.iconName = a,
  4314. this.iconAlign = s,
  4315. this.commaName = r,
  4316. this.icon = null,
  4317. PIXI.Container.call(this),
  4318. this.container = new PIXI.Container,
  4319. this.addChild(this.container),
  4320. this.setValue(0)
  4321. }
  4322. ,
  4323. ResultNumberText.constructor = ResultNumberText,
  4324. ResultNumberText.prototype = Object.create(PIXI.Container.prototype),
  4325. ResultNumberText.prototype.setValue = function (t) {
  4326. this.value = t,
  4327. this.isChange = !0
  4328. }
  4329. ,
  4330. ResultNumberText.prototype.getNumberSprite = function (t) {
  4331. var e, i = this.fileName + CipherCheck.create(t) + ".png";
  4332. return this.tmpList.length > 0 ? (e = this.tmpList.shift(),
  4333. e.texture = PIXI.Texture.fromFrame(i)) : e = PIXI.Sprite.fromFrame(i),
  4334. e
  4335. }
  4336. ,
  4337. ResultNumberText.prototype.getCommaSprite = function () {
  4338. var t, e = this.commaName + ".png";
  4339. return this.tmpList.length > 0 ? (t = this.tmpList.shift(),
  4340. t.texture = PIXI.Texture.fromFrame(e)) : t = PIXI.Sprite.fromFrame(e),
  4341. t
  4342. }
  4343. ,
  4344. ResultNumberText.prototype.removeAll = function () {
  4345. for (var t, e = this.list.length; e--;)
  4346. t = this.list.shift(),
  4347. this.tmpList.push(t);
  4348. this.container && this.container.removeChildren()
  4349. }
  4350. ,
  4351. ResultNumberText.prototype.updateTransform = function () {
  4352. if (this.isChange) {
  4353. this.removeAll();
  4354. var t, e, i = this.commaName ? Util.comma(this.value) : this.value.toString(), a = 0, s = 0, r = i.length;
  4355. for (this.iconName && (this.icon || (this.icon = PIXI.Sprite.fromFrame(this.iconName)),
  4356. this.container.addChild(this.icon),
  4357. "left" == this.iconAlign && (s += this.icon.width + this.space)); r--;)
  4358. e = i.substr(a, 1),
  4359. t = "," == e ? this.getCommaSprite() : this.getNumberSprite(parseInt(e) + 1),
  4360. t.x = s,
  4361. s += t.width,
  4362. r > 0 && (s += this.space),
  4363. a++ ,
  4364. this.container.addChild(t),
  4365. this.list[r] = t;
  4366. "right" == this.iconAlign && (this.icon.x = s,
  4367. s += this.icon.width + this.space),
  4368. this.align == this.CENTER ? this.container.x = -s / 2 : this.align == this.RIGHT && (this.container.x = -s),
  4369. this.isChange = !1
  4370. }
  4371. PIXI.Container.prototype.updateTransform.call(this)
  4372. }
  4373. }
  4374. , function (t, e) {
  4375. gc.ResultView = function () {
  4376. PIXI.Container.call(this),
  4377. this.darkBg = new PIXI.Graphics,
  4378. this.darkBg.lineStyle(1, 0, 1),
  4379. this.darkBg.beginFill(0, .8),
  4380. this.darkBg.drawRect(0, 0, gc.width, gc.height),
  4381. this.darkBg.endFill(),
  4382. this.darkBg.interactive = !0,
  4383. this.setTouchEnd(this.darkBg),
  4384. this.bg = PIXI.Sprite.fromFrame("popup_bg1.png"),
  4385. this.bg.anchor.set(.5),
  4386. this.bg.x = gc.width / 2,
  4387. this.bg.y = gc.height / 2,
  4388. this.scoreTxt = new gc.NumberText("c_score_0", "center", 0, null, null, "c_score_11"),
  4389. this.scoreTxt.x = 0,
  4390. this.scoreTxt.y = -130,
  4391. this.scoreTxt.setValue(1e6),
  4392. this.bg.addChild(this.scoreTxt),
  4393. this.bestScoreTxt = new gc.NumberText("c_score2_0", "center", 0, null, null, "c_score2_11"),
  4394. this.bestScoreTxt.x = 0,
  4395. this.bestScoreTxt.y = 20,
  4396. this.bg.addChild(this.bestScoreTxt),
  4397. this.gropImg = PIXI.Sprite.fromFrame("popup_icon_1.png"),
  4398. this.gropImg.anchor.set(.5),
  4399. this.gropImg.x = 30,
  4400. this.gropImg.y = 97,
  4401. this.bg.addChild(this.gropImg),
  4402. this.reStartBtn = PIXI.Sprite.fromFrame("popup_bt_retry.png"),
  4403. this.reStartBtn.anchor.set(.5),
  4404. this.reStartBtn.y = 220,
  4405. this.bg.addChild(this.reStartBtn),
  4406. this.setTouchStartAction(this.reStartBtn, function () {
  4407. this.requestCloseWindow()
  4408. }, this),
  4409. this.errorMessageTxt = new PIXI.Text("게임 점수 저장에 실패 했습니다.\n다시 한번 게임에 참여 해 주세요.", {
  4410. fontSize: "24px",
  4411. fontWeight: "bold"
  4412. }),
  4413. this.errorMessageTxt.anchor.set(.5),
  4414. this.errorMessageTxt.x = 0,
  4415. this.errorMessageTxt.y = 50,
  4416. this.bg.addChild(this.errorMessageTxt)
  4417. }
  4418. ,
  4419. gc.ResultView.constructor = gc.ResultView,
  4420. gc.ResultView.prototype = Object.create(PIXI.Container.prototype),
  4421. gc.ResultView.prototype.init = function (t, e, i, a, s, r) {
  4422. this.removeAll(),
  4423. 0 >= t ? this.scoreTxt.setValue(0) : this.scoreTxt.setValue(t),
  4424. 0 >= e ? this.bestScoreTxt.setValue(0) : this.bestScoreTxt.setValue(e);
  4425. var n = !1;
  4426. "DIAMOND" == a ? (n = !0,
  4427. this.gropImg.texture = PIXI.Texture.fromFrame("popup_icon_1.png")) : "GOLD" == a ? (n = !0,
  4428. this.gropImg.texture = PIXI.Texture.fromFrame("popup_icon_2.png")) : "SILVER" == a ? (n = !0,
  4429. this.gropImg.texture = PIXI.Texture.fromFrame("popup_icon_3.png")) : "BRONZE" == a && (n = !0,
  4430. this.gropImg.texture = PIXI.Texture.fromFrame("popup_icon_4.png")),
  4431. n ? this.gropImg.visible = !0 : this.gropImg.visible = !1,
  4432. this.initPage(s, r),
  4433. this.addChild(this.darkBg),
  4434. this.addChild(this.bg),
  4435. this.setInteractive(!0)
  4436. }
  4437. ,
  4438. gc.ResultView.prototype.initPage = function (t, e) {
  4439. 1 == t ? (this.bg.texture = PIXI.Texture.fromFrame("popup_bg1.png"),
  4440. this.scoreTxt.x = 0,
  4441. this.scoreTxt.y = -130,
  4442. this.reStartBtn.y = 220,
  4443. this.bestScoreTxt.visible = !0,
  4444. this.errorMessageTxt.visible = !1) : (1 == e ? this.errorMessageTxt.text = "게임 점수 저장에 실패 했습니다.\n다시 한번 게임에 참여 해 주세요." : this.errorMessageTxt.text = "비로그인 시에는 점수가\n 저장되지 않습니다.",
  4445. this.bg.texture = PIXI.Texture.fromFrame("popup_bg4.png"),
  4446. this.scoreTxt.x = 0,
  4447. this.scoreTxt.y = -60,
  4448. this.reStartBtn.y = 155,
  4449. this.bestScoreTxt.visible = !1,
  4450. this.gropImg.visible = !1,
  4451. this.errorMessageTxt.visible = !0)
  4452. }
  4453. ,
  4454. gc.ResultView.prototype.requestCloseWindow = function () {
  4455. this.setInteractive(!1),
  4456. this.removeChildren(),
  4457. this.emit("GOTO_MAINPAGE")
  4458. }
  4459. ,
  4460. gc.ResultView.prototype.removeAll = function () {
  4461. this.removeChildren()
  4462. }
  4463. ,
  4464. gc.ResultView.prototype.setInteractive = function (t) {
  4465. this.reStartBtn.interactive = t
  4466. }
  4467. ,
  4468. gc.ResultView.prototype.updateTransform = function () {
  4469. PIXI.Container.prototype.updateTransform.call(this)
  4470. }
  4471. }
  4472. , function (t, e) {
  4473. gc.GameTutorial = function () {
  4474. PIXI.Container.call(this),
  4475. this.pageNum = 1,
  4476. this.type = 0,
  4477. this.isfirst = !1,
  4478. this.tutorialBg = new PIXI.Sprite(GD.loader.resources.help1.texture),
  4479. this.addChild(this.tutorialBg),
  4480. this.helpnext = PIXI.Sprite.fromFrame("help_next.png"),
  4481. this.helpnext.anchor.set(.5, .5),
  4482. this.helpnext.x = .9 * GD.width,
  4483. this.helpnext.y = .95 * GD.height,
  4484. this.addChild(this.helpnext),
  4485. this.helpperv = PIXI.Sprite.fromFrame("help_prev.png"),
  4486. this.helpperv.anchor.set(.5, .5),
  4487. this.helpperv.x = .1 * GD.width,
  4488. this.helpperv.y = .95 * GD.height,
  4489. this.addChild(this.helpperv),
  4490. this.startBt = PIXI.Sprite.fromFrame("help_start.png"),
  4491. this.startBt.anchor.set(.5, .5),
  4492. this.startBt.x = GD.width / 2,
  4493. this.startBt.y = .95 * GD.height,
  4494. this.addChild(this.startBt),
  4495. this.tutorialContianer = new PIXI.Container,
  4496. this.addChild(this.tutorialContianer),
  4497. this.tutorialAni = new PIXI.spine.Spine(GD.loader.resources.tutoriaSpine.spineData),
  4498. this.tutorialAni.state.addAnimation(0, "animation", !1, 0),
  4499. this.tutorialAni.x = GD.width / 2,
  4500. this.tutorialAni.y = .43 * GD.height,
  4501. this.tutorialContianer.addChild(this.tutorialAni),
  4502. this.tutorialAni.state.addListener({
  4503. complete: function (t, e) {
  4504. this.animation.state.setAnimation(0, "flag_1", !1, 0),
  4505. this.animation.skeleton.setToSetupPose()
  4506. }
  4507. .bind(this)
  4508. }),
  4509. this.animation = new PIXI.spine.Spine(GD.loader.resources.spineCharacter.spineData),
  4510. this.animation.state.addAnimation(0, "flag_1", !1, 0),
  4511. this.animation.x = GD.width / 2,
  4512. this.animation.y = .42 * GD.height,
  4513. this.animation.scale.x = .5,
  4514. this.animation.scale.y = .5,
  4515. this.animation.state.addListener({
  4516. complete: function (t, e) {
  4517. this.isfirst ? (this.tutorialAni.state.setAnimation(0, "animation", !1, 0),
  4518. this.tutorialAni.skeleton.setToSetupPose()) : this.isfirst = !0
  4519. }
  4520. .bind(this)
  4521. }),
  4522. this.tutorialContianer.addChild(this.animation),
  4523. this.setTouchStartAction(this.startBt, function () {
  4524. this.setInteractive(!1),
  4525. this.emit("TUTORIAL_POPUP_CLOSE_EVENT")
  4526. }, this),
  4527. this.helpnext.interactive = !0,
  4528. this.setTouchStartAction(this.helpnext, function () {
  4529. this.pageNum++ ,
  4530. this.tutorialBg.texture = GD.loader.resources["help" + this.pageNum].texture,
  4531. 4 == this.pageNum && (this.helpnext.visible = !1,
  4532. this.helpnext.interactive = !1),
  4533. this.pageNum > 1 && (this.removeChild(this.tutorialContianer),
  4534. this.helpperv.visible = !0,
  4535. this.helpperv.interactive = !0)
  4536. }, this),
  4537. this.helpperv.visible = !1,
  4538. this.helpperv.interactive = !0,
  4539. this.setTouchStartAction(this.helpperv, function () {
  4540. this.pageNum-- ,
  4541. this.tutorialBg.texture = GD.loader.resources["help" + this.pageNum].texture,
  4542. 1 == this.pageNum && (this.addChild(this.tutorialContianer),
  4543. this.helpperv.visible = !1,
  4544. this.helpperv.interactive = !1),
  4545. this.pageNum < 4 && (this.helpnext.visible = !0,
  4546. this.helpnext.interactive = !0)
  4547. }, this)
  4548. }
  4549. ,
  4550. gc.GameTutorial.constructor = gc.GameTutorial,
  4551. gc.GameTutorial.prototype = Object.create(PIXI.Container.prototype),
  4552. gc.GameTutorial.prototype.changeBtType = function (t) {
  4553. this.type = t,
  4554. 0 == this.type ? this.startBt.texture = PIXI.Texture.fromFrame("help_start.png") : this.startBt.texture = PIXI.Texture.fromFrame("help_close.png")
  4555. }
  4556. ,
  4557. gc.GameTutorial.prototype.initPage = function () {
  4558. this.setInteractive(!0),
  4559. this.helpnext.visible = !0,
  4560. this.helpperv.visible = !1,
  4561. this.tutorialBg.texture = GD.loader.resources.help1.texture,
  4562. this.addChild(this.tutorialContianer),
  4563. this.pageNum = 1,
  4564. this.startBt.texture = PIXI.Texture.fromFrame("help_close.png")
  4565. }
  4566. ,
  4567. gc.GameTutorial.prototype.setInteractive = function (t) {
  4568. this.helpnext.interactive = t,
  4569. this.helpperv.interactive = t,
  4570. this.startBt.interactive = t
  4571. }
  4572. ,
  4573. gc.GameTutorial.prototype.updateTransform = function () {
  4574. PIXI.Container.prototype.updateTransform.call(this)
  4575. }
  4576. }
  4577. , function (t, e, i) {
  4578. i(2),
  4579. i(3),
  4580. i(0),
  4581. i(1),
  4582. i(4),
  4583. i(5),
  4584. i(6),
  4585. i(9),
  4586. i(10),
  4587. i(13),
  4588. i(14),
  4589. i(7),
  4590. i(11),
  4591. i(12),
  4592. i(8),
  4593. i(20),
  4594. i(15),
  4595. i(17),
  4596. i(18),
  4597. i(19),
  4598. i(16)
  4599. }
  4600. ]);