1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609 |
- import * as PIXI from './pixi';
- import pixi_spine from './pixi-spine'
- import { TimelineMax, Sine, TweenMax, Elastic, Linear, Back } from './TweenMax.min'
- import GD from './human.min'
- import gc from './GC'
- import NetworkManager from './NetworkManager'
- import DwSdk from "../duowansdk/DwSdk";
- const debug = false;
- const objSdk = GD.objSdk = new DwSdk("旅行消消消", debug);
- var GAME_IMG_PATH = 'https://pub.dwstatic.com/wxgame/puzzletrip/';
- import { pixelRatioX, pixelRatioY, windowWidth, windowHeight } from './fitConfig';
- var gWidth = windowWidth * pixelRatioX
- var gHeight = windowHeight * pixelRatioY
- var CACHE_VER = '0.047';
- var RES_DIR_IMG = GAME_IMG_PATH + 'image/';
- var RES_DIR_JSON = RES_DIR_IMG + 'json/';
- var RES_DIR_PNG = RES_DIR_IMG + 'png/';
- var RES_DIR_SPINE = RES_DIR_IMG + 'spine/';
- var RES_DIR_SOUND = GAME_IMG_PATH + 'sound/';
- var NoHeartPopup, ResultNumberText, loading, lodingOverFlag, flag;
- !function (t) {
- function e(a) {
- if (i[a])
- return i[a].exports;
- var s = i[a] = {
- i: a,
- l: !1,
- exports: {}
- };
- return t[a].call(s.exports, s, s.exports, e),
- s.l = !0,
- s.exports
- }
- var i = {};
- return e.m = t,
- e.c = i,
- e.i = function (t) {
- return t
- }
- ,
- e.d = function (t, i, a) {
- e.o(t, i) || Object.defineProperty(t, i, {
- configurable: !1,
- enumerable: !0,
- get: a
- })
- }
- ,
- e.n = function (t) {
- var i = t && t.__esModule ? function () {
- return t["default"]
- }
- : function () {
- return t
- }
- ;
- return e.d(i, "a", i),
- i
- }
- ,
- e.o = function (t, e) {
- return Object.prototype.hasOwnProperty.call(t, e)
- }
- ,
- e.p = "",
- e(e.s = 21)
- }([function (t, e) {
- gc.DataLoadingView = function () {
- PIXI.Container.call(this)
- }
- ,
- gc.DataLoadingView.constructor = gc.DataLoadingView,
- gc.DataLoadingView.prototype = Object.create(PIXI.Container.prototype),
- gc.DataLoadingView.prototype.init = function () {
- var t = new PIXI.Graphics;
- t.lineStyle(0),
- t.beginFill(0, .7),
- t.drawRect(0, 0, 720, 1190),
- t.endFill(),
- this.addChild(t),
- this.loadCircle = new gc.MovieClip("puzzle_loading000", 1, 7, .5, 0),
- this.loadCircle.anchor.set(.5, .5),
- this.loadCircle.x = GD.width / 2,
- this.loadCircle.y = GD.height / 2,
- this.addChild(this.loadCircle)
- }
- ,
- gc.DataLoadingView.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.Loader = function () {
- PIXI.Container.call(this)
- }
- ,
- gc.Loader.constructor = gc.Loader,
- gc.Loader.prototype = Object.create(PIXI.Container.prototype),
- gc.Loader.prototype.init = function () {
- this.background = null,
- this.loadingBar = null,
- this.ready = !1,
- this.tween = null;
- var t = new PIXI.Graphics;
- t.beginFill(0, 1),
- t.drawRect(0, 0, GD.width, GD.height),
- t.endFill(),
- this.addChild(t);
- for (var e = [], i = 1; 1 >= i; ++i)
- e.push(PIXI.Sprite.fromImage(RES_DIR_IMG + "special_airplane_ani" + i + ".png"));
- this.character = new PIXI.extras.AnimatedSprite(e),
- this.character.loop = !0,
- this.character.animationSpeed = .3,
- this.character.anchor.set(.5),
- this.character.scale.set(.5),
- this.character.x = .5 * GD.width,
- this.character.y = .5 * GD.height,
- this.addChild(this.character),
- this.character.gotoAndStop(0),
- this.count = 0,
- this.tween = TweenMax.to(this.character, .5, {
- y: "-=50",
- repeat: -1,
- yoyo: !0
- })
- }
- ,
- gc.Loader.prototype.killAni = function () {
- try {
- this.tween.kill(!1)
- } catch (t) { }
- }
- ,
- gc.Loader.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.MovieClip = function (t, e, i, a, s) {
- PIXI.extras.AnimatedSprite.call(this, this.getRepeatTexture(t, e, i, s)),
- this.animationSpeed = a,
- this.play()
- }
- ,
- gc.MovieClip.constructor = gc.MovieClip,
- gc.MovieClip.prototype = Object.create(PIXI.extras.AnimatedSprite.prototype),
- gc.MovieClip.prototype.setAnimation = function (t, e, i, a, s) {
- this.textures = this.getRepeatTexture(t, e, i, s),
- this.animationSpeed = a
- }
- ,
- gc.MovieClip.prototype.getRepeatTexture = function (t, e, i, a) {
- for (var s = [], r = a || 1; r--;)
- s = s.concat(this.getTexture(t, e, i));
- return s
- }
- ,
- gc.MovieClip.prototype.getTexture = function (t, e, i) {
- e = e || 1;
- for (var a = [], s = i - e + 1, r = e; s--;)
- a.push(PIXI.Texture.fromFrame(t + r + ".png")),
- r++;
- return a
- }
- ,
- gc.MovieClip.prototype.updateTransform = function () {
- PIXI.extras.AnimatedSprite.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.NumberText = function (t, e, i, a, s, r, n) {
- this.CENTER = "center",
- this.RIGHT = "right",
- this.LEFT = "left",
- this.value = 0,
- this.isChange = !1,
- this.list = [],
- this.tmpList = [],
- this.fileName = t,
- this.align = e,
- this.space = i,
- this.iconName = a,
- this.iconAlign = s,
- this.commaName = r,
- this.iconSpace = n || this.space,
- this.icon = null,
- this.tl = new TimelineMax,
- PIXI.Container.call(this),
- this.container = new PIXI.Container,
- this.addChild(this.container),
- this.setValue(0)
- }
- ,
- gc.NumberText.constructor = gc.NumberText,
- gc.NumberText.prototype = Object.create(PIXI.Container.prototype),
- gc.NumberText.prototype.setValue = function (t) {
- this.value = t,
- this.isChange = !0
- }
- ,
- gc.NumberText.prototype.valueTween = function (t) {
- this.tl.to(this, .5, {
- value: t,
- onUpdate: function () {
- this.value = Math.floor(this.value),
- this.isChange = !0
- }
- .bind(this)
- })
- }
- ,
- gc.NumberText.prototype.getNumberSprite = function (t) {
- var e, i = this.fileName + t + ".png";
- return this.tmpList.length > 0 ? (e = this.tmpList.shift(),
- e.texture = PIXI.Texture.fromFrame(i)) : e = PIXI.Sprite.fromFrame(i),
- e
- }
- ,
- gc.NumberText.prototype.getCommaSprite = function () {
- var t, e = this.commaName + ".png";
- return console.log(e),
- this.tmpList.length > 0 ? (t = this.tmpList.shift(),
- t.texture = PIXI.Texture.fromFrame(e)) : t = PIXI.Sprite.fromFrame(e),
- t
- }
- ,
- gc.NumberText.prototype.removeAll = function () {
- for (var t, e = this.list.length; e--;)
- t = this.list.shift(),
- this.tmpList.push(t);
- this.container && this.container.removeChildren()
- }
- ,
- gc.NumberText.prototype.updateTransform = function () {
- if (this.isChange) {
- this.removeAll();
- var t, e, i = this.commaName ? Util.comma(this.value) : this.value.toString(), a = 0, s = 0, r = i.length;
- for (this.iconName && (this.icon || (this.icon = PIXI.Sprite.fromFrame(this.iconName + ".png")),
- this.container.addChild(this.icon),
- "left" == this.iconAlign && (s += this.icon.width + this.iconSpace)); r--;)
- e = i.substr(a, 1),
- "," == e ? (t = this.getCommaSprite(),
- t.y = 25) : (t = this.getNumberSprite(parseInt(e) + 1),
- t.y = 0),
- t.x = s,
- s += t.width,
- r > 0 && (s += this.space),
- a++ ,
- this.container.addChild(t),
- this.list[r] = t;
- "right" == this.iconAlign && (this.icon.x = s,
- s += this.icon.width + this.iconSpace),
- this.align == this.CENTER ? this.container.x = -s / 2 : this.align == this.RIGHT && (this.container.x = -s),
- this.isChange = !1
- }
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameBuilding = function () {
- PIXI.Container.call(this),
- 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"],
- this.moveTime = 1e3,
- this.Interval = null,
- this.buildingTween1 = null,
- this.buildingTween2 = null,
- this.isMoving = !1,
- this.building1 = PIXI.Sprite.fromFrame(this.buildingArray[1] + ".png"),
- this.building1.anchor.set(.5, 1),
- this.building1.y = this.building1.height + .132 * GD.height,
- this.building1.x = GD.width / 2,
- this.building1.rotation = .268 * Math.PI,
- this.addChild(this.building1),
- this.building2 = PIXI.Sprite.fromFrame(this.buildingArray[1] + ".png"),
- this.building2.anchor.set(.5, 1),
- this.building2.y = this.building2.height + .132 * GD.height,
- this.building2.x = GD.width / 2,
- this.building2.rotation = 0,
- this.addChild(this.building2)
- }
- ,
- gc.GameBuilding.constructor = gc.GameBuilding,
- gc.GameBuilding.prototype = Object.create(PIXI.Container.prototype),
- gc.GameBuilding.prototype.startMove = function () {
- this.isMoving = !0,
- this.resetRotation(),
- this.Interval = setInterval(function () {
- this.resetRotation()
- }
- .bind(this), this.moveTime)
- }
- ,
- gc.GameBuilding.prototype.setBuildingRotation = function () {
- this.building1.rotation = .268 * Math.PI,
- this.building2.rotation = 0
- }
- ,
- gc.GameBuilding.prototype.resetBudingTexture = function (t) {
- this.building1.texture = new PIXI.Texture.fromFrame(this.buildingArray[t] + ".png"),
- this.building2.texture = new PIXI.Texture.fromFrame(this.buildingArray[t] + ".png")
- }
- ,
- gc.GameBuilding.prototype.resetRotation = function () {
- null != this.buildingTween1 && (this.buildingTween1.kill(!1),
- this.buildingTween2.kill(!1)),
- this.building1.rotation <= .26 * -Math.PI && (this.building1.rotation = this.building2.rotation + .268 * Math.PI),
- this.building2.rotation <= .26 * -Math.PI && (this.building2.rotation = this.building1.rotation + .268 * Math.PI);
- var t = this.building1.rotation
- , e = this.building2.rotation;
- t -= .01 * Math.PI,
- e -= .01 * Math.PI,
- this.buildingTween1 = TweenMax.to(this.building1, (this.moveTime - 10) / 1e3, {
- rotation: t,
- ease: Linear.easeNone
- }),
- this.buildingTween2 = TweenMax.to(this.building2, (this.moveTime - 10) / 1e3, {
- rotation: e,
- ease: Linear.easeNone
- })
- }
- ,
- gc.GameBuilding.prototype.resetTime = function (t) {
- 100 >= t && (t = 100),
- this.moveTime = t
- }
- ,
- gc.GameBuilding.prototype.stopInterval = function () {
- this.isMoving = !1,
- null != this.buildingTween1 && null != this.buildingTween2 && (this.buildingTween1.kill(!1),
- this.buildingTween2.kill(!1)),
- clearInterval(this.Interval)
- }
- ,
- gc.GameBuilding.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameEdingPage = function () {
- PIXI.Container.call(this),
- this.endingBg = PIXI.Sprite.fromFrame("ending_bg.png"),
- this.addChild(this.endingBg),
- this.karakter = PIXI.Sprite.fromFrame("ending_cha.png"),
- this.karakter.anchor.set(.5, .5),
- this.karakter.x = GD.width / 2,
- this.karakter.y = .755 * GD.height
- }
- ,
- gc.GameEdingPage.constructor = gc.GameEdingPage,
- gc.GameEdingPage.prototype = Object.create(PIXI.Container.prototype),
- gc.GameEdingPage.prototype.showChaAniamtion = function () {
- TweenMax.from(this.karakter, 1, {
- delay: .2,
- y: GD.height + this.karakter.height,
- onStart: function () {
- this.addChild(this.karakter);
- try {
- clearInterval(this.parent.guidTime)
- } catch (t) { }
- }
- .bind(this),
- ease: Back.easeOut,
- onComplete: function () {
- TweenMax.to(this.karakter, 2, {
- alpha: 1,
- onComplete: function () {
- gc.flag = 0,
- GD.soundAllStop(),
- this.parent.scoreSave()
- }
- .bind(this)
- })
- }
- .bind(this)
- })
- }
- ,
- gc.GameEdingPage.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameGuied = function () {
- PIXI.Container.call(this),
- this.inGuied = !1,
- this.dragPuzzleArray = [],
- this.blockArray = []
- }
- ,
- gc.GameGuied.constructor = gc.GameGuied,
- gc.GameGuied.prototype = Object.create(PIXI.Container.prototype),
- gc.GameGuied.prototype.showGuied = function (t, e) {
- this.removeChildren();
- for (var i = 0; i < t.length && !(i > 2); i++) {
- var a = t[i][0]
- , s = t[i][1]
- , r = new PIXI.Sprite(e[a][s][1].texture);
- r.anchor.set(.5, .5),
- r.x = e[a][s][1].x,
- r.y = e[a][s][1].y,
- this.addChild(r),
- TweenMax.to(r.scale, .3, {
- x: 1.1,
- y: 1.1,
- repeat: -1,
- yoyo: !0
- })
- }
- }
- ,
- gc.GameGuied.prototype.checkCanDragPuzzle = function (t, e) {
- var i = t[0][0]
- , a = t[0][1]
- , s = e[i][a][0];
- this.dragPuzzleArray = [],
- this.dragPuzzleArray.push([i, a]),
- this.blockArray = [];
- for (var r = 0; 6 > r; r++) {
- for (var n = [], o = 0; 7 > o; o++)
- n.push(e[r][o][0]);
- this.blockArray.push(n)
- }
- this.blockArray[i][a] = 0,
- this.newCheckDrag(i - 1, a, s),
- this.newCheckDrag(i + 1, a, s),
- this.newCheckDrag(i, a - 1, s),
- this.newCheckDrag(i, a + 1, s),
- a % 2 == 0 ? (this.newCheckDrag(i + 1, a - 1, s),
- this.newCheckDrag(i + 1, a + 1, s)) : (this.newCheckDrag(i - 1, a - 1, s),
- this.newCheckDrag(i - 1, a + 1, s)),
- this.newCheckDrag(i, a, s)
- }
- ,
- gc.GameGuied.prototype.newCheckDrag = function (t, e, i) {
- 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]),
- this.blockArray[t][e] = 0,
- this.newCheckDrag(t - 1, e, i),
- this.newCheckDrag(t + 1, e, i),
- this.newCheckDrag(t, e - 1, i),
- this.newCheckDrag(t, e + 1, i),
- e % 2 == 0 ? (this.newCheckDrag(t + 1, e - 1, i),
- this.newCheckDrag(t + 1, e + 1, i)) : (this.newCheckDrag(t - 1, e - 1, i),
- this.newCheckDrag(t - 1, e + 1, i)))
- }
- ,
- gc.GameGuied.prototype.removeAll = function () {
- this.removeChildren()
- }
- ,
- gc.GameGuied.prototype.checkPuzzle = function (t) {
- if (!this.inGuied) {
- for (var e = [], i = 5; i >= 0; i--)
- for (var a = 0; 7 > a; a++) {
- var s = t[i][a][0];
- if (s > 5 && 14 > s)
- return e.push([i, a]),
- void this.showGuied(e, t)
- }
- for (var i = 0; 6 > i; i++)
- for (var a = 0; 7 > a; a++) {
- e = [];
- var s = t[i][a][0];
- if (!(s > 14)) {
- if (s > 5 && 14 > s)
- return e.push([i, a]),
- void this.showGuied(e, t);
- if (14 == s) {
- e.push([i, a]);
- var r = []
- , n = []
- , o = []
- , h = []
- , l = []
- , p = [];
- 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])),
- 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])),
- 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])),
- 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])),
- 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])),
- 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])),
- 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]))),
- p.length > 0) {
- if (r.length > 0)
- return e.push([r[0][0], r[0][1]]),
- e.push([p[0][0], p[0][1]]),
- this.showGuied(e, t),
- !0;
- if (n.length > 0)
- return e.push([n[0][0], n[0][1]]),
- e.push([p[0][0], p[0][1]]),
- this.showGuied(e, t),
- !0;
- if (o.length > 0)
- return e.push([o[0][0], o[0][1]]),
- e.push([p[0][0], p[0][1]]),
- this.showGuied(e, t),
- !0;
- if (h.length > 0)
- return e.push([h[0][0], h[0][1]]),
- e.push([p[0][0], p[0][1]]),
- this.showGuied(e, t),
- !0;
- if (l.length > 0)
- return e.push([l[0][0], l[0][1]]),
- e.push([p[0][0], p[0][1]]),
- this.showGuied(e, t),
- !0
- } else {
- if (r.length > 1)
- return e.push([r[0][0], r[0][1]]),
- e.push([r[1][0], r[1][1]]),
- this.showGuied(e, t),
- !0;
- if (n.length > 1)
- return e.push([n[0][0], n[0][1]]),
- e.push([n[1][0], n[1][1]]),
- this.showGuied(e, t),
- !0;
- if (o.length > 1)
- return e.push([o[0][0], o[0][1]]),
- e.push([o[1][0], o[1][1]]),
- this.showGuied(e, t),
- !0;
- if (h.length > 1)
- return e.push([h[0][0], h[0][1]]),
- e.push([h[1][0], h[1][1]]),
- this.showGuied(e, t),
- !0;
- if (l.length > 1)
- return e.push([l[0][0], l[0][1]]),
- e.push([l[1][0], l[1][1]]),
- this.showGuied(e, t),
- !0
- }
- } else {
- e.push([i, a]);
- var u = 0
- , c = 0;
- if (i - 1 >= 0 && (s == t[i - 1][a][0] && (e.push([i - 1, a]),
- u++),
- 14 == t[i - 1][a][0] && (e.push([i - 1, a]),
- c++)),
- 5 >= i + 1 && (s == t[i + 1][a][0] && (e.push([i + 1, a]),
- u++),
- 14 == t[i + 1][a][0] && (e.push([i + 1, a]),
- c++)),
- a - 1 >= 0 && (s == t[i][a - 1][0] && (e.push([i, a - 1]),
- u++),
- 14 == t[i][a - 1][0] && (e.push([i, a - 1]),
- c++)),
- 6 >= a + 1 && (s == t[i][a + 1][0] && (e.push([i, a + 1]),
- u++),
- 14 == t[i][a + 1][0] && (e.push([i, a + 1]),
- c++)),
- a % 2 == 0 ? (a - 1 >= 0 && 5 >= i + 1 && (s == t[i + 1][a - 1][0] && (e.push([i + 1, a - 1]),
- u++),
- 14 == t[i + 1][a - 1][0] && (e.push([i + 1, a - 1]),
- c++)),
- 6 >= a + 1 && 5 >= i + 1 && (s == t[i + 1][a + 1][0] && (e.push([i + 1, a + 1]),
- u++),
- 14 == t[i + 1][a + 1][0] && (e.push([i + 1, a + 1]),
- c++))) : (a - 1 >= 0 && i - 1 >= 0 && (s == t[i - 1][a - 1][0] && (e.push([i - 1, a - 1]),
- u++),
- 14 == t[i - 1][a - 1][0] && (e.push([i - 1, a - 1]),
- c++)),
- 6 >= a + 1 && i - 1 >= 0 && (s == t[i - 1][a + 1][0] && (e.push([i - 1, a + 1]),
- u++),
- 14 == t[i - 1][a + 1][0] && (e.push([i - 1, a + 1]),
- c++))),
- u + c >= 2 && u >= 1)
- return void this.showGuied(e, t);
- e = []
- }
- }
- }
- this.showGuied([], t)
- }
- }
- ,
- gc.GameGuied.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameKariMessage = function () {
- PIXI.Container.call(this),
- this.showMessage = !0,
- this.messageTimer = null,
- this.timeoutTimer = null,
- this.mesTime = 8e3,
- this.removeTime = 4e3,
- 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신발을 만들수 있어."]],
- 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"]],
- this.uiSpeechs2 = ["ui_speech_0015.png", "ui_speech_0016.png", "ui_speech_0017.png", "ui_speech_0018.png"],
- this.messageBg = PIXI.Sprite.fromFrame("ui_speech_0001.png"),
- this.messageBg.x = GD.width / 2,
- this.messageBg.y = .1 * GD.height,
- this.messageBg.anchor.set(.5, .5)
- }
- ,
- gc.GameKariMessage.constructor = gc.GameKariMessage,
- gc.GameKariMessage.prototype = Object.create(PIXI.Container.prototype),
- gc.GameKariMessage.prototype.startMessage = function () {
- this.messageTimer = setInterval(function () {
- this.showMessage && this.startTime()
- }
- .bind(this), this.mesTime)
- }
- ,
- gc.GameKariMessage.prototype.startTime = function () {
- if (!gc.isPaused) {
- var t = Math.floor(1e4 * Math.random()) % 6;
- 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]),
- this.addChild(this.messageBg),
- this.timeoutTimer = setTimeout(function () {
- this.removeChild(this.messageBg)
- }
- .bind(this), this.removeTime)
- }
- }
- ,
- gc.GameKariMessage.prototype.stopAllTime = function () {
- clearInterval(this.messageTimer),
- clearTimeout(this.timeoutTimer)
- }
- ,
- gc.GameKariMessage.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameMainSoundPopup = function () {
- PIXI.Container.call(this),
- this.darkBg = new PIXI.Graphics,
- this.darkBg.lineStyle(1, 0, 1),
- this.darkBg.beginFill(0, .8),
- this.darkBg.drawRect(0, 0, gc.width, gc.height),
- this.darkBg.endFill(),
- this.darkBg.interactive = !0,
- this.setTouchEnd(this.darkBg),
- this.bg = PIXI.Sprite.fromFrame("popup_sound.png"),
- this.bg.anchor.set(.5),
- this.bg.x = GD.width / 2,
- this.bg.y = GD.height / 2,
- this.exitBtn = PIXI.Sprite.fromFrame("btn_exit.png"),
- this.exitBtn.anchor.set(.5),
- this.exitBtn.x = 230,
- this.exitBtn.y = -250,
- this.bg.addChild(this.exitBtn),
- this.bgmBtn = PIXI.Sprite.fromFrame("sound_btn_bg1.png"),
- this.bgmBtn.anchor.set(.5),
- this.bgmBtn.y = -10,
- this.bg.addChild(this.bgmBtn),
- this.effectBtn = PIXI.Sprite.fromFrame("sound_btn_effect1.png"),
- this.effectBtn.anchor.set(.5),
- this.effectBtn.y = 110,
- this.bg.addChild(this.effectBtn),
- this.setTouchStartAction(this.bgmBtn, this.clickedBgmBtn, this),
- this.setTouchStartAction(this.effectBtn, this.clickedEffectBtn, this),
- this.setTouchStart(this.exitBtn, this.closePopup, this)
- }
- ,
- gc.GameMainSoundPopup.constructor = gc.GameMainSoundPopup,
- gc.GameMainSoundPopup.prototype = Object.create(PIXI.Container.prototype),
- gc.GameMainSoundPopup.prototype.init = function () {
- this.removeAll(),
- this.setInteractive(!1),
- this.initBtnSta(),
- this.addChild(this.darkBg),
- this.addChild(this.bg),
- this.bg.scale.set(.1),
- TweenMax.to(this.bg.scale, .2, {
- x: 1,
- y: 1,
- ease: Back.easeOut,
- onComplete: this.endBgMotion.bind(this)
- })
- }
- ,
- gc.GameMainSoundPopup.prototype.endBgMotion = function () {
- this.setInteractive(!0)
- }
- ,
- gc.GameMainSoundPopup.prototype.initBtnSta = function () {
- gc.bgmFlag ? this.bgmBtn.texture = PIXI.Texture.fromFrame("sound_btn_bg1.png") : this.bgmBtn.texture = PIXI.Texture.fromFrame("sound_btn_bg2.png"),
- gc.soundFlag ? this.effectBtn.texture = PIXI.Texture.fromFrame("sound_btn_effect1.png") : this.effectBtn.texture = PIXI.Texture.fromFrame("sound_btn_effect2.png")
- }
- ,
- gc.GameMainSoundPopup.prototype.closePopup = function () {
- this.setInteractive(!1),
- this.removeAll(),
- this.emit("POPUP_CLOSE_EVENT")
- }
- ,
- gc.GameMainSoundPopup.prototype.clickedBgmBtn = function () {
- gc.bgmFlag = !gc.bgmFlag,
- gc.setStorage(gc.storagebgm, gc.bgmFlag),
- this.initBtnSta()
- }
- ,
- gc.GameMainSoundPopup.prototype.clickedEffectBtn = function () {
- gc.soundFlag = !gc.soundFlag,
- gc.setStorage(gc.storagesound, gc.soundFlag),
- gc.soundFlag || gc.stopAllEffectSound(),
- this.initBtnSta()
- }
- ,
- gc.GameMainSoundPopup.prototype.setInteractive = function (t) {
- this.bgmBtn.interactive = t,
- this.effectBtn.interactive = t,
- this.exitBtn.interactive = t
- }
- ,
- gc.GameMainSoundPopup.prototype.removeAll = function () {
- this.removeChildren()
- }
- ,
- gc.GameMainSoundPopup.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GamePlayPage = function () {
- PIXI.Container.call(this),
- this.stoneBlockArray = [0, 0, 2, 0, 3, 0, 3, 0, 4, 0, 4, 0, 5, 0, 6],
- this.stageTurnNum = [0, 40, 40, 60, 60, 75, 75, 75, 75, 80, 80, 80, 80, 85, 85],
- this.turnCountArray = [0, 30, 15, 20, 20, 25, 25, 30, 30, 30, 30, 35, 35, 35, 35, 35],
- this.turnScoreArray = [0, 1500, 1500, 2e3, 2e3, 2500, 2500, 3e3, 3e3, 3500, 3500, 4e3, 4e3, 4500, 4500],
- this.stageStonBlockChance = [0, 0, 10, 0, 10, 0, 10, 0, 15, 0, 15, 0, 15, 0, 20],
- this.countryClearPlusVal = [10, 10, 10, 10, 10, 10, 10],
- this.stageClearBonusSocre = [1500, 2e3, 2500, 3e3, 3500, 4e3, 4500],
- 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"],
- 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"],
- 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"],
- 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]],
- this.sPuzzleStartY = 577,
- this.dPuzzleStartY = 528,
- this.puzzleStartX = 109,
- this.puzzleXSIZE = 7,
- this.puzzleYSIZE = 6,
- this.pXp = 84,
- this.pYp = 95.5,
- this.overAnimationFlag = !1,
- this.itemBombOver = !1,
- this.feverTimeStart = !1,
- this.item6Num = 5,
- this.item12Num = 10,
- this.feverTurnCount = 1,
- this.shipAniTime = .1,
- this.singleShipCount = 0,
- this.trainCount = 0,
- this.moveClipTime = 1.5,
- this.shipClipTime = .3,
- this.copterBombTime = .3,
- this.copterMovieClipTime = 1,
- this.stonClearTime = .2,
- this.trainThrowTime = .2,
- this.shipThrowTime = .2,
- this.planeBombTime = .3,
- this.shipBombBtweenTime = .15,
- this.dropPuzzleCount = 0,
- this.graphics = new PIXI.Graphics,
- this.startTouchX = -1,
- this.startTouchY = -1,
- this.gameOverPopupSprite = PIXI.Sprite.fromFrame("ui_gameover.png"),
- this.gameOverPopupSprite.anchor.set(.5, .5),
- this.gameOverPopupSprite.x = GD.width / 2,
- this.gameOverPopupSprite.y = GD.height / 2,
- this.endingPage = new gc.GameEdingPage,
- this.canDragBg = PIXI.Sprite.fromFrame("puzzle_popup_shadow.png"),
- this.canDragBg.anchor.set(.5),
- this.canDragBg.x = GD.width / 2,
- this.canDragBg.y = 790,
- this.scoreEffect = new gc.GameScoreEffectContianer,
- this.countFlag = 0,
- this.resultBox = new gc.ResultView,
- this.resultBox.on("GOTO_MAINPAGE", function () {
- this.emit("GOTO_MAINPAGE")
- }
- .bind(this))
- }
- ,
- gc.GamePlayPage.constructor = gc.GamePlayPage,
- gc.GamePlayPage.prototype = Object.create(PIXI.Container.prototype),
- gc.GamePlayPage.prototype.init = function () {
- this.removeChildren(),
- "ios" != GD.AGENT && (gc.soundBt.x = .94 * GD.width),
- this.loading = null,
- this.level1 = !1,
- this.level2 = !1,
- this.level3 = !1,
- this.level4 = !1,
- this.moveGaugeMax = 5,
- this.gameStared = !1,
- this.oldTime = 0,
- this.turnCountNum = 0,
- this.turnCountFlag = !1,
- this.stonLevelClearCount = 0,
- this.goldLevelClearCount = 0,
- this.stageStoneBlockNum = 0,
- this.stageNum = 1,
- this.totalClear = this.stageTurnNum[this.stageNum],
- this.totalFlag = this.stageTurnNum[this.stageNum] + this.stageTurnNum[this.stageNum + 1],
- this.gameBaceContiner = new PIXI.Container,
- this.gameMergeAniContiner = new PIXI.Container,
- this.gameLineContiner = new PIXI.Container,
- this.gameEffectContiner = new PIXI.Container,
- this.gameShipEffectContiner = new PIXI.Container,
- this.gameTopEffectContiner = new PIXI.Container,
- this.gameTransportContianer = new PIXI.Container,
- this.karictorContainer = new PIXI.Container,
- this.guiedContainer = new PIXI.Container,
- this.itemLineEffectContainer = new PIXI.Container,
- this.dayAndNightContainer = new PIXI.Container,
- this.topUIContainer = new PIXI.Container,
- this.moveLineContainer = new PIXI.Container,
- this.movePopupContainer = new PIXI.Container,
- this.turnCountMusContiner = new PIXI.Container,
- this.canDragPuzzleContainer = new PIXI.Container,
- this.canDragBgContainer = new PIXI.Container,
- this.darkBgContainer = new PIXI.Container,
- this.overAnimationFlag = !1,
- this.itemBombOver = !1,
- this.feverTimeStart = !1,
- this.turnCount = this.turnCountArray[this.stageNum],
- this.randomBombCount = 15,
- this.totalScore = 0,
- this.totalClearBlockNum = 0,
- this.buildingMoveBlockNum = 0,
- this.puzzleArray = [],
- this.dragedArray = [],
- this.mergeDragedArray = [],
- this.copyDrageArray = [],
- this.bombEffectArray = [],
- this.itemSelectedArray = [],
- this.blockCallBackLists = [],
- this.guiedTime = 0,
- this.trainTypeLR = [],
- this.trainTypeRL = [],
- this.trainTypeDU = [],
- this.effectCallBackLists = [],
- this.sixBombEffectLists = [],
- this.planEffectLists = [],
- this.trainEffectLists = [],
- this.trainEffectSaveLists = [],
- this.trainMoveEffectLists = [],
- this.shipEffectLists = [],
- this.shipEffectSaveLists = [],
- this.shipPointEffectLists = [],
- this.shipMoveEffectLists = [],
- this.shipStartX = 0,
- this.animation = new PIXI.spine.Spine(GD.loader.resources.spineCharacter.spineData),
- this.animation.state.addAnimation(0, "flag_1", !1, 0),
- this.animation.x = GD.width / 2,
- this.animation.y = .31 * GD.height,
- this.normalAnimation = new PIXI.spine.Spine(GD.loader.resources.kariNormal.spineData),
- this.normalAnimation.state.addAnimation(0, "normal_1", !0, 0),
- this.normalAnimation.x = GD.width / 2,
- this.normalAnimation.y = .31 * GD.height,
- this.clearAniSpine = new PIXI.spine.Spine(GD.loader.resources.clearSpine.spineData),
- this.clearAniSpine.state.addAnimation(0, "cha_clear_1", !0, 0),
- this.clearAniSpine.x = GD.width / 2,
- this.clearAniSpine.y = .3 * GD.height,
- this.failAniSpine = new PIXI.spine.Spine(GD.loader.resources.failSpine.spineData),
- this.failAniSpine.state.addAnimation(0, "cha_fail_1", !1, 0),
- this.failAniSpine.x = GD.width / 2,
- this.failAniSpine.y = .3 * GD.height,
- this.gameBlackBG = PIXI.Sprite.fromFrame("puzzle_bg.png"),
- this.gameBlackBG.anchor.y = 1,
- this.gameBlackBG.y = .976 * GD.height,
- this.gameBlackBG.x = 46,
- this.gameLineBG = PIXI.Sprite.fromFrame("puzzle_line.png"),
- this.gameLineBG.x = .108 * GD.width,
- this.gameLineBG.y = .469 * GD.height,
- gc.isLowPhone || (this.addChild(this.gameBlackBG),
- this.addChild(this.gameLineBG)),
- gc.isLowPhone && (this.topLowBG = new PIXI.Sprite(GD.loader.resources.stage1.texture),
- this.topLowBG.scale.set(2),
- this.addChild(this.topLowBG)),
- this.addChild(this.itemLineEffectContainer),
- this.gameBaceContiner.addChild(this.gameShipEffectContiner),
- this.addChild(this.gameBaceContiner),
- gc.isLowPhone || (this.topBG = PIXI.Sprite.fromFrame(this.randMarkArray[this.stageNum] + ".png"),
- this.addChild(this.topBG)),
- this.building = new gc.GameBuilding,
- this.dayCountBG = PIXI.Sprite.fromFrame("ui_move_bg.png"),
- this.dayCountBG.x = .01 * GD.width,
- this.dayCountBG.y = .01 * GD.height,
- this.topUIContainer.addChild(this.dayCountBG),
- this.moveNumber = new gc.NumberText("ui_move1_", "center", -20),
- this.moveNumber.setValue(this.turnCount),
- this.moveNumber.x = 72,
- this.moveNumber.y = 62,
- this.moveNumber.scale.x = .8,
- this.topUIContainer.addChild(this.moveNumber),
- this.moveGauge = PIXI.Sprite.fromFrame("ui_move_gauge.png"),
- this.moveGauge.x = 31.5,
- this.moveGauge.y = 130.5,
- this.topUIContainer.addChild(this.moveGauge),
- this.moveGaugeMask = new PIXI.Graphics,
- this.moveGaugeMask.lineStyle(0, 255, 0),
- this.moveGaugeMask.beginFill(16740363, 1),
- this.moveGaugeMask.drawRect(30, 130, 84, 15),
- this.moveGaugeMask.endFill(),
- this.topUIContainer.addChild(this.moveGaugeMask),
- this.moveGauge.mask = this.moveGaugeMask,
- this.moveGaugeMask.x = 0,
- this.addChild(this.gameTopEffectContiner),
- gc.isLowPhone || (this.gameEarth = PIXI.Sprite.fromFrame(this.groundArray[this.stageNum] + ".png"),
- this.gameEarth.y = GD.height - this.gameEarth.height,
- this.addChild(this.gameEarth)),
- gc.isLowPhone || this.addChild(this.building),
- this.turnBarBG = PIXI.Sprite.fromFrame("ui_distance_bar.png"),
- this.turnBarBG.x = (GD.width - this.turnBarBG.width) / 2,
- this.turnBarBG.y = .36 * GD.height,
- this.topUIContainer.addChild(this.turnBarBG),
- this.turnBar = PIXI.Sprite.fromFrame("ui_distance_gauge.png"),
- this.turnBar.x = this.turnBarBG.x + 14,
- this.turnBar.y = this.turnBarBG.y + 14,
- this.turnBar.scale.x = 1,
- this.topUIContainer.addChild(this.turnBar),
- this.turnBarMask = new PIXI.Graphics,
- this.turnBarMask.lineStyle(2, 255, 1),
- this.turnBarMask.beginFill(16740363, 1),
- this.turnBarMask.drawRect(110, 410, 500, 40),
- this.turnBarMask.endFill(),
- this.turnBar.mask = this.turnBarMask,
- this.topUIContainer.addChild(this.turnBarMask),
- this.turnBarMask.x = -500,
- this.overFlag = new gc.MovieClip("ui_distance_flag000", 1, 6, .5, 0),
- this.overFlag.loop = !0,
- this.overFlag.anchor.set(.5, 0),
- this.overFlag.x = this.turnBarBG.x + this.turnBarBG.width,
- this.overFlag.y = this.turnBarBG.y - 50,
- this.topUIContainer.addChild(this.overFlag),
- this.overFlag.stop(),
- this.turnBarRod = PIXI.Sprite.fromFrame("ui_distance_position.png"),
- this.turnBarRod.anchor.x = .5,
- this.turnBarRod.x = this.turnBarMask.x + 610,
- this.turnBarRod.y = this.turnBarBG.y - 20,
- this.topUIContainer.addChild(this.turnBarRod),
- this.initPuzzle(),
- this.karictorContainer.addChild(this.normalAnimation),
- this.popUp = new gc.GamePopup,
- this.gameStageClearPopup = new gc.GameStageClearPopup,
- this.scoreNumberText = new gc.NumberText("ui_score_", "center", -10),
- this.scoreNumberText.setValue(0),
- this.scoreNumberText.x = (GD.width - this.scoreNumberText.width) / 2,
- this.scoreNumberText.y = .01 * GD.height,
- this.topUIContainer.addChild(this.scoreNumberText),
- this.addChild(this.gameTransportContianer),
- this.addChild(this.popUp),
- this.popUp.showPopup(0),
- this.messageText = new gc.GameKariMessage,
- this.moveLineSpine = new PIXI.spine.Spine(GD.loader.resources.moveLineSpine.spineData),
- this.moveLineSpine.state.addAnimation(0, "animation", !0, 0),
- this.moveLineSpine.x = 72,
- this.moveLineSpine.y = 90,
- this.move5CountPopup = PIXI.Sprite.fromFrame("ui_notice_2.png"),
- this.move5CountPopup.anchor.set(.5, .5),
- this.move5CountPopup.x = GD.width / 2,
- this.move5CountPopup.y = .7 * GD.height,
- this.move5CountPopup.flag = !1,
- this.topUIContainer.addChild(this.moveLineContainer),
- this.topUIContainer.addChild(this.movePopupContainer),
- this.daytonightSprite = PIXI.Sprite.fromFrame("level_next_0001.png"),
- this.addChild(this.dayAndNightContainer),
- this.loadingShow(),
- this.pointUseCheck(),
- this.scoreInterval = null,
- this.aniScore = 0,
- gc.isLowPhone || this.addChild(this.karictorContainer),
- "ios" != GD.AGENT && (GD.bgmStop(),
- gc.bgmFlag && GD.bgmPlay(1))
- }
- ,
- gc.GamePlayPage.prototype.loadingShow = function () {
- null == this.loading && (this.loading = new gc.DataLoadingView,
- GD.stage.addChild(this.loading),
- this.loading.init())
- }
- ,
- gc.GamePlayPage.prototype.loadingHide = function () {
- null != this.loading && (GD.stage.removeChild(this.loading),
- this.loading = null)
- }
- ,
- gc.GamePlayPage.prototype.pointUseCheck = function () {
- return gc.game_idx = null,
- this.loadingHide(),
- this.gameStared = !0,
- void NetworkManager.sendData2("gameStart", {
- gameId: gc.gameId,
- type: gc.gameType
- }, this.gameStartResult, this)
- }
- ,
- gc.GamePlayPage.prototype.gameStartResult = function (t) {
- t = t || {}
- t.result ? (gc.game_idx = t.game_idx,
- gc.startDatetime = t.start_datetime) : (gc.game_idx = null,
- gc.startDatetime = null)
- }
- ,
- gc.GamePlayPage.prototype.pointUseCheckResult = function (t) {
- gc.localTest || (gc.playSeq = t.result.playSeq),
- console.log("pointUseCheckResult"),
- this.loadingHide(),
- this.gameStared = !0
- }
- ,
- gc.GamePlayPage.prototype.setTurnCountFlag = function (t) {
- t ? this.turnCountFlag = !0 : this.turnCountFlag = !1,
- this.turnCountNum = 0,
- this.moveGaugeMask.x = 0,
- this.moveGaugeTween && this.moveGaugeTween.kill(!1)
- }
- ,
- gc.GamePlayPage.prototype.startGame = function () {
- this.initTouch(),
- this.addChild(this.darkBgContainer),
- this.addChild(this.canDragBgContainer),
- this.addChild(this.canDragPuzzleContainer),
- this.addChild(this.gameMergeAniContiner),
- this.addChild(this.gameLineContiner),
- this.addChild(this.messageText),
- this.messageText.startMessage(),
- this.addChild(this.guiedContainer),
- this.test = new gc.GameGuied,
- this.guiedContainer.addChild(this.test),
- this.addChild(this.topUIContainer),
- this.addChild(this.gameEffectContiner),
- this.scoreEffect.init(),
- this.addChild(this.scoreEffect),
- this.addChild(this.turnCountMusContiner),
- this.addChild(this.gameStageClearPopup),
- this.gameBaceContiner.interactive = !0,
- this.guidTime = setInterval(function () {
- if (this.gameStared && !gc.isPaused) {
- var t = (new Date).getTime();
- t - this.guiedTime > 5e3 && 0 == this.dragedArray.length && (this.test.checkPuzzle(this.puzzleArray),
- this.test.inGuied = !0),
- this.turnCountFlag && (this.turnCountNum++ ,
- this.moveGaugeDc())
- }
- }
- .bind(this), 1e3),
- this.guiedTime = (new Date).getTime()
- }
- ,
- gc.GamePlayPage.prototype.moveGaugeDc = function () {
- var t = !1;
- if (this.turnCountNum >= this.moveGaugeMax && (t = !0,
- this.moveGaugeMask.x = 0,
- this.turnCountNum = 1,
- this.turnCount > 0))
- if (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvminus"),
- this.turnCount-- ,
- this.showTurnMusAnimation(),
- this.moveNumber.setValue(this.turnCount),
- this.turnCount <= 0)
- this.setTurnCountFlag(!1),
- this.gameover();
- else if (this.turnCount <= 5)
- try {
- this.moveNumber.fileName = "ui_move3_",
- this.moveLineContainer.removeChildren(),
- gc.isLowPhone || this.moveLineContainer.addChild(this.moveLineSpine),
- this.move5CountPopup.flag || (this.move5CountPopup.flag = !0,
- this.move5CountPopupAnimation())
- } catch (e) { }
- 1 == this.turnCountNum && (this.moveGaugeTween && this.moveGaugeTween.kill(!1),
- this.moveGaugeTween = TweenMax.to(this.moveGaugeMask, 3.8, {
- x: -83,
- onComplete: function () { }
- .bind(this),
- ease: Linear.easeInOut
- }))
- }
- ,
- gc.GamePlayPage.prototype.showTurnMusAnimation = function () {
- var t = PIXI.Sprite.fromFrame("move_minus0001.png");
- t.anchor.set(.5, .5),
- t.scale.x = .7,
- t.scale.y = .7,
- t.x = 70,
- t.y = 100,
- this.turnCountMusContiner.addChild(t),
- TweenMax.to(t, .5, {
- y: "-=60",
- onComplete: function (t) {
- this.turnCountMusContiner.removeChild(t)
- }
- .bind(this),
- onCompleteParams: [t]
- })
- }
- ,
- gc.GamePlayPage.prototype.resumeGame = function () {
- TweenMax.resumeAll()
- }
- ,
- gc.GamePlayPage.prototype.pauseGame = function () {
- TweenMax.pauseAll()
- }
- ,
- gc.GamePlayPage.prototype.popupCloseCallBack = function (t) {
- 4 != t && this.removeChild(this.popUp),
- 0 == t ? (this.addChild(this.popUp),
- this.popUp.showPopup(6)) : 1 == t ? (this.setTurnCountFlag(!0),
- this.gameBaceContiner.interactive = !0) : 2 == t ? this.showStageTunrPlusAnimation() : 3 == t ? (TweenMax.killAll(!1),
- gc.flag = 0,
- GD.soundAllStop(),
- clearInterval(this.guidTime),
- this.messageText.stopAllTime(),
- this.removeChild(this.messageText),
- gc.isLowPhone || this.building.stopInterval(),
- this.gameStared = !1,
- this.showEndingPage()) : 4 == t ? (TweenMax.killAll(!1),
- gc.flag = 0,
- GD.soundAllStop(),
- gc.gameOver = !0,
- clearInterval(this.guidTime),
- this.messageText.stopAllTime(),
- this.removeChild(this.messageText),
- gc.isLowPhone || this.building.stopInterval(),
- this.gameStared = !1,
- this.scoreSave()) : 5 == t ? this.gameOverItemBomb() : 6 == t ? (this.startGame(),
- this.setTurnCountFlag(!0)) : (this.feverTimeStart = !1,
- gc.isLowPhone || (this.building.resetTime(1e3),
- this.building.stopInterval(),
- this.building.resetBudingTexture(this.stageNum)),
- this.dropPuzzleAnimation())
- }
- ,
- gc.GamePlayPage.prototype.setScoreInterval = function () {
- null == this.scoreInterval && (this.scoreInterval = setInterval(function () {
- this.aniScore >= this.totalScore ? (clearInterval(this.scoreInterval),
- this.scoreInterval = null) : (this.aniScore += 100,
- this.scoreNumberText.setValue(this.aniScore))
- }
- .bind(this), 30))
- }
- ,
- gc.GamePlayPage.prototype.reStartGame = function () {
- this.moveNumber.fileName = "ui_move1_",
- this.messageText.showMessage = !0;
- var t = Math.floor(this.stageNum / 2) + 1;
- this.karictorContainer.removeChildren(),
- this.normalAnimation.state.setAnimation(0, "normal_" + t, !0, 0),
- this.normalAnimation.skeleton.setToSetupPose(),
- this.karictorContainer.addChild(this.normalAnimation),
- this.karictorContainer.removeChild(this.clearAniSpine),
- this.addChild(this.messageText),
- this.stageNum++ ,
- this.stageStoneBlockNum = 0,
- this.buildingMoveBlockNum = 0,
- this.totalClearBlockNum = 0,
- this.turnBar.scale.x = 1e-4,
- this.turnBarRod.x = this.turnBar.x + this.turnBar.width,
- gc.isLowPhone || (this.building.resetBudingTexture(this.stageNum),
- this.building.setBuildingRotation());
- var e = this.randMarkArray[this.stageNum] + ".png";
- gc.isLowPhone ? this.topLowBG.texture = GD.loader.resources["stage" + this.stageNum].texture : this.topBG.texture = PIXI.Texture.fromFrame(e),
- gc.isLowPhone || (this.gameEarth.texture = PIXI.Texture.fromFrame(this.groundArray[this.stageNum] + ".png")),
- this.turnCount = this.turnCountArray[this.stageNum],
- this.overAnimationFlag = !1,
- this.moveNumber.setValue(this.turnCount)
- }
- ,
- gc.GamePlayPage.prototype.stageChangeRedarwPuzzle = function () {
- for (var t = 0; 6 > t; t++)
- for (var e = 0; 7 > e; e++)
- this.puzzleArray[t][e][1].alpha = 0
- }
- ,
- gc.GamePlayPage.prototype.dropPuzzleAnimation = function () {
- for (var t = 0; 7 > t; t++)
- for (var e = 0; 6 > e; e++) {
- var i = Math.floor(100 * Math.random()) % 5 + 1;
- 0 == e && 0 == t && (i = 1),
- 0 == e && 1 == t && (i = 1),
- 0 == e && 2 == t && (i = 1),
- this.puzzleArray[e][t][0] = i;
- var a = this.blockNameArray[this.stageNum] + i + ".png";
- this.puzzleArray[e][t][1].texture = new PIXI.Texture.fromFrame(a),
- this.puzzleArray[e][t][2] = 0,
- this.puzzleArray[e][t][1].alpha = 1;
- var s = this.puzzleArray[e][t][1].y - 660;
- 6 == t && 5 == e ? TweenMax.from(this.puzzleArray[e][t][1], .5, {
- y: s,
- onComplete: function () {
- this.gameBaceContiner.interactive = !0,
- this.guiedTime = (new Date).getTime(),
- this.test.inGuied = !1,
- this.setTurnCountFlag(!0)
- }
- .bind(this)
- }) : TweenMax.from(this.puzzleArray[e][t][1], .5, {
- y: s
- })
- }
- }
- ,
- gc.GamePlayPage.prototype.resetMovePuzzleImg = function (t) {
- for (var e = 0; 6 > e; e++)
- for (var i = 0; 7 > i; i++)
- 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"))
- }
- ,
- gc.GamePlayPage.prototype.initTouch = function () {
- this.gameBaceContiner.interactive = !0,
- this.gameBaceContiner.mousedown = this.gameBaceContiner.touchstart = function (t) {
- t.stopPropagation();
- var e = t.data.getLocalPosition(this.parent)
- , i = this.getTouchPosition(e);
- if (!(i[1] > 5 || i[1] < 0 || i[0] < 0 || i[0] > 6)) {
- if (this.test.inGuied && (this.test.removeAll(),
- this.test.inGuied = !1),
- this.guiedTime = (new Date).getTime(),
- this.puzzleArray[i[1]][i[0]][0] > 5 && this.puzzleArray[i[1]][i[0]][0] < 14)
- return this.itemLineEffectContainer.removeChildren(),
- this.clickedItemBlock(i[1], i[0]),
- void (this.gameBaceContiner.interactive = !1);
- if (!(i[0] >= 0 && i[0] <= 6 && i[1] >= 0 && i[1] <= 5 && 0 == this.dragedArray.length))
- return this.startTouchX = -1,
- void (this.startTouchY = -1);
- this.startTouchX = i[0],
- this.startTouchY = i[1],
- this.dragedArray.push(this.puzzleArray[i[1]][i[0]]);
- var a = PIXI.Sprite.fromFrame("puzzle_effect_bg.png");
- a.anchor.set(.5, .5),
- a.x = this.dragedArray[0][1].x,
- a.y = this.dragedArray[0][1].y,
- this.puzzleArray[i[1]][i[0]][0] > 5 || gc.isLowPhone ? this.gameShipEffectContiner.addChild(a) : (this.showCanDragPuzzle(this.puzzleArray[i[1]][i[0]]),
- this.canDragBgContainer.addChild(a));
- var s = PIXI.Sprite.fromFrame("puzzle_effect_select.png");
- s.anchor.set(.5, .5),
- s.x = this.dragedArray[0][1].x,
- s.y = this.dragedArray[0][1].y,
- this.gameLineContiner.addChild(s)
- }
- }
- .bind(this),
- this.gameBaceContiner.mousemove = this.gameBaceContiner.touchmove = function (t) {
- if (this.startTouchX >= 0 && this.startTouchY >= 0) {
- var e = t.data.getLocalPosition(this.parent)
- , i = this.getTouchPosition(e);
- 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) {
- for (var a = -1, s = 0; s < this.dragedArray.length; s++)
- if (this.dragedArray[s][1] == this.puzzleArray[i[1]][i[0]][1]) {
- a = s;
- break
- }
- -1 != a ? (this.dragedArray.splice(a + 1, this.dragedArray.length - a - 1),
- this.startTouchX = i[0],
- this.startTouchY = i[1],
- 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]]),
- this.dragedArray.length <= 10 ? gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_drag0" + this.dragedArray.length) : gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_drag_max"),
- this.startTouchX = i[0],
- this.startTouchY = i[1],
- this.drawDragEffect())
- }
- }
- }
- .bind(this),
- this.gameBaceContiner.mouseup = this.gameBaceContiner.touchend = this.gameBaceContiner.mouseupoutside = this.gameBaceContiner.touchendoutside = this.gameBaceContiner.pointerupoutside = function (t) {
- t.stopPropagation(),
- this.guiedTime = (new Date).getTime(),
- this.gameLineContiner.removeChildren(),
- this.gameShipEffectContiner.removeChildren(),
- this.canDragBgContainer.removeChildren(),
- this.closeCanDragPuzzle(),
- gc.isPaused || this.drawDragPuzzle(),
- this.startTouchX = -1,
- this.startTouchY = -1,
- this.dragedArray = []
- }
- .bind(this)
- }
- ,
- gc.GamePlayPage.prototype.move5CountPopupAnimation = function () {
- try {
- TweenMax.kill(this.movePopupTween)
- } catch (t) { }
- this.movePopupContainer.removeChildren(),
- this.movePopupContainer.addChild(this.move5CountPopup),
- this.movePopupTween = TweenMax.delayedCall(1, function () {
- this.movePopupContainer.removeChildren()
- }
- .bind(this))
- }
- ,
- gc.GamePlayPage.prototype.showCanDragPuzzle = function (t) {
- var e = t[0];
- if (5 >= e) {
- this.darkBgContainer.addChild(this.canDragBg);
- for (var i = 0; i < this.puzzleArray.length; i++)
- for (var a = 0; a < this.puzzleArray[i].length; a++)
- e == this.puzzleArray[i][a][0] && this.canDragPuzzleContainer.addChild(this.puzzleArray[i][a][1])
- }
- }
- ,
- gc.GamePlayPage.prototype.closeCanDragPuzzle = function () {
- this.darkBgContainer.removeChildren();
- var t = null;
- try {
- for (var e = this.canDragPuzzleContainer.children.length - 1; e >= 0; e--)
- t = this.canDragPuzzleContainer.getChildAt(e),
- this.canDragPuzzleContainer.removeChild(t),
- this.gameBaceContiner.addChild(t)
- } catch (i) { }
- }
- ,
- gc.GamePlayPage.prototype.clickedItemBlock = function (t, e) {
- this.guiedTime = (new Date).getTime(),
- 14 == this.puzzleArray[t][e][0] ? (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvplus"),
- this.totalScore += 333,
- this.turnCount++ ,
- this.turnCount > 5 && (this.moveLineContainer.removeChildren(),
- this.moveNumber.fileName = "ui_move1_"),
- this.timeAddAnimation(t, e, 1),
- this.puzzleArray[t][e][1].alpha = 0,
- this.puzzleArray[t][e][0] = 0,
- this.reDarwPuzzle()) : this.itemSelectedFun(this.puzzleArray[t][e][0], [e, t])
- }
- ,
- gc.GamePlayPage.prototype.drawLine = function () {
- this.graphics.clear(),
- this.gameLineContiner.removeChildren();
- for (var t = 0; t < this.dragedArray.length - 1; t++)
- this.graphics.beginFill(0),
- this.graphics.lineStyle(3, 39423, 10),
- this.graphics.moveTo(this.dragedArray[t][1].x, this.dragedArray[t][1].y),
- this.graphics.lineTo(this.dragedArray[t + 1][1].x, this.dragedArray[t + 1][1].y),
- this.graphics.endFill();
- this.gameLineContiner.addChild(this.graphics)
- }
- ,
- gc.GamePlayPage.prototype.drawDragEffect = function () {
- this.gameShipEffectContiner.removeChildren(),
- this.canDragBgContainer.removeChildren(),
- this.gameLineContiner.removeChildren();
- for (var t = 0; t < this.dragedArray.length; t++) {
- if (t != this.dragedArray.length - 1 && this.dragedArray.length > 1) {
- 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)
- , i = PIXI.Sprite.fromFrame("puzzle_effect_line.png");
- i.anchor.set(0, .5),
- i.scale.x = .9,
- i.rotation = e,
- i.x = this.dragedArray[t][1].x,
- i.y = this.dragedArray[t][1].y,
- this.gameLineContiner.addChild(i)
- }
- var a = PIXI.Sprite.fromFrame("puzzle_effect_bg.png");
- a.anchor.set(.5, .5),
- a.x = this.dragedArray[t][1].x,
- a.y = this.dragedArray[t][1].y,
- gc.isLowPhone ? this.gameShipEffectContiner.addChild(a) : this.canDragBgContainer.addChild(a);
- var s = PIXI.Sprite.fromFrame("puzzle_effect_select.png");
- s.anchor.set(.5, .5),
- s.x = this.dragedArray[t][1].x,
- s.y = this.dragedArray[t][1].y,
- this.gameLineContiner.addChild(s)
- }
- }
- ,
- gc.GamePlayPage.prototype.checkDragRotation = function (t, e, i, a) {
- var s = 0
- , r = Math.abs(Math.pow(t - i, 2) + Math.pow(e - a, 2));
- r = Math.sqrt(r);
- var n = Math.abs(t - i)
- , o = Math.acos(n / r);
- return s = t >= i && e >= a ? -Math.PI + o : t >= i && a >= e ? -Math.PI - o : i >= t && e >= a ? -o : o
- }
- ,
- gc.GamePlayPage.prototype.newReDarwPuzzle = function () {
- for (var t = 0; 6 > t; t++)
- for (var e = 0; 7 > e; e++)
- 0 == this.puzzleArray[t][e][0] && this.gameBaceContiner.removeChild(this.puzzleArray[t][e][1]);
- for (var t = 0; 7 > t; t++) {
- for (var i = 0, e = 5; e >= 0; e--) {
- if (i > 0 && 0 != this.puzzleArray[e][t][0]) {
- this.puzzleArray[e + i][t][0] = this.puzzleArray[e][t][0];
- var a = this.puzzleArray[e + i][t][1].y;
- this.puzzleArray[e + i][t][1] = this.puzzleArray[e][t][1],
- this.puzzleArray[e + i][t][1].alpha = 1,
- this.puzzleArray[e + i][t][2] = this.puzzleArray[e][t][2],
- this.dropPuzzleCount++ ,
- TweenMax.to(this.puzzleArray[e][t][1], .2, {
- y: a,
- onComplete: function () {
- this.dropPuzzleCount-- ,
- 0 == this.dropPuzzleCount && this.newCheckNextItemBlock()
- }
- .bind(this)
- })
- }
- 0 == this.puzzleArray[e][t][0] && i++
- }
- for (var s = 0; i > s; s++) {
- this.stageStoneBlockNum < 0 && (this.stageStoneBlockNum = 0);
- var r = 0;
- if (this.stageStoneBlockNum < this.stoneBlockArray[this.stageNum])
- if (100 * Math.random() < 50)
- r = Math.floor(100 * Math.random()) % 5 + 1;
- else {
- var n = 100 * Math.random();
- 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)
- }
- else
- r = Math.floor(100 * Math.random()) % 5 + 1;
- r > 14 && this.stageStoneBlockNum++ ,
- 0 == r && (r = 1),
- this.puzzleArray[s][t][0] = r,
- 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"),
- this.puzzleArray[s][t][1].anchor.set(.5, .5),
- 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,
- this.puzzleArray[s][t][1].x = this.puzzleStartX + t * this.pXp,
- this.gameBaceContiner.addChild(this.puzzleArray[s][t][1]),
- this.puzzleArray[s][t][1].alpha = 1,
- this.puzzleArray[s][t][2] = 0;
- var o = this.puzzleArray[s][t][1].y - (i + 1) * this.pYp;
- this.dropPuzzleCount++ ,
- TweenMax.from(this.puzzleArray[s][t][1], .2, {
- y: o,
- onComplete: function () {
- this.dropPuzzleCount-- ,
- 0 == this.dropPuzzleCount && this.newCheckNextItemBlock()
- }
- .bind(this)
- })
- }
- }
- }
- ,
- gc.GamePlayPage.prototype.reDarwPuzzle = function () {
- for (var t = 0; 6 > t; t++)
- for (var e = 0; 7 > e; e++)
- 0 == this.puzzleArray[t][e][0] && this.gameBaceContiner.removeChild(this.puzzleArray[t][e][1]);
- for (var t = 0; 7 > t; t++) {
- for (var i = 0, e = 5; e >= 0; e--) {
- if (i > 0 && 0 != this.puzzleArray[e][t][0]) {
- this.puzzleArray[e + i][t][0] = this.puzzleArray[e][t][0];
- var a = this.puzzleArray[e + i][t][1].y;
- this.puzzleArray[e + i][t][1] = this.puzzleArray[e][t][1],
- this.puzzleArray[e + i][t][1].alpha = 1,
- this.puzzleArray[e + i][t][2] = this.puzzleArray[e][t][2],
- this.dropPuzzleCount++ ,
- TweenMax.to(this.puzzleArray[e][t][1], .2, {
- y: a,
- onComplete: function () {
- this.dropPuzzleCount-- ,
- 0 == this.dropPuzzleCount && this.dropPuzzleOver()
- }
- .bind(this)
- })
- }
- 0 == this.puzzleArray[e][t][0] && i++
- }
- for (var s = 0; i > s; s++) {
- this.stageStoneBlockNum < 0 && (this.stageStoneBlockNum = 0);
- var r = 0;
- if (this.stageStoneBlockNum < this.stoneBlockArray[this.stageNum]) {
- var n = this.stageStonBlockChance[this.stageNum];
- if (100 * Math.random() < 100 - n)
- r = Math.floor(100 * Math.random()) % 5 + 1;
- else {
- var o = 100 * Math.random();
- 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)
- }
- } else
- r = Math.floor(100 * Math.random()) % 5 + 1;
- r > 14 && this.stageStoneBlockNum++ ,
- 0 == r && (r = 1),
- this.puzzleArray[s][t][0] = r,
- 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"),
- this.puzzleArray[s][t][1].anchor.set(.5, .5),
- 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,
- this.puzzleArray[s][t][1].x = this.puzzleStartX + t * this.pXp,
- this.gameBaceContiner.addChild(this.puzzleArray[s][t][1]),
- this.puzzleArray[s][t][1].alpha = 1,
- this.puzzleArray[s][t][2] = 0;
- var h = this.puzzleArray[s][t][1].y - (i + 1) * this.pYp;
- gc.isLowPhone && (h = t % 2 == 0 ? this.sPuzzleStartY - this.pYp : this.dPuzzleStartY - this.pYp),
- this.dropPuzzleCount++ ,
- TweenMax.from(this.puzzleArray[s][t][1], .2, {
- y: h,
- onComplete: function () {
- this.dropPuzzleCount-- ,
- 0 == this.dropPuzzleCount && this.dropPuzzleOver()
- }
- .bind(this)
- })
- }
- }
- }
- ,
- gc.GamePlayPage.prototype.gameOverPopupAnimation = function () {
- this.addChild(this.popUp),
- this.popUp.showPopup(4)
- }
- ,
- gc.GamePlayPage.prototype.showStageTunrPlusAnimation = function () {
- this.newStageChange()
- }
- ,
- gc.GamePlayPage.prototype.newShowTurnPlusBring = function () {
- var t = PIXI.Sprite.fromFrame("special1_effect_0008.png");
- t.anchor.set(.5),
- t.x = 50,
- t.y = 100,
- this.addChild(t),
- TweenMax.to(t, .2, {
- alpha: .2,
- onComplete: function () {
- this.removeChild(t),
- t = null
- }
- .bind(this),
- onCompleteParams: [t]
- })
- }
- ,
- gc.GamePlayPage.prototype.newStageChange = function () {
- if (14 == this.stageNum)
- return this.totalScore += 1111 * this.turnCount,
- this.scoreNumberText.valueTween(this.totalScore),
- TweenMax.killAll(!1),
- gc.flag = 0,
- GD.soundAllStop(),
- clearInterval(this.guidTime),
- this.messageText.stopAllTime(),
- this.removeChild(this.messageText),
- gc.isLowPhone || this.building.stopInterval(),
- this.gameStared = !1,
- void this.showEndingPage();
- this.totalClear = this.stageTurnNum[this.stageNum],
- this.totalClearBlockNum = 0,
- this.totalFlag = this.stageTurnNum[this.stageNum] + this.stageTurnNum[this.stageNum + 1],
- gc.isLowPhone || this.building.resetBudingTexture(this.stageNum);
- var t = this.randMarkArray[this.stageNum] + ".png";
- gc.isLowPhone ? this.topLowBG.texture = GD.loader.resources["stage" + this.stageNum].texture : this.topBG.texture = PIXI.Texture.fromFrame(t),
- gc.isLowPhone || (this.gameEarth.texture = PIXI.Texture.fromFrame(this.groundArray[this.stageNum] + ".png"));
- var e = Math.floor((this.stageNum + 1) / 2);
- this.normalAnimation.state.setAnimation(0, "normal_" + e, !0, 0),
- this.normalAnimation.skeleton.setToSetupPose(),
- this.moveNumber.fileName = "ui_move1_";
- try {
- this.moveLineContainer.removeChildren(),
- this.move5CountPopup.flag = !1
- } catch (i) { }
- this.turnBarMask.x = -500,
- this.turnBarRod.x = this.turnBarMask.x + 610,
- this.addChild(this.popUp),
- this.popUp.showPopup(1)
- }
- ,
- gc.GamePlayPage.prototype.newClearStage = function () {
- if (this.setTurnCountFlag(!1),
- 14 == this.stageNum) {
- var t = Math.ceil(this.stageNum / 2) - 1;
- return this.totalScore += this.stageClearBonusSocre[t],
- this.scoreNumberText.valueTween(this.totalScore),
- this.gameStageClearPopup.show(this.countryClearPlusVal[t], this.stageClearBonusSocre[t]),
- TweenMax.from(this.gameStageClearPopup.bg.scale, .5, {
- x: .2,
- y: .2
- }),
- void TweenMax.to(this.gameStageClearPopup, 2.5, {
- alpha: 1,
- onComplete: function () {
- this.gameStageClearPopup.remove(),
- this.addChild(this.popUp),
- this.popUp.showPopup(2)
- }
- .bind(this)
- })
- }
- if (this.stageNum % 2 == 1)
- this.stageNum++ ,
- this.totalClear += this.stageTurnNum[this.stageNum],
- this.moveNumber.fileName = "ui_move1_",
- this.moveNumber.setValue(this.turnCount),
- this.changeStageBGAnimation(),
- this.gameBaceContiner.interactive = !0,
- this.setTurnCountFlag(!0);
- else {
- this.stageNum++ ,
- this.turnBar.scale.x = 1,
- this.turnBarRod.x = this.turnBarMask.x + 610,
- TweenMax.killAll(!0),
- this.buildingMoveBlockNum = 0;
- var t = Math.ceil((this.stageNum - 1) / 2) - 1;
- this.totalScore += this.stageClearBonusSocre[t],
- this.scoreNumberText.valueTween(this.totalScore),
- this.turnCount += this.countryClearPlusVal[t],
- this.moveNumber.fileName = "ui_move1_",
- this.moveNumber.setValue(this.turnCount),
- this.gameStageClearPopup.show(this.countryClearPlusVal[t], this.stageClearBonusSocre[t]),
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_camera"),
- gc.isLowPhone ? setTimeout(function () {
- this.gameStageClearPopup.remove(),
- this.popupCloseCallBack(2)
- }
- .bind(this), 2e3) : (TweenMax.from(this.gameStageClearPopup.bg.scale, .5, {
- x: .2,
- y: .2
- }),
- TweenMax.to(this.gameStageClearPopup, 2.5, {
- alpha: 1,
- onComplete: function () {
- this.gameStageClearPopup.remove(),
- this.popupCloseCallBack(2)
- }
- .bind(this)
- }))
- }
- }
- ,
- gc.GamePlayPage.prototype.changeStageBGAnimation = function () {
- gc.isLowPhone ? this.topLowBG.texture = GD.loader.resources["stage" + this.stageNum].texture : (TweenMax.to(this.building, 1, {
- alpha: .3,
- ease: Linear.easeInOut
- }),
- TweenMax.to(this.topBG, 1, {
- alpha: .3,
- ease: Linear.easeInOut
- }),
- TweenMax.to(this.gameEarth, 1, {
- alpha: .3,
- onComplete: function () {
- this.building.resetBudingTexture(this.stageNum);
- var t = this.randMarkArray[this.stageNum] + ".png";
- this.topBG.texture = PIXI.Texture.fromFrame(t),
- this.gameEarth.texture = PIXI.Texture.fromFrame(this.groundArray[this.stageNum] + ".png"),
- this.building.alpha = .3,
- this.topBG.alpha = .3,
- this.gameEarth.alpha = .3,
- TweenMax.to(this.building, 1, {
- alpha: 1,
- ease: Linear.easeInOut
- }),
- TweenMax.to(this.topBG, 1, {
- alpha: 1,
- ease: Linear.easeInOut
- }),
- TweenMax.to(this.gameEarth, 1, {
- alpha: 1,
- ease: Linear.easeInOut
- })
- }
- .bind(this),
- ease: Linear.easeInOut
- }))
- }
- ,
- gc.GamePlayPage.prototype.clearStage = function () {
- if (this.setTurnCountFlag(!1),
- this.test.inGuied = !0,
- gc.isLowPhone || (this.building.stopInterval(),
- this.building.setBuildingRotation()),
- this.itemBombOver)
- this.gameOverItemBomb();
- else {
- this.messageText.showMessage = !1,
- this.removeChild(this.messageText),
- this.turnCount < 0 && (this.turnCount = 0);
- try {
- this.moveLineContainer.removeChildren(),
- this.move5CountPopup.flag = !1
- } catch (t) { }
- this.moveNumber.fileName = "ui_move1_",
- this.moveNumber.setValue(this.turnCount);
- var e = Math.floor((this.stageNum + 1) / 2);
- this.karictorContainer.removeChildren(),
- this.normalAnimation.state.setAnimation(0, "normal_" + e, !0, 0),
- this.normalAnimation.skeleton.setToSetupPose(),
- this.clearAniSpine.state.setAnimation(0, "cha_clear_" + e, !0, 0),
- this.clearAniSpine.skeleton.setToSetupPose(),
- this.karictorContainer.addChild(this.clearAniSpine);
- for (var i = !1, a = 0; 6 > a; a++)
- for (var s = 0; 7 > s; s++)
- if (this.puzzleArray[a][s][0] > 5 && this.puzzleArray[a][s][0] < 14) {
- i = !0;
- break
- }
- if (i || this.turnCount >= this.feverTurnCount)
- this.addChild(this.popUp),
- this.popUp.showPopup(5);
- else {
- this.addChild(this.popUp);
- var r = 0;
- r = this.stageNum % 2 == 0 ? 3 : 2,
- this.popUp.showPopup(r)
- }
- }
- }
- ,
- gc.GamePlayPage.prototype.showItemLine = function () {
- this.itemLineEffectContainer.removeChildren();
- for (var t = 0; 6 > t; t++)
- for (var e = 0; 7 > e; e++)
- if (this.puzzleArray[t][e][0] > 5 && this.puzzleArray[t][e][0] < 14) {
- var i = null;
- 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),
- i.anchor.set(.5, .5),
- i.x = this.puzzleArray[t][e][1].x,
- i.y = this.puzzleArray[t][e][1].y,
- this.itemLineEffectContainer.addChild(i)
- }
- }
- ,
- gc.GamePlayPage.prototype.gameover = function () {
- var t = Math.floor((this.stageNum + 1) / 2);
- this.failAniSpine.state.setAnimation(0, "cha_fail_" + t, !1, 0),
- this.failAniSpine.skeleton.setToSetupPose(),
- this.karictorContainer.removeChildren(),
- this.karictorContainer.addChild(this.failAniSpine),
- this.turnCount = 0,
- this.moveNumber.setValue(this.turnCount),
- gc.isLowPhone || this.building.stopInterval(),
- this.gameOverPopupAnimation()
- }
- ,
- gc.GamePlayPage.prototype.dropPuzzleOver = function () {
- if (this.itemSelectedArray.length > 0)
- return void this.newCheckNextItemBlock();
- var t, e = this.checkDragPuzzle();
- if (e) {
- if (this.turnCount < 0 && (this.turnCount = 0),
- this.moveNumber.setValue(this.turnCount),
- !(this.totalClearBlockNum < this.totalClear))
- return void (this.stageNum % 2 == 1 ? TweenMax.to(this.turnBarMask, .1, {
- x: 500 * this.totalClearBlockNum / this.totalFlag - 500,
- onUpdate: function () {
- this.turnBarRod.x = this.turnBarMask.x + 610
- }
- .bind(this),
- onComplete: function () {
- this.newClearStage()
- }
- .bind(this)
- }) : TweenMax.to(this.turnBarMask, .1, {
- x: 0,
- onUpdate: function () {
- this.turnBarRod.x = this.turnBarMask.x + 610
- }
- .bind(this),
- onComplete: function () {
- this.newClearStage()
- }
- .bind(this)
- }));
- if (TweenMax.to(this.turnBarMask, .1, {
- x: 500 * this.totalClearBlockNum / this.totalFlag - 500,
- onUpdate: function () {
- this.turnBarRod.x = this.turnBarMask.x + 610
- }
- .bind(this)
- }),
- this.turnCount <= 0) {
- var t = Math.floor((this.stageNum + 1) / 2);
- this.failAniSpine.state.setAnimation(0, "cha_fail_" + t, !1, 0),
- this.failAniSpine.skeleton.setToSetupPose(),
- this.karictorContainer.removeChildren(),
- this.karictorContainer.addChild(this.failAniSpine),
- this.turnCount = 0,
- this.moveNumber.setValue(this.turnCount),
- gc.isLowPhone || this.building.stopInterval(),
- this.gameOverPopupAnimation()
- } else
- this.test.inGuied = !1,
- this.guiedTime = (new Date).getTime(),
- this.gameBaceContiner.interactive = !0,
- this.setTurnCountFlag(!0)
- } else
- this.notDragPuzzleReset()
- }
- ,
- gc.GamePlayPage.prototype.gameOverItemBomb = function () {
- this.overAnimationFlag = !0,
- this.itemBombOver = !0,
- this.feverTimeStart = !0;
- for (var t = [], e = 0; 6 > e; e++)
- for (var i = 0; 7 > i; i++)
- this.puzzleArray[e][i][0] > 5 && this.puzzleArray[e][i][0] < 14 && t.push([e, i]);
- t.length > 0 ? this.itemSelectedFun(this.puzzleArray[t[0][0]][t[0][1]][0], [t[0][1], t[0][0]]) : this.randomBomb()
- }
- ,
- gc.GamePlayPage.prototype.randomBomb = function () {
- if (this.itemBombOver = !1,
- 0 == this.turnCount) {
- this.addChild(this.popUp);
- var t = 0;
- return t = this.stageNum % 2 == 0 ? 3 : 2,
- void this.popUp.showPopup(t)
- }
- this.totalScore += this.turnScoreArray[this.stageNum] * this.turnCount,
- this.randomBombCount = Math.floor(this.turnCount / this.feverTurnCount);
- for (var e = [], i = [], a = 0; 6 > a; a++)
- for (var s = 0; 7 > s; s++)
- this.puzzleArray[a][s][0] < 6 && this.puzzleArray[a][s][0] > 0 && e.push([a, s]);
- for (; ;) {
- if (e.length <= 0)
- break;
- if (!(i.length < this.randomBombCount))
- break;
- var r = Math.floor(100 * Math.random()) % e.length;
- i.push(e.splice(r, 1))
- }
- if (i.length > 0)
- this.randomBombAnimation(i);
- else {
- this.addChild(this.popUp);
- var t = 0;
- t = this.stageNum % 2 == 0 ? 3 : 2,
- this.popUp.showPopup(t)
- }
- }
- ,
- gc.GamePlayPage.prototype.stageChangeOver = function () {
- this.addChild(this.popUp),
- this.stageNum % 2 == 0 ? this.popUp.showPopup(1) : this.popUp.showPopup(6)
- }
- ,
- gc.GamePlayPage.prototype.showEndingPage = function () {
- this.addChild(this.endingPage),
- this.endingPage.showChaAniamtion()
- }
- ,
- gc.GamePlayPage.prototype.scoreSave = function () {
- return gc.soundBt.x = GD.width + 500,
- null != gc.game_idx && NetworkManager.sendData2("gameScoreSave", {
- gameId: gc.gameId,
- type: gc.gameType,
- score: this.totalScore,
- stage: this.stageNum,
- game_idx: gc.game_idx,
- start_datetime: gc.startDatetime
- }, this.saveScoreResult, this),
- this.loadingShow(),
- this.emit("GOTO_MAINPAGE")
- // void GamePocket.Sdk.Ranking.add(this.totalScore, function (t) {
- // if (this.loadingHide(),
- // t.code === GamePocket.Sdk.ResponseCode.SUCCESS) {
- // var e = t.result;
- // console.log("랭킹을 남긴 사용자 수 : " + e.countOfAllUsers),
- // console.log("" + e.percentile),
- // console.log("" + e.group),
- // console.log("" + e.score),
- // this.showResultPopup(this.totalScore, e.score, e.percentile, e.group, 1)
- // } else
- // 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),
- // console.log(t.code)
- // }
- // .bind(this))
- }
- ,
- gc.GamePlayPage.prototype.saveScoreResult = function (t) {
- gc.gameType = 1
- }
- ,
- gc.GamePlayPage.prototype.showResultPopup = function (t, e, i, a, s, r) {
- console.log(t, e, i),
- this.resultBox.init(t, e, i, a, s, r),
- this.addChild(this.resultBox)
- }
- ,
- gc.GamePlayPage.prototype.scoreSaveResult = function (t) {
- this.loadingHide(),
- this.resultBox.init(t.result.endInfo.nowScore, t.result.endInfo.maxScore, t.result.endInfo.myRank, t.result.endInfo.playOpportunity),
- this.addChild(this.resultBox),
- console.log("scoreSaveResult===result data === " + t)
- }
- ,
- gc.GamePlayPage.prototype.randomBombAnimationOver = function (t) {
- for (var e = 0; e < t.length; e++) {
- var i = new gc.MovieClip("puzzle_effect_000", 1, 15, 1, 0);
- i.loop = !1,
- i.anchor.set(.5, .5),
- this.puzzleArray[t[e][0][0]][t[e][0][1]][1].alpha = 0,
- i.x = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].x,
- i.y = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].y,
- this.gameEffectContiner.addChild(i);
- var a = new gc.NumberText("ui_puzzle_000", "center", 0);
- a.x = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].x,
- a.y = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].y - 5,
- a.setValue(this.turnScoreArray[this.stageNum]),
- this.topUIContainer.addChild(a),
- this.scoreNumberText.valueTween(this.totalScore),
- TweenMax.to(a, .3, {
- delay: .5,
- alpha: .5,
- y: "-=20",
- onComplete: function (t) {
- this.topUIContainer.removeChild(t)
- }
- .bind(this),
- onCompleteParams: [a],
- onStart: function (t) {
- this.gameEffectContiner.removeChild(t)
- }
- .bind(this),
- onStartParams: [i]
- }),
- e == t.length - 1 ? TweenMax.to(i, .8, {
- alpha: 1,
- onComplete: function () {
- this.gameEffectContiner.removeChildren(),
- this.addChild(this.popUp);
- var t = 0;
- t = this.stageNum % 2 == 0 ? 3 : 2,
- this.popUp.showPopup(t)
- }
- .bind(this)
- }) : TweenMax.to(i, .8, {
- alpha: 1
- })
- }
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle")
- }
- ,
- gc.GamePlayPage.prototype.randomBombAnimation = function (t) {
- for (var e = 0; e < t.length; e++) {
- var i = null;
- i = PIXI.Sprite.fromFrame("puzzle_effect_0001.png"),
- i.anchor.set(.5, .5),
- i.x = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].x,
- i.y = this.puzzleArray[t[e][0][0]][t[e][0][1]][1].y,
- e == t.length - 1 ? TweenMax.from(i, 1, {
- delay: .1 * e,
- x: .1 * GD.width,
- y: .18 * GD.height,
- onComplete: function (e) {
- this.gameEffectContiner.removeChildren(),
- this.randomBombAnimationOver(t)
- }
- .bind(this),
- onCompleteParams: [i],
- onStart: function (t) {
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
- this.turnCount -= this.feverTurnCount,
- this.turnCount < 0 && (this.turnCount = 0),
- this.moveNumber.setValue(this.turnCount),
- this.gameEffectContiner.addChild(t)
- }
- .bind(this),
- onStartParams: [i]
- }) : TweenMax.from(i, 1, {
- delay: .1 * e,
- x: .1 * GD.width,
- y: .18 * GD.height,
- onStart: function (t) {
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
- this.turnCount -= this.feverTurnCount,
- this.turnCount < 0 && (this.turnCount = 0),
- this.moveNumber.setValue(this.turnCount),
- this.gameEffectContiner.addChild(t)
- }
- .bind(this),
- onStartParams: [i]
- })
- }
- }
- ,
- gc.GamePlayPage.prototype.checkStoneBlockDrop = function () {
- for (var t = !1, e = 0; 7 > e; e++)
- if (this.puzzleArray[5][e][0] > 14)
- return !0;
- return t
- }
- ,
- gc.GamePlayPage.prototype.shuffleAnimation = function () {
- for (var t = null, e = [], i = 0; 6 > i; i++)
- for (var a = 0; 7 > a; a++)
- t = this.puzzleArray[i][a][1],
- a % 2 == 0 ? t.y = this.sPuzzleStartY + i * this.pYp : t.y = this.dPuzzleStartY + i * this.pYp,
- t.x = this.puzzleStartX + a * this.pXp,
- e.push(t);
- TweenMax.from(e, .5, {
- x: this.puzzleArray[3][3][1].x,
- y: this.puzzleArray[3][3][1].y,
- onComplete: function () {
- this.gameTopEffectContiner.removeChildren(),
- this.dropPuzzleOver()
- }
- .bind(this)
- })
- }
- ,
- gc.GamePlayPage.prototype.notDragPuzzleReset = function () {
- this.gameBaceContiner.interactive = !1;
- var t = PIXI.Sprite.fromFrame("ui_notice.png");
- t.anchor.set(.5, .5),
- t.x = GD.width / 2,
- t.y = .7 * GD.height,
- this.gameTopEffectContiner.addChild(t);
- for (var e = [], i = 0; 6 > i; i++)
- for (var a = 0; 7 > a; a++)
- if (gc.isLowPhone) {
- if (this.puzzleArray[i][a][1].visible = !1,
- this.puzzleArray[i][a][0] < 6) {
- var s = Math.floor(100 * Math.random()) % 5 + 1;
- this.puzzleArray[i][a][0] = s,
- this.puzzleArray[i][a][1].texture = new PIXI.Texture.fromFrame(this.blockNameArray[this.stageNum] + s + ".png")
- }
- } else
- e.push(this.puzzleArray[i][a][1]);
- gc.isLowPhone ? TweenMax.delayedCall(1, function () {
- for (var t = 0; 6 > t; t++)
- for (var e = 0; 7 > e; e++)
- this.puzzleArray[t][e][1].visible = !0;
- this.gameTopEffectContiner.removeChildren(),
- this.dropPuzzleOver()
- }
- .bind(this)) : TweenMax.to(e, .5, {
- x: this.puzzleArray[3][3][1].x,
- y: this.puzzleArray[3][3][1].y,
- delay: .5,
- onComplete: function () {
- for (var t = 0; 6 > t; t++)
- for (var e = 0; 7 > e; e++)
- if (this.puzzleArray[t][e][0] < 6) {
- var i = Math.floor(100 * Math.random()) % 5 + 1;
- this.puzzleArray[t][e][0] = i,
- this.puzzleArray[t][e][1].texture = new PIXI.Texture.fromFrame(this.blockNameArray[this.stageNum] + i + ".png")
- }
- this.shuffleAnimation()
- }
- .bind(this)
- })
- }
- ,
- gc.GamePlayPage.prototype.drawDragPuzzle = function () {
- if (this.turnCountFlag && this.dragedArray.length >= 3) {
- if (this.setTurnCountFlag(!1),
- this.itemLineEffectContainer.removeChildren(),
- this.test.inGuied = !0,
- this.turnCount-- ,
- this.turnCount < 0 && (this.turnCount = 0),
- this.turnCount <= 5)
- try {
- this.moveNumber.fileName = "ui_move3_",
- this.moveLineContainer.removeChildren(),
- this.moveLineContainer.addChild(this.moveLineSpine),
- this.move5CountPopup.flag || (this.move5CountPopup.flag = !0,
- this.move5CountPopupAnimation())
- } catch (t) { }
- this.moveNumber.setValue(this.turnCount),
- this.buildingMoveBlockNum += this.dragedArray.length,
- this.changeBuildingMoveTime(1),
- this.gameBaceContiner.interactive = !1,
- this.copyDrageArray = [];
- for (var e = 0; e < this.dragedArray.length; e++) {
- var i = this.dragedArray[e][0]
- , a = [i, this.dragedArray[e]];
- this.copyDrageArray.push(a);
- var s = null;
- this.blockCallBackLists.length > 0 ? (s = this.blockCallBackLists.shift(),
- 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"),
- s.anchor.set(.5, .5),
- s.x = this.dragedArray[e][1].x,
- s.y = this.dragedArray[e][1].y;
- var r = [];
- r.push(s),
- r.push(i),
- this.gameMergeAniContiner.addChildAt(s, 0),
- this.mergeDragedArray.push(r)
- }
- this.puzzleMergeAnimation()
- }
- }
- ,
- gc.GamePlayPage.prototype.changeDragBlock = function (t) {
- if (t > 1) {
- var e = 2 * this.copyDrageArray[0][0] + 2 + t;
- if (10 == e) {
- var i = Math.floor(20 * Math.random()) % 3 + 1
- , a = this.getTouchPosition(this.copyDrageArray[this.copyDrageArray.length - 1][1][1]);
- 5 == a[1] && 0 == a[0] ? i = 1 : 5 == a[1] && 0 == a[6] && (i = 1),
- this.copyDrageArray[this.copyDrageArray.length - 1][1][0] = e,
- this.copyDrageArray[this.copyDrageArray.length - 1][1][1].texture = new PIXI.Texture.fromFrame("block_000" + e + ".png"),
- this.copyDrageArray[this.copyDrageArray.length - 1][1][1].alpha = 1,
- this.copyDrageArray[this.copyDrageArray.length - 1][1][2] = i,
- this.itemSelectedArray.push(this.copyDrageArray[this.copyDrageArray.length - 1][1][1])
- } else
- this.copyDrageArray[this.copyDrageArray.length - 1][1][0] = e,
- this.copyDrageArray[this.copyDrageArray.length - 1][1][1].texture = new PIXI.Texture.fromFrame("block_000" + e + ".png"),
- this.copyDrageArray[this.copyDrageArray.length - 1][1][1].alpha = 1,
- this.itemSelectedArray.push(this.copyDrageArray[this.copyDrageArray.length - 1][1][1])
- }
- }
- ,
- gc.GamePlayPage.prototype.drawDragItem = function () {
- if (!this.overAnimationFlag)
- if (5 == this.copyDrageArray[0][0]) {
- var t = Math.floor(this.copyDrageArray.length / 3);
- t > 5 && (t = 5);
- var e = this.copyDrageArray.length - 1
- , i = this.getTouchPosition(this.copyDrageArray[e][1][1]);
- this.showTurnPlusAnimation(i[1], i[0], t);
- for (var a = this.copyDrageArray.length - 1; a > this.copyDrageArray.length - 1 - t; a--)
- this.copyDrageArray[a][1][0] = 0,
- this.copyDrageArray[a][1][1].alpha = 0
- } else
- this.copyDrageArray.length >= 8 ? (this.goldLevelClearCount++ ,
- this.changeDragBlock(3)) : this.copyDrageArray.length >= 5 ? this.changeDragBlock(2) : this.changeDragBlock(1)
- }
- ,
- gc.GamePlayPage.prototype.changeBuildingMoveTime = function (t) {
- if (!this.feverTimeStart)
- if (gc.isLowPhone || this.building.stopInterval(),
- 1 == t) {
- var e = Math.ceil(this.stageNum / 2);
- this.animation.state.setAnimation(0, "flag_" + e, !0, 0),
- this.animation.skeleton.setToSetupPose(),
- this.karictorContainer.removeChildren(),
- this.karictorContainer.addChild(this.animation),
- gc.isLowPhone || (this.building.resetTime(200 - 30 * this.buildingMoveBlockNum),
- this.building.startMove())
- } else {
- var e = Math.ceil(this.stageNum / 2);
- this.karictorContainer.removeChildren(),
- this.normalAnimation.state.setAnimation(0, "normal_" + e, !0, 0),
- this.normalAnimation.skeleton.setToSetupPose(),
- this.karictorContainer.addChild(this.normalAnimation),
- gc.isLowPhone || this.building.resetTime(1e3)
- }
- }
- ,
- gc.GamePlayPage.prototype.meansOfTransportAnimation = function (t, e) {
- if (!gc.isLowPhone && !this.itemBombOver)
- if (this.topImgType = t,
- 1 == t) {
- this.animation.visible = !1;
- var i = new gc.MovieClip("special_airplane_ani", 2, 2, .5, 10);
- i.anchor.set(.5, .5),
- i.x = GD.width / 2,
- i.y = .2 * GD.height,
- this.gameTransportContianer.addChild(i),
- TweenMax.to(i, .4, {
- y: .1 * GD.height,
- onComplete: function (t) {
- TweenMax.to(t, .4, {
- delay: .2,
- y: .2 * GD.height,
- onStart: function () { }
- .bind(this),
- onComplete: function (t) {
- this.animation.visible = !0,
- this.gameTransportContianer.removeChild(t)
- }
- .bind(this),
- onCompleteParams: [t],
- ease: Linear.easeInOut
- })
- }
- .bind(this),
- onCompleteParams: [i],
- ease: Linear.easeInOut
- })
- } else if (2 == t) {
- var i = new gc.MovieClip("special_helicopter_ani", 3, 4, .5, 10);
- i.anchor.set(.5, .5),
- i.x = GD.width / 2,
- i.y = .2 * GD.height,
- this.gameTransportContianer.addChild(i),
- this.animation.visible = !1,
- TweenMax.to(i, .5, {
- y: .1 * GD.height,
- onComplete: function (t) {
- TweenMax.to(t, .5, {
- delay: .2,
- y: .2 * GD.height,
- onStart: function () { }
- .bind(this),
- onComplete: function (t) {
- this.animation.visible = !0,
- this.gameTransportContianer.removeChild(t)
- }
- .bind(this),
- onCompleteParams: [t],
- ease: Linear.easeInOut
- })
- }
- .bind(this),
- onCompleteParams: [i],
- ease: Linear.easeInOut
- })
- } else if (3 == t) {
- var i = new gc.MovieClip("special_boat_ani", 1, 2, .2, 10);
- i.anchor.set(.5, .5),
- i.y = .2 * GD.height + 100,
- i.x = -i.width / 2,
- i.rotation = -Math.PI / 12,
- this.gameTransportContianer.addChild(i),
- TweenMax.to(i, .2, {
- rotation: 0,
- bezier: [{
- x: GD.width / 4,
- y: .19 * GD.height + 50
- }, {
- x: GD.width / 2,
- y: .21 * GD.height
- }],
- x: GD.width / 2,
- onComplete: function (t) {
- t.textures = new gc.MovieClip("special_boat_ani", 3, 4, 2, 10).textures,
- this.animation.visible = !1,
- TweenMax.to(t, .2, {
- rotation: Math.PI / 12,
- bezier: [{
- x: 3 * GD.width / 4,
- y: .19 * GD.height + 50
- }, {
- x: GD.width + t.width / 2,
- y: .2 * GD.height + 100
- }],
- delay: 1.2,
- x: GD.width + t.width,
- onStart: function () {
- t.textures = new gc.MovieClip("special_boat_ani", 1, 2, 1, 10).textures,
- this.animation.visible = !0
- }
- .bind(this),
- onComplete: function (t) {
- this.gameTransportContianer.removeChild(t)
- }
- .bind(this),
- onCompleteParams: [t]
- })
- }
- .bind(this),
- onCompleteParams: [i]
- })
- } else if (4 == t) {
- var i = new gc.MovieClip("special_train_ani", 1, 3, .1, 10);
- i.anchor.set(.5, .5),
- i.y = .2 * GD.height + 100,
- i.x = -i.width / 2,
- i.rotation = -Math.PI / 12,
- this.gameTransportContianer.addChild(i),
- TweenMax.to(i, .2, {
- rotation: 0,
- bezier: [{
- x: GD.width / 4,
- y: .19 * GD.height + 50
- }, {
- x: GD.width / 2,
- y: .21 * GD.height
- }],
- onComplete: function (t) {
- this.animation.visible = !1,
- t.textures = new gc.MovieClip("special_train_ani", 4, 5, 2, 10).textures,
- TweenMax.to(t, .2, {
- rotation: Math.PI / 12,
- bezier: [{
- x: 3 * GD.width / 4,
- y: .19 * GD.height + 50
- }, {
- x: GD.width + t.width / 2,
- y: .2 * GD.height + 100
- }],
- delay: e - .2,
- x: GD.width + t.width,
- onStart: function () {
- t.textures = new gc.MovieClip("special_train_ani", 1, 3, 1, 10).textures,
- this.gameTransportContianer.children.length > 1 ? this.topImgType > 2 && (this.animation.visible = !0) : this.animation.visible = !0
- }
- .bind(this),
- onComplete: function (t) {
- this.gameTransportContianer.removeChild(t)
- }
- .bind(this),
- onCompleteParams: [t]
- })
- }
- .bind(this),
- onCompleteParams: [i],
- ease: Linear.easeNone
- })
- }
- }
- ,
- gc.GamePlayPage.prototype.showScoreEffect = function (t, e) {
- gc.isLowPhone || this.scoreEffect.showScore(t, this.puzzleArray[e[1]][e[0]][1].x, this.puzzleArray[e[1]][e[0]][1].y)
- }
- ,
- gc.GamePlayPage.prototype.itemSelectedFun = function (t, e) {
- switch (this.totalClearBlockNum++ ,
- t) {
- case 1:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
- this.totalScore += 100,
- this.showScoreEffect(100, e);
- break;
- case 2:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
- this.totalScore += 100,
- this.showScoreEffect(100, e);
- break;
- case 3:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
- this.totalScore += 100,
- this.showScoreEffect(100, e);
- break;
- case 4:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
- this.totalScore += 100,
- this.showScoreEffect(100, e);
- break;
- case 5:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle"),
- this.totalScore += 100,
- this.showScoreEffect(100, e);
- break;
- case 6:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_helicopter"),
- this.meansOfTransportAnimation(2, .2),
- this.buildingMoveBlockNum += this.item6Num,
- this.changeBuildingMoveTime(1),
- this.totalScore += 1111,
- this.showScoreEffect(1111, e),
- this.puzzleArray[e[1]][e[0]][1].alpha = 0;
- var i = null;
- i = this.sixBombEffectLists.length > 0 ? this.sixBombEffectLists.shift() : new gc.MovieClip("special_helicopter", 1, 3, 2, 0),
- i.anchor.set(.5, .5),
- i.scale.set(1),
- i.x = this.puzzleArray[e[1]][e[0]][1].x,
- i.y = this.puzzleArray[e[1]][e[0]][1].y,
- this.gameEffectContiner.addChild(i),
- i.gotoAndPlay(1);
- TweenMax.to(i.scale, 1, {
- x: 2,
- y: 2,
- onComplete: function (t, e) {
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.sixBombEffectLists.push(t),
- this.copterBomb(e)
- }
- .bind(this),
- onCompleteParams: [i, e]
- });
- break;
- case 7:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_helicopter"),
- this.meansOfTransportAnimation(2, .2),
- this.buildingMoveBlockNum += this.item12Num,
- this.changeBuildingMoveTime(1),
- this.totalScore += 2222,
- this.showScoreEffect(2222, e),
- this.puzzleArray[e[1]][e[0]][1].alpha = 0;
- var i = null;
- i = this.sixBombEffectLists.length > 0 ? this.sixBombEffectLists.shift() : new gc.MovieClip("special_helicopter", 1, 3, 2, 0),
- i.anchor.set(.5, .5),
- i.scale.set(1),
- i.x = this.puzzleArray[e[1]][e[0]][1].x,
- i.y = this.puzzleArray[e[1]][e[0]][1].y,
- this.gameEffectContiner.addChild(i),
- i.gotoAndPlay(1);
- TweenMax.to(i.scale, 1, {
- x: 3,
- y: 3,
- onComplete: function (t, e) {
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.sixBombEffectLists.push(t),
- this.strongCopterBomb(e)
- }
- .bind(this),
- onCompleteParams: [i, e]
- });
- break;
- case 10:
- this.buildingMoveBlockNum += this.item6Num,
- this.changeBuildingMoveTime(1),
- this.totalScore += 1111,
- this.showScoreEffect(1111, e),
- this.trainBomb(e);
- break;
- case 11:
- this.buildingMoveBlockNum += this.item12Num,
- this.changeBuildingMoveTime(1),
- this.totalScore += 2222,
- this.showScoreEffect(2222, e),
- this.strongTrainBomb(e);
- break;
- case 12:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_ship"),
- this.buildingMoveBlockNum += this.item6Num,
- this.changeBuildingMoveTime(1),
- this.totalScore += 1111,
- this.showScoreEffect(1111, e),
- this.shipBomb(e);
- break;
- case 13:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_ship"),
- this.buildingMoveBlockNum += this.item12Num,
- this.changeBuildingMoveTime(1),
- this.totalScore += 2222,
- this.showScoreEffect(2222, e),
- this.strongShipBomb(e);
- break;
- case 8:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_airplane"),
- this.meansOfTransportAnimation(1),
- this.buildingMoveBlockNum += this.item6Num,
- this.changeBuildingMoveTime(1),
- this.totalScore += 1111,
- this.showScoreEffect(1111, e),
- this.planeBomb(e);
- break;
- case 9:
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_airplane"),
- this.meansOfTransportAnimation(1),
- this.buildingMoveBlockNum += this.item12Num,
- this.changeBuildingMoveTime(1),
- this.totalScore += 2222,
- this.showScoreEffect(2222, e),
- this.strongPlaneBomb(e);
- break;
- case 14:
- if (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_foot"),
- this.totalScore += 333,
- this.showScoreEffect(333, e),
- console.log(11111111111),
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvplus"),
- this.turnCount++ ,
- this.turnCount > 5)
- try {
- this.moveNumber.fileName = "ui_move1_",
- this.moveLineContainer.removeChildren(),
- this.move5CountPopup.flag = !1
- } catch (a) { }
- this.timeAddAnimation(e[1], e[0], 1)
- }
- }
- ,
- gc.GamePlayPage.prototype.timeAddAnimation = function (t, e, i) {
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvplus"),
- this.moveNumber.setValue(this.turnCount);
- var a = PIXI.Sprite.fromFrame("move_plus000" + i + ".png");
- a.anchor.set(.5, .5),
- a.x = this.puzzleArray[t][e][1].x,
- a.y = this.puzzleArray[t][e][1].y,
- this.turnCountMusContiner.addChild(a),
- TweenMax.to(a, .5, {
- y: "-=20",
- onComplete: function (t) {
- this.turnCountMusContiner.removeChild(t)
- }
- .bind(this),
- onCompleteParams: [a]
- });
- var s = 0
- , r = null;
- r = PIXI.Sprite.fromFrame("effect_move_plus.png"),
- r.anchor.set(.5, .5),
- r.x = this.puzzleArray[t][e][1].x,
- r.y = this.puzzleArray[t][e][1].y,
- r.scale.x = 1.2,
- r.scale.y = 1.2,
- this.turnCountMusContiner.addChild(r),
- TweenMax.to(r, .3, {
- delay: s,
- x: .15 * GD.width,
- y: .06 * GD.height,
- onComplete: function (t, e, i) {
- this.moveNumber.setValue(this.turnCount),
- this.turnCountMusContiner.removeChild(t)
- }
- .bind(this),
- onCompleteParams: [r, t, e],
- ease: Linear.easeNone
- })
- }
- ,
- gc.GamePlayPage.prototype.singleShipBombAni = function (t, e, i) {
- var a = null;
- a = new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
- a.loop = !1,
- a.anchor.set(.5, .5),
- a.x = this.puzzleArray[t][e][1].x,
- a.y = this.puzzleArray[t][e][1].y,
- this.gameEffectContiner.addChild(a),
- TweenMax.delayedCall(.2, function (t, e, i, a) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- this.shipBombCheckAni(e, i, a)
- }
- .bind(this), [a, t, e, i])
- }
- ,
- gc.GamePlayPage.prototype.singleItemBombAni = function (t, e) {
- var i = null;
- i = new gc.MovieClip("puzzle_effect_000", 1, 15, this.copterMovieClipTime, 0),
- i.loop = !1,
- i.anchor.set(.5, .5),
- i.x = this.puzzleArray[t][e][1].x,
- i.y = this.puzzleArray[t][e][1].y,
- this.gameEffectContiner.addChild(i),
- TweenMax.delayedCall(this.copterBombTime, function (t) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- this.gameEffectContiner.children.length <= 0 && this.checkNextItemBlock()
- }
- .bind(this), [i])
- }
- ,
- gc.GamePlayPage.prototype.stoneItemAni = function (t, e) {
- var i = PIXI.Sprite.fromFrame("disturb_puzzle_effect.png");
- i.anchor.set(.5, .5),
- i.x = this.puzzleArray[t][e][1].x,
- i.y = this.puzzleArray[t][e][1].y,
- this.gameTopEffectContiner.addChild(i),
- TweenMax.to(i, this.stonClearTime, {
- alpha: 1,
- onComplete: function (t) {
- this.gameTopEffectContiner.removeChild(t)
- }
- .bind(this),
- onCompleteParams: [i]
- })
- }
- ,
- gc.GamePlayPage.prototype.checkInDragArray = function (t) {
- for (var e = -1, i = 0; i < this.mergeDragedArray.length; i++) {
- var a = this.getTouchPosition(this.mergeDragedArray[i][0]);
- if (a[0] == t[0] && a[1] == t[1]) {
- e = i;
- break
- }
- }
- -1 != e && (this.gameMergeAniContiner.removeChild(this.mergeDragedArray[e][0]),
- this.mergeDragedArray.splice(e, 1))
- }
- ,
- gc.GamePlayPage.prototype.checkInArray = function (t, e) {
- return t >= 0 && 6 > t && e >= 0 && 7 > e
- }
- ,
- gc.GamePlayPage.prototype.copterBomb = function (t) {
- var e = t[1]
- , i = t[0];
- if (this.puzzleArray[e][i][0] = 0,
- this.puzzleArray[e][i][1].alpha = 0,
- i % 2 == 0) {
- for (var a = e; e + 1 >= a; a++)
- for (var s = i - 1; i + 1 >= s; s++)
- this.copterBombCheckFun(a, s, e, i);
- this.copterBombCheckFun(e - 1, i, e, i)
- } else {
- for (var a = e - 1; e >= a; a++)
- for (var s = i - 1; i + 1 >= s; s++)
- this.copterBombCheckFun(a, s, e, i);
- this.copterBombCheckFun(e + 1, i, e, i)
- }
- }
- ,
- gc.GamePlayPage.prototype.strongCopterBomb = function (t) {
- var e = t[1]
- , i = t[0];
- this.puzzleArray[e][i][0] = 0,
- this.puzzleArray[e][i][1].alpha = 0;
- for (var a = e - 1; e + 1 >= a; a++)
- for (var s = i - 2; i + 2 >= s; s++)
- this.copterBombCheckFun(a, s, e, i);
- if (i % 2 == 0) {
- this.copterBombCheckFun(e - 2, i, e, i);
- for (var a = i - 1; i + 1 >= a; a++)
- this.copterBombCheckFun(e + 2, a, e, i)
- } else {
- this.copterBombCheckFun(e + 2, i, e, i);
- for (var a = i - 1; i + 1 >= a; a++)
- this.copterBombCheckFun(e - 2, a, e, i)
- }
- }
- ,
- gc.GamePlayPage.prototype.copterBombCheckFun = function (t, e, i, a) {
- var s = !1;
- if (!(0 > t || t > 5 || 0 > e || e > 6)) {
- if (t == i && a == e)
- ;
- else if (0 == this.puzzleArray[t][e][0])
- return;
- if (this.checkInDragArray([e, t]),
- s = this.checkPuzzleTypeAndBomb(t, e),
- !s) {
- var r = null;
- r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.copterMovieClipTime, 0),
- r.loop = !1,
- r.animationSpeed = this.copterMovieClipTime,
- r.anchor.set(.5, .5),
- r.x = this.puzzleArray[t][e][1].x,
- r.y = this.puzzleArray[t][e][1].y,
- this.gameEffectContiner.addChild(r),
- r.gotoAndPlay(1),
- TweenMax.delayedCall(this.copterBombTime, function (t) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t),
- this.gameEffectContiner.children.length <= 0 && this.checkNextItemBlock()
- }
- .bind(this), [r])
- }
- }
- }
- ,
- gc.GamePlayPage.prototype.recoverTrainEffect = function () {
- if (this.trainEffectSaveLists.length > 0) {
- var t = null;
- try {
- for (var e = this.trainEffectSaveLists.length - 1; e >= 0; e--)
- t = this.trainEffectSaveLists.shift(),
- t.rotation = 0,
- this.trainEffectLists.push(t);
- this.trainEffectSaveLists = []
- } catch (i) { }
- }
- }
- ,
- gc.GamePlayPage.prototype.trainBombOverAnimation = function () {
- if (this.trainTypeDU.length > 1 || this.trainTypeLR.length > 1 || this.trainTypeRL.length > 1) {
- var t = 0;
- if (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_train"),
- this.trainTypeDU.length > 0) {
- 6 * this.trainThrowTime > t && (t = 6 * this.trainThrowTime);
- var e = null;
- e = this.trainMoveEffectLists.length > 0 ? this.trainMoveEffectLists.shift() : new gc.MovieClip("special_train", 1, 13, 2, 0),
- e.rotation = 0,
- e.y = this.puzzleArray[this.trainTypeDU[0][0]][this.trainTypeDU[0][1]][1].y + 50,
- e.x = this.puzzleArray[this.trainTypeDU[0][0]][this.trainTypeDU[0][1]][1].x,
- e.anchor.set(.5, .5),
- this.gameTopEffectContiner.addChild(e),
- e.gotoAndPlay(1),
- TweenMax.to(e, 6 * this.trainThrowTime, {
- y: this.puzzleArray[this.trainTypeDU[this.trainTypeDU.length - 1][0]][this.trainTypeDU[this.trainTypeDU.length - 1][1]][1].y - 50,
- onComplete: function (t) {
- this.gameTopEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.trainMoveEffectLists.push(t),
- 0 == this.gameTopEffectContiner.children.length && (this.gameTopEffectContiner.removeChildren(),
- this.gameShipEffectContiner.removeChildren(),
- this.recoverTrainEffect(),
- this.checkNextItemBlock())
- }
- .bind(this),
- onCompleteParams: [e]
- })
- }
- if (this.trainTypeLR.length > 0) {
- this.trainThrowTime * this.trainTypeLR.length > t && (t = this.trainThrowTime * this.trainTypeLR.length);
- var e = null;
- e = this.trainMoveEffectLists.length > 0 ? this.trainMoveEffectLists.shift() : new gc.MovieClip("special_train", 1, 13, 2, 0),
- e.anchor.set(.5, .5),
- e.rotation = Math.PI / 3,
- e.y = this.puzzleArray[this.trainTypeLR[0][0]][this.trainTypeLR[0][1]][1].y + 30,
- e.x = this.puzzleArray[this.trainTypeLR[0][0]][this.trainTypeLR[0][1]][1].x - 50,
- this.gameTopEffectContiner.addChild(e),
- e.gotoAndPlay(1),
- TweenMax.to(e, this.trainThrowTime * this.trainTypeLR.length, {
- y: this.puzzleArray[this.trainTypeLR[this.trainTypeLR.length - 1][0]][this.trainTypeLR[this.trainTypeLR.length - 1][1]][1].y - 30,
- x: this.puzzleArray[this.trainTypeLR[this.trainTypeLR.length - 1][0]][this.trainTypeLR[this.trainTypeLR.length - 1][1]][1].x + 50,
- onComplete: function (t) {
- this.gameTopEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.trainMoveEffectLists.push(t),
- 0 == this.gameTopEffectContiner.children.length && (this.gameTopEffectContiner.removeChildren(),
- this.gameShipEffectContiner.removeChildren(),
- this.recoverTrainEffect(),
- this.checkNextItemBlock())
- }
- .bind(this),
- onCompleteParams: [e]
- })
- }
- if (this.trainTypeRL.length > 0) {
- this.trainThrowTime * this.trainTypeRL.length > t && (t = this.trainThrowTime * this.trainTypeRL.length);
- var e = null;
- e = this.trainMoveEffectLists.length > 0 ? this.trainMoveEffectLists.shift() : new gc.MovieClip("special_train", 1, 13, 2, 0),
- e.anchor.set(.5, .5),
- e.rotation = 5 * Math.PI / 3,
- e.y = this.puzzleArray[this.trainTypeRL[0][0]][this.trainTypeRL[0][1]][1].y - 30,
- e.x = this.puzzleArray[this.trainTypeRL[0][0]][this.trainTypeRL[0][1]][1].x - 50,
- this.gameTopEffectContiner.addChild(e),
- e.gotoAndPlay(1),
- TweenMax.from(e, this.trainThrowTime * this.trainTypeRL.length, {
- y: this.puzzleArray[this.trainTypeRL[this.trainTypeRL.length - 1][0]][this.trainTypeRL[this.trainTypeRL.length - 1][1]][1].y + 30,
- x: this.puzzleArray[this.trainTypeRL[this.trainTypeRL.length - 1][0]][this.trainTypeRL[this.trainTypeRL.length - 1][1]][1].x + 50,
- onComplete: function (t) {
- this.gameTopEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.trainMoveEffectLists.push(t),
- 0 == this.gameTopEffectContiner.children.length && (this.gameTopEffectContiner.removeChildren(),
- this.gameShipEffectContiner.removeChildren(),
- this.checkNextItemBlock())
- }
- .bind(this),
- onCompleteParams: [e]
- })
- }
- this.meansOfTransportAnimation(4, t)
- } else
- this.checkNextItemBlock()
- }
- ,
- gc.GamePlayPage.prototype.trainBombCheckAni = function (t, e, i, a) {
- if (0 > t || t > 5 || 0 > e || e > 6)
- return this.trainCount++ ,
- void (6 == this.trainCount && (this.trainCount = 0,
- this.trainBombOverAnimation()));
- 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]),
- this.checkInDragArray([e, t]),
- flag = this.checkPuzzleTypeAndBomb(t, e);
- var s = null;
- s = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
- s.loop = !1,
- s.animationSpeed = this.moveClipTime,
- s.anchor.set(.5, .5),
- s.x = this.puzzleArray[t][e][1].x,
- s.y = this.puzzleArray[t][e][1].y,
- this.gameEffectContiner.addChild(s),
- s.gotoAndPlay(1),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, i, a, s) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t);
- var r = null;
- r = this.trainEffectLists.length > 0 ? this.trainEffectLists.shift() : PIXI.Sprite.fromFrame("special_train_0001.png"),
- r.anchor.set(.5, .5),
- r.x = this.puzzleArray[e][i][1].x,
- r.y = this.puzzleArray[e][i][1].y,
- this.gameShipEffectContiner.addChild(r),
- this.trainEffectSaveLists.push(r),
- r.rotation = 0,
- 3 == s ? r.rotation = Math.PI / 3 : 2 == s && (r.rotation = -Math.PI / 3),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, i, a) {
- 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)
- }
- .bind(this), [e, i, a, s])
- }
- .bind(this), [s, t, e, i, a])
- }
- ,
- gc.GamePlayPage.prototype.trainBombCheckType1 = function (t, e) {
- var i = PIXI.Sprite.fromFrame("special_train_0001.png");
- i.anchor.set(.5, .5),
- i.x = this.puzzleArray[t][e][1].x,
- i.y = this.puzzleArray[t][e][1].y,
- i.rotation = Math.PI / 3,
- this.gameShipEffectContiner.addChild(i);
- var i = PIXI.Sprite.fromFrame("special_train_0001.png");
- i.anchor.set(.5, .5),
- i.x = this.puzzleArray[t][e][1].x,
- i.y = this.puzzleArray[t][e][1].y,
- i.rotation = 2 * Math.PI / 3,
- this.gameShipEffectContiner.addChild(i);
- var i = PIXI.Sprite.fromFrame("special_train_0001.png");
- i.anchor.set(.5, .5),
- i.x = this.puzzleArray[t][e][1].x,
- i.y = this.puzzleArray[t][e][1].y,
- this.gameShipEffectContiner.addChild(i),
- TweenMax.delayedCall(this.shipAniTime, function (t, e) {
- var i = 0
- , a = 0
- , s = 0
- , r = 0;
- e % 2 == 0 ? (i = t + 1,
- a = t) : (i = t,
- a = t - 1),
- s = e - 1,
- r = e + 1,
- this.trainBombCheckAni(i, s, 1, 3),
- this.trainBombCheckAni(a, r, 2, 3),
- e % 2 == 0 ? (i = t,
- a = t + 1) : (i = t - 1,
- a = t),
- s = e - 1,
- r = e + 1,
- this.trainBombCheckAni(i, s, 2, 2),
- this.trainBombCheckAni(a, r, 1, 2),
- i = t - 1,
- a = t + 1,
- this.trainBombCheckAni(i, e, 2, 1),
- this.trainBombCheckAni(a, e, 1, 1)
- }
- .bind(this), [t, e])
- }
- ,
- gc.GamePlayPage.prototype.trainBombCheckType = function (t, e, i, a) {
- var s = null;
- s = this.trainEffectLists.length > 0 ? this.trainEffectLists.shift() : PIXI.Sprite.fromFrame("special_train_0001.png"),
- s.anchor.set(.5, .5),
- s.x = this.puzzleArray[t][e][1].x,
- s.y = this.puzzleArray[t][e][1].y,
- s.rotation = 0,
- 3 == a ? s.rotation = Math.PI / 3 : 2 == a && (s.rotation = 2 * Math.PI / 3),
- this.gameShipEffectContiner.addChild(s),
- this.trainEffectSaveLists.push(s),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, i, s) {
- if (3 == a) {
- var r = 0
- , n = 0
- , o = 0
- , h = 0;
- e % 2 == 0 ? (r = t + 1,
- n = t) : (r = t,
- n = t - 1),
- o = e - 1,
- h = e + 1,
- this.trainBombCheckAni(r, o, 1, a),
- this.trainBombCheckAni(n, h, 2, a)
- } else if (2 == a) {
- var r = 0
- , n = 0
- , o = 0
- , h = 0;
- e % 2 == 0 ? (r = t,
- n = t + 1) : (r = t - 1,
- n = t),
- o = e - 1,
- h = e + 1,
- this.trainBombCheckAni(r, o, 2, a),
- this.trainBombCheckAni(n, h, 1, a)
- } else {
- var r = 0
- , n = 0;
- r = t - 1,
- n = t + 1,
- this.trainBombCheckAni(r, e, 2, a),
- this.trainBombCheckAni(n, e, 1, a)
- }
- }
- .bind(this), [t, e, i, a])
- }
- ,
- gc.GamePlayPage.prototype.trainBomb = function (t) {
- var e = Math.floor(100 * Math.random()) % 3
- , i = t[1]
- , a = t[0];
- this.puzzleArray[i][a][0] = 0,
- this.puzzleArray[i][a][1].alpha = 0,
- this.trainTypeDU = [],
- this.trainTypeLR = [],
- this.trainTypeRL = [],
- this.trainCount = 4,
- e = 1,
- 1 == e ? this.trainTypeDU.push([i, a]) : 2 == e ? this.trainTypeRL.push([i, a]) : this.trainTypeLR.push([i, a]);
- var s = null;
- s = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
- s.loop = !1,
- s.animationSpeed = this.moveClipTime,
- s.anchor.set(.5, .5),
- s.x = this.puzzleArray[i][a][1].x,
- s.y = this.puzzleArray[i][a][1].y,
- this.gameEffectContiner.addChild(s),
- s.gotoAndPlay(1),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, i, a) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t),
- this.trainBombCheckType(e, i, 0, a)
- }
- .bind(this), [s, i, a, e])
- }
- ,
- gc.GamePlayPage.prototype.strongTrainBomb = function (t) {
- var e = t[1]
- , i = t[0];
- this.puzzleArray[e][i][0] = 0,
- this.puzzleArray[e][i][1].alpha = 0,
- this.trainTypeDU = [],
- this.trainTypeLR = [],
- this.trainTypeRL = [],
- this.trainTypeDU.push([e, i]),
- this.trainTypeLR.push([e, i]),
- this.trainTypeRL.push([e, i]);
- var a = null;
- a = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
- a.loop = !1,
- a.animationSpeed = this.moveClipTime,
- a.anchor.set(.5, .5),
- a.x = this.puzzleArray[e][i][1].x,
- a.y = this.puzzleArray[e][i][1].y,
- this.gameEffectContiner.addChild(a),
- a.gotoAndPlay(1),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t),
- this.trainBombCheckType1(e, i)
- }
- .bind(this), [a, e, i])
- }
- ,
- gc.GamePlayPage.prototype.singleShipMoveAnimation = function (t, e) {
- e % 2 == 0 ? t.rotation = 2 * Math.PI / 3 : t.rotation = Math.PI / 3,
- 7 > e ? TweenMax.to(t, this.shipThrowTime, {
- x: this.puzzleArray[this.shipStartX][e][1].x,
- y: this.puzzleArray[this.shipStartX][e][1].y,
- onComplete: function (t, e) {
- this.singleShipMoveAnimation(t, e)
- }
- .bind(this),
- onCompleteParams: [t, e + 1],
- ease: Linear.easeNone
- }) : TweenMax.to(t, this.shipThrowTime, {
- x: this.puzzleArray[this.shipStartX][6][1].x + 50,
- y: this.puzzleArray[this.shipStartX][6][1].y - 50,
- onComplete: function (t) {
- this.gameTopEffectContiner.removeChildren(),
- this.gameShipEffectContiner.removeChildren(),
- t.gotoAndStop(1),
- this.shipMoveEffectLists.push(t),
- this.recoverShipEffect(),
- this.checkNextItemBlock()
- }
- .bind(this),
- onCompleteParams: [t],
- ease: Linear.easeNone
- })
- }
- ,
- gc.GamePlayPage.prototype.shipOverBombAnimation = function (t) {
- this.meansOfTransportAnimation(3, 8 * this.shipThrowTime);
- var e = null;
- 0 == t ? (e = this.shipMoveEffectLists.length > 0 ? this.shipMoveEffectLists.shift() : new gc.MovieClip("special_boat", 1, 2, .5, 10),
- e.anchor.set(.5, .5),
- e.x = this.puzzleArray[this.shipStartX][0][1].x - 50,
- e.y = this.puzzleArray[this.shipStartX][0][1].y + 50,
- e.scale.set(1),
- e.rotation = Math.PI / 3,
- this.gameTopEffectContiner.addChild(e),
- e.gotoAndPlay(1),
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_boattrans"),
- TweenMax.to(e, this.shipThrowTime, {
- x: this.puzzleArray[this.shipStartX][0][1].x,
- y: this.puzzleArray[this.shipStartX][0][1].y,
- onComplete: function (t, e) {
- this.singleShipMoveAnimation(t, e)
- }
- .bind(this),
- onCompleteParams: [e, 1]
- })) : (e = this.shipMoveEffectLists.length > 0 ? this.shipMoveEffectLists.shift() : new gc.MovieClip("special_boat", 1, 2, .5, 10),
- e.anchor.set(.5, .5),
- e.x = this.puzzleArray[this.shipStartX][0][1].x - 100,
- e.y = this.puzzleArray[this.shipStartX][0][1].y - 50,
- e.rotation = Math.PI / 2,
- e.scale.x = 2,
- e.scale.y = 2,
- this.gameTopEffectContiner.addChild(e),
- e.gotoAndPlay(1),
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_boattrans"),
- TweenMax.to(e, 8 * this.shipThrowTime, {
- x: this.puzzleArray[this.shipStartX][6][1].x + 100,
- onComplete: function (t) {
- this.gameTopEffectContiner.removeChildren(),
- this.gameShipEffectContiner.removeChildren(),
- t.gotoAndStop(1),
- this.shipMoveEffectLists.push(t),
- this.recoverShipEffect(),
- this.checkNextItemBlock()
- }
- .bind(this),
- onCompleteParams: [e]
- }))
- }
- ,
- gc.GamePlayPage.prototype.recoverShipEffect = function () {
- var t = null;
- try {
- for (var e = this.shipEffectSaveLists.length - 1; e >= 0; e--)
- t = this.shipEffectSaveLists.splice(e, 1),
- t.gotoAndStop(1),
- this.shipEffectLists.push(t);
- this.shipEffectSaveLists = []
- } catch (i) { }
- }
- ,
- gc.GamePlayPage.prototype.shipBombCheckAni = function (t, e, i, a) {
- if (0 > t || t > 5 || 0 > e || e > 6)
- return void (0 == a ? (this.singleShipCount++ ,
- 2 == this.singleShipCount && (this.singleShipCount = 0,
- this.shipOverBombAnimation(0))) : (this.singleShipCount++ ,
- 6 == this.singleShipCount && (this.singleShipCount = 0,
- this.shipOverBombAnimation(1))));
- this.checkInDragArray([e, t]);
- var s;
- s = this.checkPuzzleTypeAndBomb(t, e);
- var r = null;
- r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
- r.loop = !1,
- r.animationSpeed = this.moveClipTime,
- r.anchor.set(.5, .5),
- r.x = this.puzzleArray[t][e][1].x,
- r.y = this.puzzleArray[t][e][1].y,
- this.gameEffectContiner.addChild(r),
- r.gotoAndPlay(1);
- var n = null;
- 1 == i ? TweenMax.delayedCall(this.shipBombBtweenTime, function (t, e, i, a) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t),
- n = this.shipEffectLists.length > 0 ? this.shipEffectLists.shift() : new gc.MovieClip("special_boat_000", 1, 5, this.shipClipTime, 1),
- n.loop = !1,
- n.anchor.set(.5, .5),
- n.x = this.puzzleArray[e][i][1].x,
- n.y = this.puzzleArray[e][i][1].y,
- n.scale.x = -1,
- this.gameShipEffectContiner.addChild(n),
- this.shipEffectSaveLists.push(n),
- n.gotoAndPlay(1),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
- this.shipBombCheckAni(t, e - 1, 1, i)
- }
- .bind(this), [e, i, a])
- }
- .bind(this), [r, t, e, a]) : 2 == i && TweenMax.delayedCall(this.shipBombBtweenTime, function (t, e, i, a) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t),
- n = this.shipEffectLists.length > 0 ? this.shipEffectLists.shift() : new gc.MovieClip("special_boat_000", 1, 5, this.shipClipTime, 1),
- n.loop = !1,
- n.anchor.set(.5, .5),
- n.x = this.puzzleArray[e][i][1].x,
- n.y = this.puzzleArray[e][i][1].y,
- n.scale.x = 1,
- this.gameShipEffectContiner.addChild(n),
- this.shipEffectSaveLists.push(n),
- n.gotoAndPlay(1),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
- this.shipBombCheckAni(t, e + 1, 2, i)
- }
- .bind(this), [e, i, a])
- }
- .bind(this), [r, t, e, a])
- }
- ,
- gc.GamePlayPage.prototype.shipBombCheckType = function (t, e, i) {
- var a = null;
- a = this.shipPointEffectLists.length > 0 ? this.shipPointEffectLists.shift() : PIXI.Sprite.fromFrame("special_boat_0005.png"),
- a.anchor.set(.5, .5),
- a.x = this.puzzleArray[t][e][1].x,
- a.y = this.puzzleArray[t][e][1].y,
- this.gameShipEffectContiner.addChild(a),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, a) {
- this.shipPointEffectLists.push(a),
- this.shipBombCheckAni(t, e - 1, 1, i),
- this.shipBombCheckAni(t, e + 1, 2, i)
- }
- .bind(this), [t, e, a, i])
- }
- ,
- gc.GamePlayPage.prototype.shipBomb = function (t) {
- var e = t[1]
- , i = t[0];
- this.puzzleArray[e][i][0] = 0,
- this.puzzleArray[e][i][1].alpha = 0,
- this.shipStartX = e;
- var a = null;
- a = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
- a.loop = !1,
- a.animationSpeed = this.moveClipTime,
- a.anchor.set(.5, .5),
- a.x = this.puzzleArray[e][i][1].x,
- a.y = this.puzzleArray[e][i][1].y,
- this.gameEffectContiner.addChild(a),
- a.gotoAndPlay(1),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t),
- this.shipBombCheckType(e, i, 0)
- }
- .bind(this), [a, e, i])
- }
- ,
- gc.GamePlayPage.prototype.strongShipBomb = function (t) {
- var e = t[1]
- , i = t[0];
- this.shipStartX = e;
- for (var a = e - 1; e + 1 >= a; a++)
- if (6 > a && a >= 0) {
- this.checkInDragArray([i, a]);
- var s = !1;
- this.shipStartX != a && (s = this.checkPuzzleTypeAndBomb(a, i)),
- s || this.puzzleArray[a][i][0] < 15 && (this.puzzleArray[a][i][0] = 0,
- this.puzzleArray[a][i][1].alpha = 0);
- var r = null;
- r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
- r.loop = !1,
- r.animationSpeed = this.moveClipTime,
- r.anchor.set(.5, .5),
- r.x = this.puzzleArray[a][i][1].x,
- r.y = this.puzzleArray[a][i][1].y,
- s && (r.alpha = 0),
- this.gameEffectContiner.addChild(r),
- r.gotoAndPlay(1),
- TweenMax.delayedCall(this.shipAniTime, function (t, e, i) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- t.alpha = 1,
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t),
- this.shipBombCheckType(e, i, 1)
- }
- .bind(this), [r, a, i])
- } else
- this.singleShipCount += 2
- }
- ,
- gc.GamePlayPage.prototype.itemSelectedAnimation = function (t, e) {
- null != this.puzzleArray[t][e][3] && this.puzzleArray[t][e][3].kill(!0),
- this.puzzleArray[t][e][3] = TweenMax.to(this.puzzleArray[t][e][1].scale, .5, {
- repeat: -1,
- yoyo: !0,
- x: .8,
- y: .8,
- onComplete: function (i, a) {
- this.puzzleArray[t][e][1].scale.x = 1,
- this.puzzleArray[t][e][1].scale.y = 1
- }
- .bind(this),
- onCompleteParams: [t, e]
- })
- }
- ,
- gc.GamePlayPage.prototype.checkPuzzleTypeAndBomb = function (t, e) {
- var i = !1;
- this.puzzleArray[t][e][0];
- if (this.puzzleArray[t][e][0] > 5 && this.puzzleArray[t][e][0] < 14) {
- for (var a = !1, s = 0; s < this.itemSelectedArray.length; s++)
- if (this.itemSelectedArray[s] == this.puzzleArray[t][e][1]) {
- a = !0;
- break
- }
- a || (this.itemSelectedArray.push(this.puzzleArray[t][e][1]),
- this.itemSelectedAnimation(t, e)),
- i = !0
- } else
- this.puzzleArray[t][e][0] > 14 ? (gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_block"),
- this.puzzleArray[t][e][0] > 17 ? (this.totalScore += 500,
- this.showScoreEffect(500, [e, t]),
- this.stoneItemAni(t, e),
- this.puzzleArray[t][e][0] = 17,
- this.puzzleArray[t][e][1].texture = new PIXI.Texture.fromFrame("block_00017.png"),
- this.stonLevelClearCount++) : this.puzzleArray[t][e][0] > 16 ? (this.totalScore += 400,
- this.showScoreEffect(400, [e, t]),
- this.stoneItemAni(t, e),
- this.puzzleArray[t][e][0] = 16,
- this.puzzleArray[t][e][1].texture = new PIXI.Texture.fromFrame("block_00016.png"),
- this.stonLevelClearCount++) : this.puzzleArray[t][e][0] > 15 ? (this.totalScore += 550,
- this.showScoreEffect(550, [e, t]),
- this.stoneItemAni(t, e),
- this.puzzleArray[t][e][0] = 15,
- this.puzzleArray[t][e][1].texture = new PIXI.Texture.fromFrame("block_00015.png"),
- this.stonLevelClearCount++) : (this.stageStoneBlockNum-- ,
- this.puzzleArray[t][e][0] = 0,
- this.puzzleArray[t][e][1].alpha = 0,
- this.totalScore += 330,
- this.showScoreEffect(330, [e, t]),
- this.stonLevelClearCount++)) : (this.itemSelectedFun(this.puzzleArray[t][e][0], [e, t]),
- this.puzzleArray[t][e][0] = 0,
- this.puzzleArray[t][e][1].alpha = 0);
- return i
- }
- ,
- gc.GamePlayPage.prototype.checkPlaneBomb = function (t, e) {
- var i = !1;
- if (!(0 > t || t > 5 || 0 > e || e > 6 || 0 == this.puzzleArray[t][e][0] || (this.checkInDragArray([e, t]),
- i = this.checkPuzzleTypeAndBomb(t, e)))) {
- var a = null;
- a = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, this.moveClipTime, 0),
- a.loop = !1,
- a.animationSpeed = this.moveClipTime,
- a.anchor.set(.5, .5),
- a.x = this.puzzleArray[t][e][1].x,
- a.y = this.puzzleArray[t][e][1].y,
- this.gameEffectContiner.addChild(a),
- a.gotoAndPlay(1),
- TweenMax.delayedCall(this.planeBombTime, function (t) {
- this.bombEffectArray.push(t),
- this.gameEffectContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t),
- this.gameEffectContiner.children.length <= 0 && this.checkNextItemBlock()
- }
- .bind(this), [a])
- }
- }
- ,
- gc.GamePlayPage.prototype.planeBombAnimation = function (t, e, i) {
- for (var a = 0; a < t.length; a++) {
- var s = null;
- s = this.planEffectLists.length > 0 ? this.planEffectLists.shift() : PIXI.Sprite.fromFrame("special_airplane.png"),
- s.anchor.set(.5, .25),
- s.x = this.puzzleArray[e][i][1].x,
- s.y = this.puzzleArray[e][i][1].y;
- 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));
- r = Math.sqrt(r);
- var n = Math.abs(this.puzzleArray[e][i][1].x - this.puzzleArray[t[a][0]][t[a][1]][1].x)
- , o = Math.acos(n / r);
- 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,
- this.gameEffectContiner.addChild(s),
- TweenMax.to(s, .8, {
- x: this.puzzleArray[t[a][0]][t[a][1]][1].x,
- y: this.puzzleArray[t[a][0]][t[a][1]][1].y,
- onComplete: function (t, e) {
- if (this.gameEffectContiner.removeChild(t),
- this.planEffectLists.push(t),
- 0 == this.gameEffectContiner.children.length)
- for (var i = 0; i < e.length; i++)
- this.checkPlaneBomb(e[i][0], e[i][1]);
- }
- .bind(this),
- onCompleteParams: [s, t]
- })
- }
- }
- ,
- gc.GamePlayPage.prototype.planeBomb = function (t) {
- var e = t[1]
- , i = t[0];
- this.puzzleArray[e][i][0] = 0,
- this.puzzleArray[e][i][1].alpha = 0;
- var a = []
- , s = []
- , r = []
- , n = 0
- , o = 1;
- 0 != this.copyDrageArray.length && (o = this.copyDrageArray[0][0]);
- for (var h = 0; 6 > h; h++)
- for (var l = 0; 7 > l; l++)
- this.puzzleArray[h][l][0] > 14 ? (n++ ,
- a.unshift([h, l])) : this.puzzleArray[h][l][0] > 0 && r.push([h, l]);
- for (var h = 0; 5 > h && !(a.length <= 0); h++)
- if (n > 0) {
- n--;
- var p = a.shift();
- s.push([p[0], p[1]])
- } else {
- var u = Math.floor(100 * Math.random()) % a.length
- , c = a.splice(u, 1);
- s.push([c[0][0], c[0][1]])
- }
- if (s.length < 5)
- for (var g = s.length, h = 0; 5 - g > h; h++) {
- var u = Math.floor(100 * Math.random()) % r.length
- , c = r.splice(u, 1);
- s.push([c[0][0], c[0][1]])
- }
- this.planeBombAnimation(s, e, i)
- }
- ,
- gc.GamePlayPage.prototype.strongPlaneBomb = function (t) {
- var e = t[1]
- , i = t[0];
- this.puzzleArray[e][i][0] = 0,
- this.puzzleArray[e][i][1].alpha = 0;
- for (var a = !1, s = [], r = [], n = [], o = [], h = [], l = [], p = [], u = [], c = 0; 6 > c; c++)
- for (var g = 0; 7 > g; g++)
- this.puzzleArray[c][g][0] > 14 && u.unshift([c, g]);
- for (var c = 0; c < u.length; c++) {
- var d = u[c];
- p.push([d[0], d[1]])
- }
- for (var c = 0; 6 > c; c++)
- for (var g = 0; 7 > g; g++)
- 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]);
- if (s.push(r),
- s.push(n),
- s.push(o),
- s.push(h),
- s.push(l),
- a = !1)
- for (var d = s.splice(this.copyDrageArray[0][0] - 1, 1), c = 0; c < d[0].length; c++)
- p.push([d[0][c][0], d[0][c][1]]);
- else {
- var m = 0
- , f = [];
- r.length > m && (m = r.length,
- f = r),
- n.length > m && (m = n.length,
- f = [],
- f = n),
- o.length > m && (m = o.length,
- f = [],
- f = o),
- h.length > m && (m = h.length,
- f = [],
- f = h),
- l.length > m && (m = l.length,
- f = [],
- f = l);
- for (var c = 0; c < f.length; c++)
- p.push([f[c][0], f[c][1]])
- }
- this.planeBombAnimation(p, e, i)
- }
- ,
- gc.GamePlayPage.prototype.checkNextItemBlock = function () {
- 0 == this.itemSelectedArray.length ? (this.resetScale(),
- this.scoreNumberText.valueTween(this.totalScore),
- this.gameMergeAniContiner.removeChildren(),
- this.changeBuildingMoveTime(0),
- this.buildingMoveBlockNum = 0,
- this.reDarwPuzzle()) : (this.scoreNumberText.valueTween(this.totalScore),
- this.newReDarwPuzzle())
- }
- ,
- gc.GamePlayPage.prototype.newCheckNextItemBlock = function () {
- if (this.itemSelectedArray.length > 0) {
- this.guiedTime = (new Date).getTime(),
- this.test.inGuied = !0;
- var t = this.itemSelectedArray.shift()
- , e = this.getTouchPosition(t)
- , i = e[1]
- , a = e[0];
- try {
- this.puzzleArray[i][a][3].kill()
- } catch (s) { }
- this.resetScale(),
- this.itemSelectedFun(this.puzzleArray[i][a][0], [a, i])
- }
- }
- ,
- gc.GamePlayPage.prototype.resetScale = function () {
- for (var t = 0; 6 > t; t++)
- for (var e = 0; 7 > e; e++)
- this.puzzleArray[t][e][1].scale.x = 1,
- this.puzzleArray[t][e][1].scale.y = 1
- }
- ,
- gc.GamePlayPage.prototype.puzzleMergeAnimation = function () {
- if (0 == this.mergeDragedArray.length) {
- this.scoreNumberText.valueTween(this.totalScore);
- for (var t = 0; t < this.gameMergeAniContiner.children.length; t++)
- this.blockCallBackLists.push(this.gameMergeAniContiner.getChildAt(t));
- return this.gameMergeAniContiner.removeChildren(),
- this.changeBuildingMoveTime(0),
- this.buildingMoveBlockNum = 0,
- this.drawDragItem(),
- void this.reDarwPuzzle()
- }
- var e = this.mergeDragedArray.shift()
- , i = e[0];
- i.texture = PIXI.Texture.fromFrame("puzzle_effect_combine.png");
- var a = e[1]
- , s = this.getTouchPosition(i);
- if (this.puzzleArray[s[1]][s[0]][0] = 0,
- this.puzzleArray[s[1]][s[0]][1].alpha = 0,
- 6 > a ? gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_puzzle_mix") : gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_sp_puzzle_mix"),
- this.mergeDragedArray.length > 0) {
- var r = null;
- a > 5 && 14 > a ? this.mergePuzzleTween = TweenMax.to(i, .1, {
- x: this.mergeDragedArray[0][0].x,
- y: this.mergeDragedArray[0][0].y,
- onComplete: function (t, e) {
- r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, 1.5, 0),
- r.loop = !1,
- r.anchor.set(.5, .5),
- r.x = t,
- r.y = e,
- this.gameMergeAniContiner.addChild(r),
- r.gotoAndPlay(1),
- this.itemSelectedFun(a, s),
- TweenMax.delayedCall(.3, function (t) {
- this.gameMergeAniContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t)
- }
- .bind(this), [r]),
- i.alpha = 0
- }
- .bind(this),
- onCompleteParams: [this.mergeDragedArray[0][0].x, this.mergeDragedArray[0][0].y]
- }) : this.mergePuzzleTween = TweenMax.to(i, .1, {
- x: this.mergeDragedArray[0][0].x,
- y: this.mergeDragedArray[0][0].y,
- onComplete: function (t, e) {
- r = this.effectCallBackLists.length > 0 ? this.effectCallBackLists.shift() : new gc.MovieClip("puzzle_effect_000", 1, 15, 1.5, 0),
- r.loop = !1,
- r.anchor.set(.5, .5),
- r.x = t,
- r.y = e,
- this.gameMergeAniContiner.addChild(r),
- r.gotoAndPlay(1),
- TweenMax.delayedCall(.3, function (t) {
- this.gameMergeAniContiner.removeChild(t),
- t.gotoAndStop(1),
- this.effectCallBackLists.push(t)
- }
- .bind(this), [r]),
- this.itemSelectedFun(a, s),
- this.puzzleMergeAnimation(),
- i.alpha = 0
- }
- .bind(this),
- onCompleteParams: [this.mergeDragedArray[0][0].x, this.mergeDragedArray[0][0].y]
- })
- } else {
- if (this.totalClearBlockNum++ ,
- a > 5 && 14 > a)
- this.itemSelectedFun(a, s),
- i.alpha = 0;
- else {
- if (14 == a) {
- if (console.log(22222222222),
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_mvplus"),
- this.turnCount++ ,
- this.turnCount > 5)
- try {
- this.moveNumber.fileName = "ui_move1_",
- this.moveLineContainer.removeChildren(),
- this.move5CountPopup.flag = flag
- } catch (n) { }
- this.totalScore += 300,
- this.showScoreEffect(300, s),
- this.timeAddAnimation(s[1], s[0], 1)
- } else
- this.totalScore += 100,
- this.showScoreEffect(100, s);
- this.changeBuildingMoveTime(0),
- this.buildingMoveBlockNum = 0,
- this.gameMergeAniContiner.removeChildren(),
- this.drawDragItem(),
- this.reDarwPuzzle()
- }
- this.scoreNumberText.valueTween(this.totalScore)
- }
- }
- ,
- gc.GamePlayPage.prototype.showTurnPlusAnimation = function (t, e, i) {
- if (this.turnCount += i,
- this.turnCount > 5)
- try {
- this.moveNumber.fileName = "ui_move1_",
- this.moveLineContainer.removeChildren(),
- this.move5CountPopup.flag = flag
- } catch (a) { }
- this.totalScore += 300 * i,
- this.timeAddAnimation(t, e, i)
- }
- ,
- gc.GamePlayPage.prototype.getTouchPosition = function (t) {
- var e = (t.x - this.puzzleStartX + 50) / this.pXp;
- e = Math.floor(e);
- var i = 0;
- i = e % 2 == 0 ? (t.y - this.sPuzzleStartY + 50) / this.pYp : (t.y - this.dPuzzleStartY + 50) / this.pYp,
- i = Math.floor(i);
- var a = [];
- return a.push(e),
- a.push(i),
- a
- }
- ,
- gc.GamePlayPage.prototype.initPuzzle = function () {
- this.puzzleArray = [];
- for (var t = 0; t < this.puzzleYSIZE; t++) {
- for (var e = [], i = 0; i < this.puzzleXSIZE; i++) {
- var a = []
- , s = Math.floor(100 * Math.random()) % 5 + 1;
- 0 == s && (s = 1);
- var r = null;
- r = s > 5 ? PIXI.Sprite.fromFrame("block_000" + s + ".png") : PIXI.Sprite.fromFrame(this.blockNameArray[this.stageNum] + s + ".png"),
- i % 2 == 0 ? r.y = this.sPuzzleStartY + t * this.pYp : r.y = this.dPuzzleStartY + t * this.pYp,
- r.x = this.puzzleStartX + i * this.pXp,
- r.anchor.set(.5, .5),
- this.gameBaceContiner.addChild(r),
- a.push(s),
- a.push(r),
- a.push(0);
- var n = null;
- a.push(n),
- e.push(a)
- }
- this.puzzleArray.push(e)
- }
- }
- ,
- gc.GamePlayPage.prototype.checkDragPuzzle = function () {
- for (var t = 0; 6 > t; t++)
- for (var e = 0; 7 > e; e++) {
- var i = this.puzzleArray[t][e][0];
- if (!(i > 14)) {
- if (i > 5 && 14 > i)
- return !0;
- if (14 == i) {
- var a = []
- , s = []
- , r = []
- , n = []
- , o = []
- , h = [];
- 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])),
- 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])),
- 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])),
- 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])),
- 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])),
- 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])),
- 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]))),
- h.length > 0) {
- if (a.length > 0)
- return !0;
- if (s.length > 0)
- return !0;
- if (r.length > 0)
- return !0;
- if (n.length > 0)
- return !0;
- if (o.length > 0)
- return !0
- } else {
- if (a.length > 1)
- return !0;
- if (s.length > 1)
- return !0;
- if (r.length > 1)
- return !0;
- if (n.length > 1)
- return !0;
- if (o.length > 1)
- return !0
- }
- } else {
- var l = 0
- , p = 0;
- if (t - 1 >= 0 && (i == this.puzzleArray[t - 1][e][0] && l++ ,
- 14 == this.puzzleArray[t - 1][e][0] && p++),
- 5 >= t + 1 && (i == this.puzzleArray[t + 1][e][0] && l++ ,
- 14 == this.puzzleArray[t + 1][e][0] && p++),
- e - 1 >= 0 && (i == this.puzzleArray[t][e - 1][0] && l++ ,
- 14 == this.puzzleArray[t][e - 1][0] && p++),
- 6 >= e + 1 && (i == this.puzzleArray[t][e + 1][0] && l++ ,
- 14 == this.puzzleArray[t][e + 1][0] && p++),
- e % 2 == 0 ? (e - 1 >= 0 && 5 >= t + 1 && (i == this.puzzleArray[t + 1][e - 1][0] && l++ ,
- 14 == this.puzzleArray[t + 1][e - 1][0] && p++),
- 6 >= e + 1 && 5 >= t + 1 && (i == this.puzzleArray[t + 1][e + 1][0] && l++ ,
- 14 == this.puzzleArray[t + 1][e + 1][0] && p++)) : (e - 1 >= 0 && t - 1 >= 0 && (i == this.puzzleArray[t - 1][e - 1][0] && l++ ,
- 14 == this.puzzleArray[t - 1][e - 1][0] && p++),
- 6 >= e + 1 && t - 1 >= 0 && (i == this.puzzleArray[t - 1][e + 1][0] && l++ ,
- 14 == this.puzzleArray[t - 1][e + 1][0] && p++)),
- l + p >= 2 && l >= 1)
- return !0
- }
- }
- }
- return !1
- }
- ,
- gc.GamePlayPage.prototype.pause = function () { }
- ,
- gc.GamePlayPage.prototype.resume = function () { }
- ,
- gc.GamePlayPage.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GamePopup = function () {
- PIXI.Container.call(this),
- this.shadow = PIXI.Sprite.fromFrame("puzzle_popup_shadow.png"),
- this.popupSprite = PIXI.Sprite.fromFrame("ui_start1.png"),
- this.popupSprite.anchor.set(.5, .5),
- this.popupSprite.x = GD.width / 2,
- this.popupSprite.y = GD.height / 2 + 200,
- this.tweenTime = 2,
- this.tweenMax = null,
- this.shadow.anchor.set(.5, 0),
- this.shadow.x = GD.width / 2,
- this.shadow.y = .417 * GD.height,
- this.addChild(this.shadow),
- this.addChild(this.popupSprite),
- this.countryFlagSprite = PIXI.Sprite.fromFrame("ui_nation_0001.png"),
- this.countryFlagSprite.anchor.set(.5, .5),
- this.countryFlagSprite.x = GD.width / 2,
- this.countryFlagSprite.y = .7 * GD.height
- }
- ,
- gc.GamePopup.constructor = gc.GamePopup,
- gc.GamePopup.prototype = Object.create(PIXI.Container.prototype),
- gc.GamePopup.prototype.showPopup = function (t) {
- null != this.tweenMax && this.tweenMax.kill(!1);
- var e = !0;
- if (0 == t)
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_start"),
- this.popupSprite.texture = PIXI.Texture.fromFrame("ui_start.png"),
- this.removeChild(this.popupSprite);
- else if (1 == t) {
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_stage");
- var i = Math.ceil(this.parent.stageNum / 2);
- this.popupSprite.texture = PIXI.Texture.fromFrame("ui_nation_000" + i + ".png")
- } else if (2 == t)
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_clear"),
- this.popupSprite.texture = PIXI.Texture.fromFrame("ui_clear1.png");
- else if (3 == t)
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_clear"),
- this.popupSprite.texture = PIXI.Texture.fromFrame("ui_clear2.png");
- else if (4 == t)
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_gameover"),
- this.popupSprite.texture = PIXI.Texture.fromFrame("ui_gameover.png");
- else if (5 == t)
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_fever"),
- this.popupSprite.texture = PIXI.Texture.fromFrame("ui_bonus.png");
- else if (6 == t) {
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_stage");
- var i = Math.ceil(this.parent.stageNum / 2);
- this.popupSprite.texture = PIXI.Texture.fromFrame("ui_nation_0001.png")
- } else
- gc.soundFlag && !gc.deviceStopFlag && GD.soundPlay("sound_start"),
- this.popupSprite.texture = PIXI.Texture.fromFrame("ui_start1.png"),
- this.removeChild(this.popupSprite),
- e = !1;
- if (e)
- this.addChild(this.popupSprite),
- gc.isLowPhone ? (this.popupSprite.scale.set(1),
- 0 == t ? this.tweenMax = TweenMax.from(this.popupSprite.scale, this.tweenTime, {
- x: 1,
- y: 1,
- onComplete: function (t) {
- this.parent.popupCloseCallBack(t)
- }
- .bind(this),
- onCompleteParams: [t]
- }) : this.tweenMax = TweenMax.from(this.popupSprite, this.tweenTime, {
- y: "-=0",
- onComplete: function (t) {
- this.parent.popupCloseCallBack(t)
- }
- .bind(this),
- onCompleteParams: [t]
- })) : 0 == t ? this.tweenMax = TweenMax.from(this.popupSprite.scale, this.tweenTime, {
- x: .2,
- y: .2,
- ease: Elastic.easeOut,
- onComplete: function (t) {
- this.parent.popupCloseCallBack(t)
- }
- .bind(this),
- onCompleteParams: [t]
- }) : this.tweenMax = TweenMax.from(this.popupSprite, this.tweenTime, {
- y: -this.popupSprite.height / 2,
- ease: Elastic.easeOut,
- onComplete: function (t) {
- this.parent.popupCloseCallBack(t)
- }
- .bind(this),
- onCompleteParams: [t]
- });
- else {
- var i = Math.ceil(this.parent.stageNum / 2);
- this.countryFlagSprite.texture = PIXI.Texture.fromFrame("ui_nation_000" + i + ".png"),
- this.addChild(this.countryFlagSprite),
- gc.isLowPhone ? (this.countryFlagSprite.scale.set(1),
- TweenMax.from(this.countryFlagSprite.scale, .5, {
- x: 1,
- y: 1,
- onComplete: function () {
- this.addChild(this.popupSprite),
- this.popupSprite.y = GD.height / 2,
- this.tweenMax = TweenMax.from(this.popupSprite, this.tweenTime, {
- delay: .5,
- y: GD.height / 2,
- onStart: function () {
- this.removeChild(this.countryFlagSprite)
- }
- .bind(this),
- onComplete: function (t) {
- this.parent.popupCloseCallBack(t)
- }
- .bind(this),
- onCompleteParams: [t]
- })
- }
- .bind(this)
- })) : TweenMax.from(this.countryFlagSprite.scale, .5, {
- x: 1.5,
- y: 1.5,
- onComplete: function () {
- this.addChild(this.popupSprite),
- this.tweenMax = TweenMax.from(this.popupSprite, this.tweenTime, {
- delay: 1,
- y: -this.popupSprite.height / 2,
- ease: Elastic.easeOut,
- onStart: function () {
- this.removeChild(this.countryFlagSprite)
- }
- .bind(this),
- onComplete: function (t) {
- this.parent.popupCloseCallBack(t)
- }
- .bind(this),
- onCompleteParams: [t]
- })
- }
- .bind(this)
- })
- }
- }
- ,
- gc.GamePopup.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameScoreEffectContianer = function () {
- PIXI.Container.call(this),
- this.scoreTxtLists = []
- }
- ,
- gc.GameScoreEffectContianer.constructor = gc.GameScoreEffectContianer,
- gc.GameScoreEffectContianer.prototype = Object.create(PIXI.Container.prototype),
- gc.GameScoreEffectContianer.prototype.init = function () {
- this.removeAll()
- }
- ,
- gc.GameScoreEffectContianer.prototype.showScore = function (t, e, i) {
- var a = null
- , s = null;
- a = this.scoreTxtLists.length > 0 ? this.scoreTxtLists.shift() : new gc.NumberText("ui_effec_score", "center", -3),
- a.x = e,
- a.y = i - 20,
- this.addChild(a),
- a.setValue(t),
- a.scale.set(1),
- a.alpha = 1,
- s = new TimelineMax,
- s.to(a.scale, .3, {
- x: 1.5,
- y: 1.5,
- yoyo: !0,
- repeat: 0,
- ease: Elastic.easeOut
- }),
- s.to(a, .3, {
- y: "-=50",
- alpha: .5,
- onComplete: function (t, e) {
- try {
- this.removeChild(t),
- e.kill(!1),
- e = null
- } catch (i) { }
- }
- .bind(this),
- onCompleteParams: [a, s],
- ease: Sine.easeOut
- })
- }
- ,
- gc.GameScoreEffectContianer.prototype.removeAll = function () {
- this.removeChildren()
- }
- ,
- gc.GameScoreEffectContianer.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameSoundPopup = function () {
- PIXI.Container.call(this),
- this.darkBg = new PIXI.Graphics,
- this.darkBg.lineStyle(1, 0, 1),
- this.darkBg.beginFill(0, .8),
- this.darkBg.drawRect(0, 0, gc.width, gc.height),
- this.darkBg.endFill(),
- this.darkBg.interactive = !0,
- this.setTouchEnd(this.darkBg),
- this.bg = PIXI.Sprite.fromFrame("popup_sound.png"),
- this.bg.anchor.set(.5),
- this.bg.x = GD.width / 2,
- this.bg.y = GD.height / 2,
- this.exitBtn = PIXI.Sprite.fromFrame("btn_exit.png"),
- this.exitBtn.anchor.set(.5),
- this.exitBtn.x = 230,
- this.exitBtn.y = -250,
- this.bg.addChild(this.exitBtn),
- this.bgmBtn = PIXI.Sprite.fromFrame("sound_btn_bg1.png"),
- this.bgmBtn.anchor.set(.5),
- this.bgmBtn.y = -10,
- this.bg.addChild(this.bgmBtn),
- this.effectBtn = PIXI.Sprite.fromFrame("sound_btn_effect1.png"),
- this.effectBtn.anchor.set(.5),
- this.effectBtn.y = 110,
- this.bg.addChild(this.effectBtn),
- this.setTouchStartAction(this.bgmBtn, this.clickedBgmBtn, this),
- this.setTouchStartAction(this.effectBtn, this.clickedEffectBtn, this),
- this.setTouchStart(this.exitBtn, this.closePopup, this)
- }
- ,
- gc.GameSoundPopup.constructor = gc.GameSoundPopup,
- gc.GameSoundPopup.prototype = Object.create(PIXI.Container.prototype),
- gc.GameSoundPopup.prototype.init = function () {
- this.removeAll(),
- this.setInteractive(!1),
- this.initBtnSta(),
- this.addChild(this.darkBg),
- this.addChild(this.bg),
- this.bg.scale.set(.1),
- TweenMax.to(this.bg.scale, .2, {
- x: 1,
- y: 1,
- ease: Back.easeOut,
- onComplete: this.endBgMotion.bind(this)
- })
- }
- ,
- gc.GameSoundPopup.prototype.endBgMotion = function () {
- this.setInteractive(!0)
- }
- ,
- gc.GameSoundPopup.prototype.initBtnSta = function () {
- gc.bgmFlag ? this.bgmBtn.texture = PIXI.Texture.fromFrame("sound_btn_bg1.png") : this.bgmBtn.texture = PIXI.Texture.fromFrame("sound_btn_bg2.png"),
- gc.soundFlag ? this.effectBtn.texture = PIXI.Texture.fromFrame("sound_btn_effect1.png") : this.effectBtn.texture = PIXI.Texture.fromFrame("sound_btn_effect2.png")
- }
- ,
- gc.GameSoundPopup.prototype.closePopup = function () {
- this.setInteractive(!1),
- this.removeAll(),
- this.emit("CLOSE_SOUND_POPUP")
- }
- ,
- gc.GameSoundPopup.prototype.clickedBgmBtn = function () {
- gc.bgmFlag ? GD.bgmStop() : GD.bgmPlay(1),
- gc.bgmFlag = !gc.bgmFlag,
- gc.setStorage(gc.storagebgm, gc.bgmFlag),
- this.initBtnSta()
- }
- ,
- gc.GameSoundPopup.prototype.clickedEffectBtn = function () {
- gc.soundFlag = !gc.soundFlag,
- gc.setStorage(gc.storagesound, gc.soundFlag),
- gc.soundFlag || gc.stopAllEffectSound(),
- this.initBtnSta()
- }
- ,
- gc.GameSoundPopup.prototype.setInteractive = function (t) {
- this.bgmBtn.interactive = t,
- this.effectBtn.interactive = t,
- this.exitBtn.interactive = t
- }
- ,
- gc.GameSoundPopup.prototype.removeAll = function () {
- this.removeChildren()
- }
- ,
- gc.GameSoundPopup.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameStage = function () {
- PIXI.Container.call(this),
- this.GamePlayPage = new gc.GamePlayPage,
- this.tutorialContianer = new gc.GameTutorial,
- this.soundPopup = new gc.GameMainSound
- }
- ,
- gc.GameStage.constructor = gc.GameStage,
- gc.GameStage.prototype = Object.create(PIXI.Container.prototype),
- gc.GameStage.prototype.init = function () {
- this.mainPageContainer = new PIXI.Container,
- this.gameStartBt = PIXI.Sprite.fromFrame("intro_start_btn.png"),
- this.gameStartBt.anchor.set(.5, .5),
- this.gameStartBt.y = .885 * GD.height,
- this.gameStartBt.x = GD.width / 2,
- this.gameHelpBt = PIXI.Sprite.fromFrame("intro_help_btn.png"),
- this.gameHelpBt.anchor.set(.5, .5),
- this.gameHelpBt.y = .828 * GD.height,
- this.gameHelpBt.x = .855 * GD.width,
- this.gameSoundBt = PIXI.Sprite.fromFrame("intro_option_btn.png"),
- this.gameSoundBt.anchor.set(.5, .5),
- this.gameSoundBt.y = .828 * GD.height,
- this.gameSoundBt.x = .16 * GD.width,
- this.gameBg = new PIXI.Sprite(GD.loader.resources.introbg.texture),
- this.mainPageContainer.addChild(this.gameBg),
- this.mainPageContainer.addChild(this.gameStartBt),
- this.mainPageContainer.addChild(this.gameHelpBt),
- this.mainPageContainer.addChild(this.gameSoundBt),
- this.addChild(this.mainPageContainer),
- this.gameStartBt.interactive = !0,
- this.gameStartBt.mousedown = this.gameStartBt.touchstart = function (t) {
- t.stopPropagation(),
- this.gameStartBt.interactive = !1,
- this.gameHelpBt.interactive = !1,
- this.gameSoundBt.interactive = !1,
- TweenMax.to(this.gameStartBt.scale, .05, {
- x: 1.1,
- y: 1.1,
- onComplete: function () {
- if (this.gameStartBt.scale.x = 1,
- this.gameStartBt.scale.y = 1,
- this.GamePlayPage.init(),
- this.addChild(this.GamePlayPage),
- GD.soundPlay("sound_bgm"),
- !gc.bgSound) {
- var t = gc.totolSound;
- gc.totolSound = !0,
- GD.soundStop("sound_bgm"),
- gc.totolSound = t
- }
- }
- .bind(this),
- ease: Linear.easeInOut
- })
- }
- .bind(this),
- this.gameHelpBt.interactive = !0,
- this.gameHelpBt.mousedown = this.gameHelpBt.touchstart = function (t) {
- t.stopPropagation(),
- this.gameHelpBt.interactive = !1,
- TweenMax.to(this.gameHelpBt.scale, .05, {
- x: 1.1,
- y: 1.1,
- onComplete: function () {
- this.gameHelpBt.scale.x = 1,
- this.gameHelpBt.scale.y = 1,
- this.addChild(this.tutorialContianer)
- }
- .bind(this),
- ease: Linear.easeInOut
- })
- }
- .bind(this),
- this.gameSoundBt.interactive = !0,
- this.gameSoundBt.mousedown = this.gameSoundBt.touchstart = function (t) {
- t.stopPropagation(),
- this.gameSoundBt.interactive = !1,
- TweenMax.to(this.gameSoundBt.scale, .05, {
- x: 1.1,
- y: 1.1,
- onComplete: function () {
- this.gameSoundBt.scale.x = 1,
- this.gameSoundBt.scale.y = 1,
- this.soundPopup.initBtType(),
- this.addChild(this.soundPopup),
- this.gameSoundBt.interactive = !0
- }
- .bind(this),
- ease: Linear.easeInOut
- })
- }
- .bind(this)
- }
- ,
- gc.GameStage.prototype.showTutu = function () {
- this.tutorialContianer.changeBtType(1),
- this.addChild(this.tutorialContianer)
- }
- ,
- gc.GameStage.prototype.removeTutu = function () {
- this.removeChild(this.tutorialContianer)
- }
- ,
- gc.GameStage.prototype.tutorialToGame = function () {
- if (GD.soundPlay("sound_bgm"),
- gc.soundLoop("sound_bgm", !0),
- !gc.bgSound) {
- var t = gc.totolSound;
- gc.totolSound = !0,
- GD.soundStop("sound_bgm"),
- gc.totolSound = t
- }
- this.removeChild(this.tutorialContianer),
- this.GamePlayPage.init(),
- this.addChild(this.GamePlayPage),
- this.gameStartBt.interactive = !1
- }
- ,
- gc.GameStage.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameStageClearPopup = function () {
- PIXI.Container.call(this),
- this.countryArry = ["", "pic_korea.png", "pic_china.png", "pic_egypt.png", "pic_greece.png", "pic_france.png", "pic_brazil.png", "pic_america.png"],
- this.countryTextArray = ["", "result_korea.png", "result_china.png", "result_egypt.png", "result_greece.png", "result_france.png", "result_brazil.png", "result_america.png"],
- this.popupBG = new PIXI.Sprite(GD.loader.resources.uishadow.texture),
- this.popupBG.alpha = .8,
- this.bg = PIXI.Sprite.fromFrame("result_korea.png"),
- this.bg.anchor.set(.5),
- this.bg.x = GD.width / 2,
- this.bg.y = GD.height / 2,
- this.countryText = PIXI.Sprite.fromFrame("result_korea.png"),
- this.countryText.anchor.set(.5, .5),
- this.countryText.x = GD.width / 2 - 360,
- this.countryText.y = 250 - GD.height / 2,
- this.countryPic = PIXI.Sprite.fromFrame("pic_korea.png"),
- this.countryPic.anchor.set(.5, .5),
- this.countryPic.x = GD.width / 2 - 360,
- this.countryPic.y = 510 - GD.height / 2,
- this.resultList = PIXI.Sprite.fromFrame("result_list.png"),
- this.resultList.anchor.set(.5, .5),
- this.resultList.x = GD.width / 2 - 360,
- this.resultList.y = 800 - GD.height / 2,
- this.bonusMove = new gc.NumberText("result_moves_", "left", 0),
- this.bonusMove.x = -25,
- this.bonusMove.y = 770 - GD.height / 2,
- this.bonusClear = new gc.NumberText("result_clear_", "center", 0),
- this.bonusClear.x = GD.width / 2 - 360,
- this.bonusClear.y = 900 - GD.height / 2
- }
- ,
- gc.GameStageClearPopup.constructor = gc.GameStageClearPopup,
- gc.GameStageClearPopup.prototype = Object.create(PIXI.Container.prototype),
- gc.GameStageClearPopup.prototype.show = function (t, e) {
- this.removeChildren();
- var i = Math.ceil((this.parent.stageNum - 1) / 2);
- this.countryText.texture = PIXI.Texture.fromFrame(this.countryTextArray[i]),
- this.countryPic.texture = PIXI.Texture.fromFrame(this.countryArry[i]),
- this.bonusMove.setValue(t),
- this.bonusClear.setValue(e),
- this.addChild(this.popupBG),
- this.addChild(this.bg),
- this.bg.addChild(this.countryText),
- this.bg.addChild(this.countryPic),
- this.bg.addChild(this.resultList),
- this.bg.addChild(this.bonusMove),
- this.bg.addChild(this.bonusClear)
- }
- ,
- gc.GameStageClearPopup.prototype.remove = function () {
- this.removeChildren()
- }
- ,
- gc.GameStageClearPopup.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameIntro = function () {
- PIXI.Container.call(this),
- this.bg = PIXI.Sprite.fromFrame("intro_bg.png"),
- // this.allPlayIcon = PIXI.Sprite.fromFrame("common_game_grade.png"),
- // this.allPlayIcon.anchor.set(.5),
- // this.allPlayIcon.x = 650,
- // this.allPlayIcon.y = 80,
- this.soundBtn = PIXI.Sprite.fromFrame("intro_option_btn.png"),
- this.soundBtn.anchor.set(.5),
- this.soundBtn.x = 620,
- this.soundBtn.y = 1e3,
- this.setTouchStartAction(this.soundBtn, this.clickedSoundBtn, this),
- this.startBtn = PIXI.Sprite.fromFrame("intro_start_btn.png"),
- this.startBtn.anchor.set(.5),
- this.startBtn.x = 360,
- this.startBtn.y = 1e3,
- this.setTouchStartAction(this.startBtn, this.clickedStartBtn, this),
- this.tutorialBtn = PIXI.Sprite.fromFrame("intro_help_btn.png"),
- this.tutorialBtn.anchor.set(.5),
- this.tutorialBtn.x = 100,
- this.tutorialBtn.y = 1e3,
- this.setTouchStartAction(this.tutorialBtn, this.clickedTutBtn, this),
- // this.cropRightTxt = PIXI.Sprite.fromFrame("copyright_1.png"),
- // this.cropRightTxt.anchor.set(.5),
- // this.cropRightTxt.x = gc.width / 2,
- // this.cropRightTxt.y = gc.height - this.cropRightTxt.height / 2,
- this.soundPopup = new gc.GameMainSoundPopup,
- this.soundPopup.on("POPUP_CLOSE_EVENT", this.closeSoundPopup.bind(this)),
- this.tutorialPopup = new gc.GameTutorial,
- this.tutorialPopup.on("TUTORIAL_POPUP_CLOSE_EVENT", this.closeTutorial.bind(this))
- }
- ,
- gc.GameIntro.constructor = gc.GameIntro,
- gc.GameIntro.prototype = Object.create(PIXI.Container.prototype),
- gc.GameIntro.prototype.init = function () {
- this.removeAll(),
- this.addChild(this.bg),
- // this.addChild(this.allPlayIcon),
- this.addChild(this.soundBtn),
- this.addChild(this.startBtn),
- this.addChild(this.tutorialBtn),
- // this.addChild(this.cropRightTxt),
- this.setInteractive(!0)
- }
- ,
- gc.GameIntro.prototype.clickedStartBtn = function () {
- this.emit("GAMESTART_EVENT"),
- this.setInteractive(!1)
- }
- ,
- gc.GameIntro.prototype.clickedSoundBtn = function () {
- this.setInteractive(!1),
- this.soundPopup.init(),
- this.addChild(this.soundPopup)
- }
- ,
- gc.GameIntro.prototype.clickedTutBtn = function () {
- this.setInteractive(!1),
- this.tutorialPopup.initPage(),
- this.addChild(this.tutorialPopup)
- GD.objSdk.hideAdIcon();
- }
- ,
- gc.GameIntro.prototype.closeTutorial = function () {
- this.tutorialPopup.parent && this.removeChild(this.tutorialPopup),
- this.setInteractive(!0)
- GD.objSdk.showAdIcon(10, 720);
- }
- ,
- gc.GameIntro.prototype.closeSoundPopup = function () {
- this.setInteractive(!0),
- this.soundPopup.parent && this.removeChild(this.soundPopup)
- }
- ,
- gc.GameIntro.prototype.setInteractive = function (t) {
- this.soundBtn.interactive = t,
- this.startBtn.interactive = t,
- this.tutorialBtn.interactive = t
- }
- ,
- gc.GameIntro.prototype.removeAll = function () {
- this.removeChildren()
- }
- ,
- gc.GameIntro.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- !function () {
- function t() {
- var t = "win16|win32|win64|mac";
- navigator.platform && 0 > t.indexOf(navigator.platform.toLowerCase()) && (navigator.userAgent.match(/Android 4./) ? gc.isLowPhone = !0 : gc.isLowPhone = !1,
- (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i)) && (gc.phoneType = "io")),
- e()
- }
- function e() {
- var t = ["sound_bgm"]
- , 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"];
- 1 == GD.soundType && (t = t.concat(e)),
- GD.loadSound(t, i)
- }
- function i() {
- loading.hide(),
- GD.stage.removeChild(loading),
- lodingOverFlag = !0,
- a()
- }
- function a() {
- var t = gc.getStorage(gc.storagesound)
- , e = gc.getStorage(gc.storagebgm);
- t && ("true" == t ? gc.soundFlag = !0 : gc.soundFlag = !1),
- e && ("true" == e ? gc.bgmFlag = !0 : gc.bgmFlag = !1),
- GD.stage.removeChildren(),
- gc.state = "intro",
- gc.introPage || (gc.introPage = new gc.GameIntro,
- gc.introPage.on("GAMESTART_EVENT", gc.onGame.bind(this))),
- gc.introPage.init(),
- GD.stage.addChild(gc.introPage);
- objSdk.showAdIcon(10, 720);
- GD.app.ticker.add(objSdk.update, null, PIXI.UPDATE_PRIORITY.UTILITY);
- }
- function s() {
- gc.isPaused = !0,
- gc.game.pauseGame()
- }
- function r() {
- gc.isPaused = !1,
- gc.game.resumeGame()
- }
- GD.init(gc.width, gc.height, 0, 0, 16777215),
- loading = new GD.Progress,
- loading.show(),
- GD.stage.addChild(loading),
- GD.loader.add("help1", RES_DIR_IMG + "intro_tutorial/help_page_0001.png"),
- GD.loader.add("help2", RES_DIR_IMG + "intro_tutorial/help_page_0002.png"),
- GD.loader.add("help3", RES_DIR_IMG + "intro_tutorial/help_page_0003.png"),
- GD.loader.add("help4", RES_DIR_IMG + "intro_tutorial/help_page_0004.png"),
- GD.loader.add("uishadow", RES_DIR_IMG + "ui_shadow.png"),
- GD.loader.add("stage1", RES_DIR_IMG + "stage_1.png"),
- GD.loader.add("stage2", RES_DIR_IMG + "stage_2.png"),
- GD.loader.add("stage3", RES_DIR_IMG + "stage_3.png"),
- GD.loader.add("stage4", RES_DIR_IMG + "stage_4.png"),
- GD.loader.add("stage5", RES_DIR_IMG + "stage_5.png"),
- GD.loader.add("stage6", RES_DIR_IMG + "stage_6.png"),
- GD.loader.add("stage7", RES_DIR_IMG + "stage_7.png"),
- GD.loader.add("stage8", RES_DIR_IMG + "stage_8.png"),
- GD.loader.add("stage9", RES_DIR_IMG + "stage_9.png"),
- GD.loader.add("stage10", RES_DIR_IMG + "stage_10.png"),
- GD.loader.add("stage11", RES_DIR_IMG + "stage_11.png"),
- GD.loader.add("stage12", RES_DIR_IMG + "stage_12.png"),
- GD.loader.add("stage13", RES_DIR_IMG + "stage_13.png"),
- GD.loader.add("stage14", RES_DIR_IMG + "stage_14.png"),
- GD.loader.add(RES_DIR_IMG + "gameLodingPage.json"),
- GD.loader.add(RES_DIR_IMG + "daytonight/daytonight1.json"),
- GD.loader.add(RES_DIR_IMG + "daytonight/daytonight2.json"),
- GD.loader.add(RES_DIR_IMG + "daytonight/daytonight3.json"),
- GD.loader.add(RES_DIR_IMG + "daytonight/daytonight4.json"),
- GD.loader.add(RES_DIR_IMG + "intro.json"),
- GD.loader.add(RES_DIR_IMG + "effect.json"),
- GD.loader.add(RES_DIR_IMG + "gameblock.json"),
- GD.loader.add(RES_DIR_IMG + "game_result.json"),
- GD.loader.add(RES_DIR_IMG + "stage/puzzleBlock.json"),
- GD.loader.add(RES_DIR_IMG + "stage/koreaBuilding.json"),
- GD.loader.add(RES_DIR_IMG + "stage/koreaBlock.json"),
- GD.loader.add(RES_DIR_IMG + "stage/chinaBlock.json"),
- GD.loader.add(RES_DIR_IMG + "stage/chinaBuilding.json"),
- GD.loader.add(RES_DIR_IMG + "stage/egyptBlock.json"),
- GD.loader.add(RES_DIR_IMG + "stage/egyptBuilding.json"),
- GD.loader.add(RES_DIR_IMG + "stage/greeceBlock.json"),
- GD.loader.add(RES_DIR_IMG + "stage/greeceBuilding.json"),
- GD.loader.add(RES_DIR_IMG + "stage/americaBlock.json"),
- GD.loader.add(RES_DIR_IMG + "stage/americaBuilding.json"),
- GD.loader.add(RES_DIR_IMG + "stage/franceBlock.json"),
- GD.loader.add(RES_DIR_IMG + "stage/franceBuilding.json"),
- GD.loader.add(RES_DIR_IMG + "stage/brazilBlock.json"),
- GD.loader.add(RES_DIR_IMG + "stage/stageClear.json"),
- GD.loader.add(RES_DIR_IMG + "stage/brazilBuilding.json"),
- GD.loader.add(RES_DIR_IMG + "stagechange/endingpage.json"),
- GD.loader.add(RES_DIR_IMG + "transport2.json"),
- GD.loader.add(RES_DIR_IMG + "kariNormal/ui_speech.json"),
- GD.loader.add("tutoriaSpine", RES_DIR_IMG + "intro_tutorial/skeleton.json"),
- GD.loader.add("spineCharacter", RES_DIR_IMG + "skeleton.json"),
- GD.loader.add("clearSpine", RES_DIR_IMG + "stageclear/skeleton.json"),
- GD.loader.add("failSpine", RES_DIR_IMG + "stagefail/skeleton.json"),
- GD.loader.add("kariNormal", RES_DIR_IMG + "kariNormal/skeleton.json"),
- GD.loader.add("moveLineSpine", RES_DIR_IMG + "movelinespine/skeleton.json"),
- GD.loader.load(t),
- GD.gameId = "PUZZLE_TRIP",
- !gc.localTest;
- gc.onGame = function () {
- GD.stage.removeChildren(),
- gc.gameOver = !1,
- gc.soundPopup || (gc.soundPopup = new gc.GameSoundPopup,
- gc.soundPopup.on("CLOSE_SOUND_POPUP", r),
- gc.soundPopup.parent && GD.stage.removeChild(gc.soundPopup));
- var t = PIXI.Sprite.fromFrame("sound_btn_on.png");
- t.anchor.set(.5, .5),
- t.x = .94 * GD.width,
- t.y = 110 || .04 * GD.height,
- t.interactive = !0,
- t.mousedown = t.touchstart = function (t) {
- t.stopPropagation(),
- s(),
- gc.soundPopup.init(),
- GD.stage.addChild(gc.soundPopup)
- }
- ,
- "ios" == GD.AGENT && (t.x = GD.width + 500),
- gc.soundBt = t,
- gc.state = "game",
- gc.game || (gc.game = new gc.GamePlayPage,
- gc.game.on("GOTO_MAINPAGE", a.bind(this))),
- gc.game.init(),
- GD.stage.addChild(gc.game),
- GD.stage.addChild(t)
- GD.objSdk.hideAdIcon();
- }
- }()
- }
- , function (t, e) {
- NoHeartPopup = function () {
- this.darkBg = null,
- this.bg = null,
- this.txt = null,
- this.closeBtn = null,
- this.imgScale = 1.4,
- PIXI.Container.call(this)
- }
- ,
- NoHeartPopup.constructor = NoHeartPopup,
- NoHeartPopup.prototype = Object.create(PIXI.Container.prototype),
- NoHeartPopup.prototype.init = function () {
- this.removeChildren(),
- this.darkBg || (this.darkBg = new PIXI.Graphics,
- this.darkBg.beginFill("0x000000", .9),
- this.darkBg.lineStyle(0, 0, 0),
- this.darkBg.drawRect(0, 0, GD.width, GD.height),
- this.darkBg.endFill()),
- this.addChild(this.darkBg),
- this.bg || (this.bg = new PIXI.Sprite.fromFrame("popup_chance.png"),
- this.bg.anchor.set(.5),
- this.bg.scale.set(this.imgScale),
- this.bg.x = GD.width / 2,
- this.bg.y = GD.height / 2),
- this.addChild(this.bg),
- this.closeBtn || (this.closeBtn = new PIXI.Sprite.fromFrame("btn_identify.png"),
- this.closeBtn.anchor.set(.5),
- this.closeBtn.scale.set(this.imgScale),
- this.closeBtn.x = GD.width / 2,
- this.closeBtn.y = GD.height / 2 + 115,
- this.closeBtn.interactive = !0,
- this.closeBtn.mousedown = this.closeBtn.touchstart = this.close.bind(this)),
- this.addChild(this.closeBtn)
- }
- ,
- NoHeartPopup.prototype.close = function () {
- OcbApplicationJS.requestCloseWindow()
- }
- }
- , function (t, e) {
- ResultNumberText = function (t, e, i, a, s, r) {
- this.CENTER = "center",
- this.RIGHT = "right",
- this.LEFT = "left",
- this.value = 0,
- this.isChange = !1,
- this.list = [],
- this.tmpList = [],
- this.fileName = t,
- this.align = e,
- this.space = i,
- this.iconName = a,
- this.iconAlign = s,
- this.commaName = r,
- this.icon = null,
- PIXI.Container.call(this),
- this.container = new PIXI.Container,
- this.addChild(this.container),
- this.setValue(0)
- }
- ,
- ResultNumberText.constructor = ResultNumberText,
- ResultNumberText.prototype = Object.create(PIXI.Container.prototype),
- ResultNumberText.prototype.setValue = function (t) {
- this.value = t,
- this.isChange = !0
- }
- ,
- ResultNumberText.prototype.getNumberSprite = function (t) {
- var e, i = this.fileName + CipherCheck.create(t) + ".png";
- return this.tmpList.length > 0 ? (e = this.tmpList.shift(),
- e.texture = PIXI.Texture.fromFrame(i)) : e = PIXI.Sprite.fromFrame(i),
- e
- }
- ,
- ResultNumberText.prototype.getCommaSprite = function () {
- var t, e = this.commaName + ".png";
- return this.tmpList.length > 0 ? (t = this.tmpList.shift(),
- t.texture = PIXI.Texture.fromFrame(e)) : t = PIXI.Sprite.fromFrame(e),
- t
- }
- ,
- ResultNumberText.prototype.removeAll = function () {
- for (var t, e = this.list.length; e--;)
- t = this.list.shift(),
- this.tmpList.push(t);
- this.container && this.container.removeChildren()
- }
- ,
- ResultNumberText.prototype.updateTransform = function () {
- if (this.isChange) {
- this.removeAll();
- var t, e, i = this.commaName ? Util.comma(this.value) : this.value.toString(), a = 0, s = 0, r = i.length;
- for (this.iconName && (this.icon || (this.icon = PIXI.Sprite.fromFrame(this.iconName)),
- this.container.addChild(this.icon),
- "left" == this.iconAlign && (s += this.icon.width + this.space)); r--;)
- e = i.substr(a, 1),
- t = "," == e ? this.getCommaSprite() : this.getNumberSprite(parseInt(e) + 1),
- t.x = s,
- s += t.width,
- r > 0 && (s += this.space),
- a++ ,
- this.container.addChild(t),
- this.list[r] = t;
- "right" == this.iconAlign && (this.icon.x = s,
- s += this.icon.width + this.space),
- this.align == this.CENTER ? this.container.x = -s / 2 : this.align == this.RIGHT && (this.container.x = -s),
- this.isChange = !1
- }
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.ResultView = function () {
- PIXI.Container.call(this),
- this.darkBg = new PIXI.Graphics,
- this.darkBg.lineStyle(1, 0, 1),
- this.darkBg.beginFill(0, .8),
- this.darkBg.drawRect(0, 0, gc.width, gc.height),
- this.darkBg.endFill(),
- this.darkBg.interactive = !0,
- this.setTouchEnd(this.darkBg),
- this.bg = PIXI.Sprite.fromFrame("popup_bg1.png"),
- this.bg.anchor.set(.5),
- this.bg.x = gc.width / 2,
- this.bg.y = gc.height / 2,
- this.scoreTxt = new gc.NumberText("c_score_0", "center", 0, null, null, "c_score_11"),
- this.scoreTxt.x = 0,
- this.scoreTxt.y = -130,
- this.scoreTxt.setValue(1e6),
- this.bg.addChild(this.scoreTxt),
- this.bestScoreTxt = new gc.NumberText("c_score2_0", "center", 0, null, null, "c_score2_11"),
- this.bestScoreTxt.x = 0,
- this.bestScoreTxt.y = 20,
- this.bg.addChild(this.bestScoreTxt),
- this.gropImg = PIXI.Sprite.fromFrame("popup_icon_1.png"),
- this.gropImg.anchor.set(.5),
- this.gropImg.x = 30,
- this.gropImg.y = 97,
- this.bg.addChild(this.gropImg),
- this.reStartBtn = PIXI.Sprite.fromFrame("popup_bt_retry.png"),
- this.reStartBtn.anchor.set(.5),
- this.reStartBtn.y = 220,
- this.bg.addChild(this.reStartBtn),
- this.setTouchStartAction(this.reStartBtn, function () {
- this.requestCloseWindow()
- }, this),
- this.errorMessageTxt = new PIXI.Text("게임 점수 저장에 실패 했습니다.\n다시 한번 게임에 참여 해 주세요.", {
- fontSize: "24px",
- fontWeight: "bold"
- }),
- this.errorMessageTxt.anchor.set(.5),
- this.errorMessageTxt.x = 0,
- this.errorMessageTxt.y = 50,
- this.bg.addChild(this.errorMessageTxt)
- }
- ,
- gc.ResultView.constructor = gc.ResultView,
- gc.ResultView.prototype = Object.create(PIXI.Container.prototype),
- gc.ResultView.prototype.init = function (t, e, i, a, s, r) {
- this.removeAll(),
- 0 >= t ? this.scoreTxt.setValue(0) : this.scoreTxt.setValue(t),
- 0 >= e ? this.bestScoreTxt.setValue(0) : this.bestScoreTxt.setValue(e);
- var n = !1;
- "DIAMOND" == a ? (n = !0,
- this.gropImg.texture = PIXI.Texture.fromFrame("popup_icon_1.png")) : "GOLD" == a ? (n = !0,
- this.gropImg.texture = PIXI.Texture.fromFrame("popup_icon_2.png")) : "SILVER" == a ? (n = !0,
- this.gropImg.texture = PIXI.Texture.fromFrame("popup_icon_3.png")) : "BRONZE" == a && (n = !0,
- this.gropImg.texture = PIXI.Texture.fromFrame("popup_icon_4.png")),
- n ? this.gropImg.visible = !0 : this.gropImg.visible = !1,
- this.initPage(s, r),
- this.addChild(this.darkBg),
- this.addChild(this.bg),
- this.setInteractive(!0)
- }
- ,
- gc.ResultView.prototype.initPage = function (t, e) {
- 1 == t ? (this.bg.texture = PIXI.Texture.fromFrame("popup_bg1.png"),
- this.scoreTxt.x = 0,
- this.scoreTxt.y = -130,
- this.reStartBtn.y = 220,
- this.bestScoreTxt.visible = !0,
- this.errorMessageTxt.visible = !1) : (1 == e ? this.errorMessageTxt.text = "게임 점수 저장에 실패 했습니다.\n다시 한번 게임에 참여 해 주세요." : this.errorMessageTxt.text = "비로그인 시에는 점수가\n 저장되지 않습니다.",
- this.bg.texture = PIXI.Texture.fromFrame("popup_bg4.png"),
- this.scoreTxt.x = 0,
- this.scoreTxt.y = -60,
- this.reStartBtn.y = 155,
- this.bestScoreTxt.visible = !1,
- this.gropImg.visible = !1,
- this.errorMessageTxt.visible = !0)
- }
- ,
- gc.ResultView.prototype.requestCloseWindow = function () {
- this.setInteractive(!1),
- this.removeChildren(),
- this.emit("GOTO_MAINPAGE")
- }
- ,
- gc.ResultView.prototype.removeAll = function () {
- this.removeChildren()
- }
- ,
- gc.ResultView.prototype.setInteractive = function (t) {
- this.reStartBtn.interactive = t
- }
- ,
- gc.ResultView.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e) {
- gc.GameTutorial = function () {
- PIXI.Container.call(this),
- this.pageNum = 1,
- this.type = 0,
- this.isfirst = !1,
- this.tutorialBg = new PIXI.Sprite(GD.loader.resources.help1.texture),
- this.addChild(this.tutorialBg),
- this.helpnext = PIXI.Sprite.fromFrame("help_next.png"),
- this.helpnext.anchor.set(.5, .5),
- this.helpnext.x = .9 * GD.width,
- this.helpnext.y = .95 * GD.height,
- this.addChild(this.helpnext),
- this.helpperv = PIXI.Sprite.fromFrame("help_prev.png"),
- this.helpperv.anchor.set(.5, .5),
- this.helpperv.x = .1 * GD.width,
- this.helpperv.y = .95 * GD.height,
- this.addChild(this.helpperv),
- this.startBt = PIXI.Sprite.fromFrame("help_start.png"),
- this.startBt.anchor.set(.5, .5),
- this.startBt.x = GD.width / 2,
- this.startBt.y = .95 * GD.height,
- this.addChild(this.startBt),
- this.tutorialContianer = new PIXI.Container,
- this.addChild(this.tutorialContianer),
- this.tutorialAni = new PIXI.spine.Spine(GD.loader.resources.tutoriaSpine.spineData),
- this.tutorialAni.state.addAnimation(0, "animation", !1, 0),
- this.tutorialAni.x = GD.width / 2,
- this.tutorialAni.y = .43 * GD.height,
- this.tutorialContianer.addChild(this.tutorialAni),
- this.tutorialAni.state.addListener({
- complete: function (t, e) {
- this.animation.state.setAnimation(0, "flag_1", !1, 0),
- this.animation.skeleton.setToSetupPose()
- }
- .bind(this)
- }),
- this.animation = new PIXI.spine.Spine(GD.loader.resources.spineCharacter.spineData),
- this.animation.state.addAnimation(0, "flag_1", !1, 0),
- this.animation.x = GD.width / 2,
- this.animation.y = .42 * GD.height,
- this.animation.scale.x = .5,
- this.animation.scale.y = .5,
- this.animation.state.addListener({
- complete: function (t, e) {
- this.isfirst ? (this.tutorialAni.state.setAnimation(0, "animation", !1, 0),
- this.tutorialAni.skeleton.setToSetupPose()) : this.isfirst = !0
- }
- .bind(this)
- }),
- this.tutorialContianer.addChild(this.animation),
- this.setTouchStartAction(this.startBt, function () {
- this.setInteractive(!1),
- this.emit("TUTORIAL_POPUP_CLOSE_EVENT")
- }, this),
- this.helpnext.interactive = !0,
- this.setTouchStartAction(this.helpnext, function () {
- this.pageNum++ ,
- this.tutorialBg.texture = GD.loader.resources["help" + this.pageNum].texture,
- 4 == this.pageNum && (this.helpnext.visible = !1,
- this.helpnext.interactive = !1),
- this.pageNum > 1 && (this.removeChild(this.tutorialContianer),
- this.helpperv.visible = !0,
- this.helpperv.interactive = !0)
- }, this),
- this.helpperv.visible = !1,
- this.helpperv.interactive = !0,
- this.setTouchStartAction(this.helpperv, function () {
- this.pageNum-- ,
- this.tutorialBg.texture = GD.loader.resources["help" + this.pageNum].texture,
- 1 == this.pageNum && (this.addChild(this.tutorialContianer),
- this.helpperv.visible = !1,
- this.helpperv.interactive = !1),
- this.pageNum < 4 && (this.helpnext.visible = !0,
- this.helpnext.interactive = !0)
- }, this)
- }
- ,
- gc.GameTutorial.constructor = gc.GameTutorial,
- gc.GameTutorial.prototype = Object.create(PIXI.Container.prototype),
- gc.GameTutorial.prototype.changeBtType = function (t) {
- this.type = t,
- 0 == this.type ? this.startBt.texture = PIXI.Texture.fromFrame("help_start.png") : this.startBt.texture = PIXI.Texture.fromFrame("help_close.png")
- }
- ,
- gc.GameTutorial.prototype.initPage = function () {
- this.setInteractive(!0),
- this.helpnext.visible = !0,
- this.helpperv.visible = !1,
- this.tutorialBg.texture = GD.loader.resources.help1.texture,
- this.addChild(this.tutorialContianer),
- this.pageNum = 1,
- this.startBt.texture = PIXI.Texture.fromFrame("help_close.png")
- }
- ,
- gc.GameTutorial.prototype.setInteractive = function (t) {
- this.helpnext.interactive = t,
- this.helpperv.interactive = t,
- this.startBt.interactive = t
- }
- ,
- gc.GameTutorial.prototype.updateTransform = function () {
- PIXI.Container.prototype.updateTransform.call(this)
- }
- }
- , function (t, e, i) {
- i(2),
- i(3),
- i(0),
- i(1),
- i(4),
- i(5),
- i(6),
- i(9),
- i(10),
- i(13),
- i(14),
- i(7),
- i(11),
- i(12),
- i(8),
- i(20),
- i(15),
- i(17),
- i(18),
- i(19),
- i(16)
- }
- ]);
|