12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234 |
- function bacplay() {}
- function saveData() {
- if ("undefined" != typeof Storage) {
- for (var e = "", t = 0; t < aLevelStore.length; t++) e += aLevelStore[t], t < aLevelStore.length - 1 && (e += ",");
- localStorage.setItem("bubblefishBuddiesData", e)
- }
- }
- function ananss() {
- if (GameAPI.Branding.getLogo().image) {
- gameState = "splash", resizeCanvas(), splash = new Elements.Splash(assetLib.getData("splash"), canvas.width, canvas.height), userInput.addHitArea("logoClick", bacplay, null, "rect", {
- aRect: [0, 0, canvas.width, canvas.height]
- }, !0), previousTime = (new Date).getTime(), updateSplashScreenEvent()
- } else {
- initStartScreen()
- }
- }
- function initStartScreen() {
- gameState = "start", 1 == audioType && music.volume(.25), userInput.removeHitArea("logoClick"), levelScore = 0, background = new Elements.Background(assetLib.getData("background"), canvas.width, canvas.height), userInput.addHitArea("mute", butEventHandler, null, "rect", {
- aRect: [337, 0, canvas.width, 46]
- }, !0);
- var e = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [canvas.width / 2, 360],
- scale: 1,
- type: 1,
- frame: 0
- },
- t = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [canvas.width / 2 + 60, 480],
- scale: 1,
- type: 1,
- frame: 1
- },
- n = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [canvas.width / 2 - 60, 480],
- scale: 1,
- type: 1,
- frame: 7
- };
- oLogoBut = {
- oImgData: assetLib.getData("logo"),
- aPos: [canvas.width / 2, 42],
- scale: getScaleImageToMax(assetLib.getData("logo"), [0, 0]),
- type: 0
- }, userInput.addHitArea("levelSelect", butEventHandler, null, "image", e), userInput.addHitArea("moreGames", butEventHandler, null, "image", t), userInput.addHitArea("logoClick", butEventHandler, null, "image", oLogoBut), userInput.addHitArea("credits", butEventHandler, null, "image", n);
- var r = new Array(e, t, oLogoBut, n);
- panel = new Elements.Panel(assetLib.getData("panels"), assetLib.getData("tutorials"), assetLib.getData("numbers"), assetLib.getData("goldFish"), gameState, r, canvas.width, canvas.height), panel.startTween1(), aBubbles = new Array;
- for (var i = 0; 6 > i; i++) {
- var s = new Elements.Bubble(assetLib.getData("bubble"), 0, aLevelData[0][0], canvas.width, canvas.height);
- s.x = Math.random() * canvas.width, s.y = Math.random() * canvas.height, aBubbles.push(s)
- }
- previousTime = (new Date).getTime(), updateStartScreenEvent()
- }
- function initLevelSelect() {
- gameState = "levelSelect";
- for (var e = new Array, t = 0; 12 > t; t++) {
- var n = 123 * (t % 3) + 68,
- r = 100 * Math.floor(t / 3) + 93,
- i = {
- oImgData: assetLib.getData("levelButs"),
- aPos: [n, r],
- scale: 1,
- type: 1,
- frame: aLevelStore[2 * (t + 12 * levelButsPage)]
- };
- 1 != aLevelStore[2 * (t + 12 * levelButsPage)] && userInput.addHitArea("startLevel", butEventHandler, {
- id: t + 12 * levelButsPage
- }, "image", i), e.push(i)
- }
- var s = getScaleImageToMax(assetLib.getData("logo"), [0, 0]);
- oLogoBut = {
- oImgData: assetLib.getData("logo"),
- aPos: getCentreFromTopLeft([0, 0], assetLib.getData("logo"), s),
- scale: s,
- type: 0
- };
- var o = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [73, 500],
- scale: 1,
- type: 1,
- frame: 5
- },
- u = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [canvas.width / 2, 500],
- scale: 1,
- type: 1,
- frame: 6
- };
- if (userInput.addHitArea("logoClick", butEventHandler, null, "image", oLogoBut), userInput.addHitArea("prevScreen", butEventHandler, null, "image", o), userInput.addHitArea("clearData", butEventHandler, null, "image", u), e.push(oLogoBut, o, u), 2 > levelButsPage) {
- var a = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [310, 500],
- scale: 1,
- type: 1,
- frame: 4
- };
- userInput.addHitArea("nextScreen", butEventHandler, null, "image", a), e.push(a)
- }
- panel = new Elements.Panel(assetLib.getData("panels"), assetLib.getData("tutorials"), assetLib.getData("numbers"), assetLib.getData("goldFish"), gameState, e, canvas.width, canvas.height), panel.oScoreData = {
- levelButsPage: levelButsPage
- }, panel.startTween2(), previousTime = (new Date).getTime(), updateLevelSelectEvent()
- }
- function initCreditsScreen() {
- gameState = "credits";
- var e = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [73, 500],
- scale: 1,
- type: 1,
- frame: 5
- };
- userInput.addHitArea("backFromCredits", butEventHandler, null, "image", e);
- var t = new Array(e);
- panel = new Elements.Panel(assetLib.getData("panels"), assetLib.getData("tutorials"), assetLib.getData("numbers"), assetLib.getData("goldFish"), gameState, t, canvas.width, canvas.height), panel.startTween3(), aBubbles = new Array, previousTime = (new Date).getTime(), updateCreditsScreenEvent()
- }
- function initGame() {
- gameState = "game", 1 == audioType && music.volume(.5), userInput.addHitArea("replayFromInGame", butEventHandler, null, "rect", {
- aRect: [249, 0, 292, 46]
- }, !0), userInput.addHitArea("pause", butEventHandler, null, "rect", {
- aRect: [292, 0, 337, 46]
- }, !0), userInput.addHitArea("shoot", butEventHandler, null, "rect", {
- aRect: [0, 50, canvas.width, 460]
- }, !0), userInput.addHitArea("moveBase", butEventHandler, {
- multiTouch: !0,
- isDraggable: !0
- }, "rect", {
- aRect: [0, 460, canvas.width, 550]
- }, !0), userInput.addKey("moveRightEvent", butEventHandler, null, 39), userInput.addKey("moveLeftEvent", butEventHandler, null, 37);
- var e = getScaleImageToMax(assetLib.getData("logo"), [0, 0]);
- oLogoBut = {
- oImgData: assetLib.getData("logo"),
- aPos: getCentreFromTopLeft([0, 0], assetLib.getData("logo"), e),
- scale: e,
- type: 0
- }, userInput.addHitArea("logoClick", butEventHandler, null, "image", oLogoBut), aBubbles = new Array, aFishes = new Array, aLogs = new Array, fishCaught = 0, levelThrows = 0, levelScore = bonusScore = 0, bubbleTarg = 0;
- for (var t = new Array({
- type: "line",
- p0: {
- x: -25,
- y: -300
- },
- p1: {
- x: -25,
- y: 550
- },
- subType: "normal"
- }, {
- type: "line",
- p0: {
- x: 408,
- y: -300
- },
- p1: {
- x: 408,
- y: 550
- },
- subType: "normal"
- }), n = 0; n < aLevelData[levelNum].length; n++)
- if ("bubble" == aLevelData[levelNum][n].type) {
- var r = new Elements.Bubble(assetLib.getData("bubble"), n, aLevelData[levelNum][n], canvas.width, canvas.height);
- aBubbles.push(r), "ice" == aLevelData[levelNum][n].subType && t.push({
- p0: aLevelData[levelNum][n].p0,
- p1: {
- x: aLevelData[levelNum][n].p0.x + 1,
- y: aLevelData[levelNum][n].p0.y
- },
- b: 1,
- f: 1,
- id: n,
- subType: aLevelData[levelNum][n].subType
- }), "jellyfish" != aLevelData[levelNum][n].subType && bubbleTarg++
- } else if ("line" == aLevelData[levelNum][n].type && (t.push({
- p0: aLevelData[levelNum][n].p0,
- p1: aLevelData[levelNum][n].p1,
- b: 1,
- f: 1,
- id: -1,
- subType: aLevelData[levelNum][n].subType
- }), "log" == aLevelData[levelNum][n].subType)) {
- var i = new Elements.Log(assetLib.getData("log"), aLevelData[levelNum][n], canvas.width, canvas.height);
- aLogs.push(i)
- }
- physics2D = new Utils.Physics2D(t, defrostBubble), hud = new Elements.Hud(assetLib.getData("hud"), assetLib.getData("numbers"), canvas.width, canvas.height, getTotalScore(), levelNum + 1), base = new Elements.Base(assetLib.getData("base"), {
- x: canvas.width / 2,
- y: 490
- }, canvas.width, canvas.height), addFish(), tutorialIsOn = !1;
- for (var n = 0; n < aTutorials.length; n++) aTutorials[n].levelNum == levelNum && (panel = new Elements.Panel(assetLib.getData("panels"), assetLib.getData("tutorials"), assetLib.getData("numbers"), assetLib.getData("goldFish"), aTutorials[n].panelType, null, canvas.width, canvas.height), panel.startTween2(), tutorialIsOn = !0);
- previousTime = (new Date).getTime(), updateGameEvent()
- }
- function butEventHandler(e, t) {
- switch (e) {
- case "langSelect":
- console.log(t.lang), curLang = t.lang, ctx.clearRect(0, 0, canvas.width, canvas.height), userInput.removeHitArea("langSelect"), initLoadAssets();
- break;
- case "levelSelect":
- playSound("click"), userInput.removeHitArea("levelSelect"), userInput.removeHitArea("moreGames"), userInput.removeHitArea("logoClick"), userInput.removeHitArea("credits"), initLevelSelect();
- break;
- case "credits":
- playSound("click"), userInput.removeHitArea("levelSelect"), userInput.removeHitArea("moreGames"), userInput.removeHitArea("logoClick"), userInput.removeHitArea("credits"), initCreditsScreen();
- break;
- case "backFromCredits":
- playSound("click"), userInput.removeHitArea("backFromCredits"), initStartScreen();
- break;
- case "clearData":
- playSound("click"), userInput.removeHitArea("startLevel"), userInput.removeHitArea("prevScreen"), userInput.removeHitArea("clearData"), userInput.removeHitArea("nextScreen"), levelButsPage = 0, aLevelStore = new Array, aLevelStore.push(0), aLevelStore.push(0);
- for (var n = 0; 35 > n; n++) aLevelStore.push(1), aLevelStore.push(0);
- saveData(), initLevelSelect();
- break;
- case "prevScreen":
- playSound("click"), userInput.removeHitArea("startLevel"), userInput.removeHitArea("prevScreen"), userInput.removeHitArea("clearData"), userInput.removeHitArea("nextScreen"), 0 == levelButsPage ? initStartScreen() : (levelButsPage = 0, initLevelSelect());
- break;
- case "nextScreen":
- playSound("click"), userInput.removeHitArea("startLevel"), userInput.removeHitArea("prevScreen"), userInput.removeHitArea("clearData"), userInput.removeHitArea("nextScreen"), levelButsPage++, initLevelSelect();
- break;
- case "startLevel":
- playSound("click"), userInput.removeHitArea("startLevel"), userInput.removeHitArea("prevScreen"), userInput.removeHitArea("clearData"), userInput.removeHitArea("nextScreen"), levelNum = t.id, initGame();
- break;
- case "moreGames":
- case "moreGamesPause":
- Play68.goHome();
- break;
- case "logoClick":
- Play68.goHome();
- break;
- case "nextLevel":
- playSound("click"), userInput.removeHitArea("nextLevel"), userInput.removeHitArea("quitFromEndLevel"), userInput.removeHitArea("replayFromEndLevel"), userInput.removeHitArea("moreGames"), userInput.removeHitArea("logoClick"), ++levelNum < 36 ? (initGame(), 0 == levelNum % 3 && spilAPI.GameBreak.request(adPauseOn, adPauseOff)) : (levelNum = 35, initStartScreen());
- break;
- case "quitFromEndLevel":
- playSound("click"), userInput.removeHitArea("nextLevel"), userInput.removeHitArea("quitFromEndLevel"), userInput.removeHitArea("replayFromEndLevel"), userInput.removeHitArea("moreGames"), userInput.removeHitArea("logoClick"), initStartScreen();
- break;
- case "replayFromEndLevel":
- playSound("click"), userInput.removeHitArea("nextLevel"), userInput.removeHitArea("quitFromEndLevel"), userInput.removeHitArea("replayFromEndLevel"), userInput.removeHitArea("moreGames"), userInput.removeHitArea("logoClick"), initGame();
- break;
- case "shoot":
- t.isDown && "held" == aFishes[aFishes.length - 1].state && (playSound("crabThrow"), aFishes[aFishes.length - 1].thrown(t.x, t.y), base.throwFish(), aFishes.length < bubbleTarg && addFish(), levelThrows++);
- break;
- case "moveBase":
- t.isDown || t.isBeingDragged ? base.startMoving(t.x) : base.stopMoving();
- break;
- case "moveLeftEvent":
- base.leftPull = t.isDown ? -200 : 0;
- break;
- case "moveRightEvent":
- base.rightPull = t.isDown ? 200 : 0;
- break;
- case "retryLevel":
- playSound("click"), userInput.removeHitArea("retryLevel"), userInput.removeHitArea("quitFromEnd"), levelScore = 0, bonusScore = 0, initGame();
- break;
- case "replayFromInGame":
- playSound("click"), userInput.removeHitArea("pause"), userInput.removeHitArea("replayFromInGame"), userInput.removeHitArea("shoot"), userInput.removeHitArea("moveBase"), userInput.removeKey("moveRightEvent"), userInput.removeKey("moveLeftEvent"), userInput.removeHitArea("moreGames"), userInput.removeHitArea("logoClick"), initGame();
- break;
- case "mute":
- playSound("click"), toggleMute();
- break;
- case "pause":
- case "resumeFromPause":
- playSound("click"), toggleManualPause();
- break;
- case "quitFromPause":
- playSound("click"), toggleManualPause(), userInput.removeHitArea("pause"), userInput.removeHitArea("replayFromInGame"), userInput.removeHitArea("shoot"), userInput.removeHitArea("moveBase"), userInput.removeKey("moveRightEvent"), userInput.removeKey("moveLeftEvent"), userInput.removeHitArea("moreGamesPause"), userInput.removeHitArea("logoClick"), userInput.removeHitArea("quitFromPause"), userInput.removeHitArea("resumeFromPause"), levelScore = 0, initStartScreen()
- }
- }
- function initLevelComplete() {
- gameState = "levelComplete", 1 == audioType && music.volume(.25), playSound("levelComplete"), userInput.removeHitArea("pause"), userInput.removeHitArea("replayFromInGame"), userInput.removeHitArea("shoot"), userInput.removeHitArea("moveBase"), userInput.removeKey("moveRightEvent"), userInput.removeKey("moveLeftEvent"), userInput.removeHitArea("logoClick");
- var e = getScaleImageToMax(assetLib.getData("logo"), [0, 0]);
- oLogoBut = {
- oImgData: assetLib.getData("logo"),
- aPos: getCentreFromTopLeft([0, 0], assetLib.getData("logo"), e),
- scale: e,
- type: 0
- };
- var t = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [73, 420],
- scale: 1,
- type: 1,
- frame: 2
- },
- n = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [canvas.width / 2, 420],
- scale: 1,
- type: 1,
- frame: 3
- },
- r = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [310, 420],
- scale: 1,
- type: 1,
- frame: 0
- },
- i = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [canvas.width / 2, 500],
- scale: 1,
- type: 1,
- frame: 1
- };
- userInput.addHitArea("replayFromEndLevel", butEventHandler, null, "image", t), userInput.addHitArea("quitFromEndLevel", butEventHandler, null, "image", n), userInput.addHitArea("nextLevel", butEventHandler, null, "image", r), userInput.addHitArea("logoClick", butEventHandler, null, "image", oLogoBut), userInput.addHitArea("moreGames", butEventHandler, null, "image", i);
- var s = new Array(t, n, r, oLogoBut, i);
- panel = new Elements.Panel(assetLib.getData("panels"), assetLib.getData("tutorials"), assetLib.getData("numbers"), assetLib.getData("goldFish"), gameState, s, canvas.width, canvas.height);
- var o = getLevelResult();
- levelScore = o.levelScore, aLevelStore[2 * levelNum] < o.stars + 1 && (aLevelStore[2 * levelNum] = o.stars + 1), aLevelStore[2 * levelNum + 1] < levelScore && (aLevelStore[2 * levelNum + 1] = levelScore), levelNum < aLevelData.length - 1 && 1 == aLevelStore[2 * (levelNum + 1)] && (aLevelStore[2 * (levelNum + 1)] = 0), saveData(), panel.oScoreData = {
- stars: o.stars,
- levelScore: levelScore,
- totalScore: getTotalScore()
- }, panel.startTweenEndLevel(), previousTime = (new Date).getTime(), updateLevelComplete();
- }
- function getTotalScore() {
- for (var e = 0, t = 0; t < aLevelData.length; t++) e += aLevelStore[2 * t + 1];
- return e
- }
- function bubbleHit(e, t) {
- if ("jellyfish" == e.subType) t.stung(), playSound("hitJellyfish");
- else {
- t.caught(e);
- var n = !1;
- e.caughtFish ? (e.caughtFish.release(e), "fire" == e.oData.subType && (playSound("launchFire"), n = !0)) : ++fishCaught == bubbleTarg && (levelCompleteTimer = 0), n || playSound("bubbleLand" + Math.ceil(4 * Math.random())), e.changeState("caught", {
- caughtFish: t
- })
- }
- }
- function addFish() {
- var e = new Elements.Fish(assetLib.getData("fish"), {
- x: base.x,
- y: base.y,
- type: 0,
- id: aFishes.length,
- colourId: fishColourInc
- }, canvas.width, canvas.height);
- fishColourInc = ++fishColourInc % 9, aFishes.push(e), physics2D.aFishes = aFishes, playSound("newFish")
- }
- function defrostBubble(e) {
- for (var t = 0; t < aBubbles.length; t++) aBubbles[t].id == e && aBubbles[t].changeState("normal");
- playSound("breakIce");
- for (var t = 0; t < physics2D.aLines.length; t++) physics2D.aLines[t].id == e && (physics2D.aLines.splice(t, 1), t -= 1)
- }
- function getLevelResult() {
- for (var e = 0, t = 0; t < aLevelData[levelNum].length; t++) "bubble" == aLevelData[levelNum][t].type && ("jellyfish" != aLevelData[levelNum][t].subType && e++, "ice" == aLevelData[levelNum][t].subType && e++);
- e += Math.ceil(e / 6);
- var n = 1,
- r = 2e3;
- return e >= levelThrows ? n = 3 : levelThrows <= e + Math.ceil(e / 6) && (n = 2), r = Math.max(r - 50 * (levelThrows - e), 500), {
- stars: n,
- levelScore: r
- }
- }
- function updateGameEvent() {
- if (!manualPause && !rotatePause && "game" == gameState) {
- var e = getDelta();
- levelCompleteTimer >= 0 && (levelCompleteTimer += e, levelCompleteTimer > 1 && (initLevelComplete(), levelCompleteTimer = -1)), background.updateScroll(e), background.render(ctx);
- for (var t = 0; t < aFishes.length; t++) aFishes[t].update(base.x, base.y, e), renderSprite(aFishes[t]), aFishes[t].removeMe && (aFishes.splice(t, 1), t -= 1, (0 == aFishes.length || "held" != aFishes[aFishes.length - 1].state) && addFish());
- for (var t = 0; t < aBubbles.length; t++)
- if (aBubbles[t].update(e), renderSprite(aBubbles[t]), 1 != aBubbles[t].type)
- for (var n = 0; n < aFishes.length; n++) "flying" == aFishes[n].state && aFishes[n].skipBubble != aBubbles[t] && checkSpriteCollision(aBubbles[t], aFishes[n]) && bubbleHit(aBubbles[t], aFishes[n]);
- for (var t = 0; t < aLogs.length; t++) renderSprite(aLogs[t]);
- base.update(e), renderSprite(base), physics2D.update(e), hud.render(ctx), tutorialIsOn && panel.render(ctx), renderMuteBut(), renderLogoBut(), requestAnimFrame(updateGameEvent)
- }
- }
- function updateLevelSelectEvent() {
- if (!rotatePause && "levelSelect" == gameState) {
- var e = getDelta();
- background.updateScroll(e), background.render(ctx), panel.renderButs(ctx), panel.render(ctx), renderMuteBut(), requestAnimFrame(updateLevelSelectEvent)
- }
- }
- function updateCreditsScreenEvent() {
- if (!rotatePause && "credits" == gameState) {
- var e = getDelta();
- panel.update(e), panel.render(ctx), panel.renderButs(ctx), renderMuteBut(), requestAnimFrame(updateCreditsScreenEvent)
- }
- }
- function updateLevelComplete() {
- if (!rotatePause && "levelComplete" == gameState) {
- var e = getDelta();
- background.updateScroll(e), background.render(ctx), panel.update(e), panel.render(ctx), panel.renderButs(ctx), renderMuteBut(), requestAnimFrame(updateLevelComplete)
- }
- }
- function updateSplashScreenEvent() {
- if (!rotatePause && "splash" == gameState) {
- var e = getDelta();
- if (splashTimer += e, splashTimer > 2.5) return 1 != audioType || muted || music.play(), initStartScreen(), void 0;
- splash.render(ctx, e), requestAnimFrame(updateSplashScreenEvent)
- }
- }
- function updateStartScreenEvent() {
- if (!rotatePause && "start" == gameState) {
- var e = getDelta();
- background.updateScroll(e), background.render(ctx);
- for (var t = 0; t < aBubbles.length; t++) aBubbles[t].y -= (30 + 2 * t) * e, aBubbles[t].x = aBubbles[t].x - 50 * Math.sin(aBubbles[t].y / 50) * e, aBubbles[t].y < -100 && (aBubbles[t].x = Math.random() * canvas.width, aBubbles[t].y = canvas.height + 200 * Math.random() + 100), aBubbles[t].update(e), renderSprite(aBubbles[t]);
- panel.update(e), panel.render(ctx), panel.renderButs(ctx), renderMuteBut(), requestAnimFrame(updateStartScreenEvent)
- }
- }
- function getDelta() {
- var e = (new Date).getTime(),
- t = (e - previousTime) / 1e3;
- return previousTime = e, t > .5 && (t = 0), t
- }
- function renderSprite(e) {
- ctx.save(), ctx.translate(e.x, e.y), ctx.scale(e.scaleX, e.scaleY), ctx.rotate(e.rotation), e.render(ctx), ctx.restore()
- }
- function checkSpriteCollision(e, t, n) {
- "undefined" == typeof n && (n = 0);
- var r = e.x,
- i = e.y,
- s = t.x,
- o = t.y,
- u = (r - s) * (r - s) + (i - o) * (i - o),
- a = (e.radius + n) * (t.radius + n);
- return a > u ? !0 : !1
- }
- function getScaleImageToMax(e, t) {
- var n;
- return n = e.isSpriteSheet ? t[0] / e.oData.spriteWidth < t[1] / e.oData.spriteHeight ? Math.min(t[0] / e.oData.spriteWidth, 1) : Math.min(t[1] / e.oData.spriteHeight, 1) : t[0] / e.img.width < t[1] / e.img.height ? Math.min(t[0] / e.img.width, 1) : Math.min(t[1] / e.img.height, 1)
- }
- function getCentreFromTopLeft(e, t, n) {
- var r = new Array;
- return r.push(e[0] + t.oData.spriteWidth / 2 * n), r.push(e[1] + t.oData.spriteHeight / 2 * n), r
- }
- function loadPreAssets() {
- aLangs.length > 1 ? (preAssetLib = new Utils.AssetLoader(curLang, [{
- id: "langSelect",
- file: "images/langSelect.jpg"
- }, {
- id: "preloadImage",
- file: "images/preloadImage.jpg"
- }], ctx, canvas.width, canvas.height, !1), preAssetLib.onReady(initLangSelect)) : (curLang = aLangs[0], preAssetLib = new Utils.AssetLoader(curLang, [{
- id: "preloadImage",
- file: "images/preloadImage.jpg"
- }], ctx, canvas.width, canvas.height, !1), preAssetLib.onReady(initLoadAssets))
- }
- function initLangSelect() {
- var e = preAssetLib.getData("langSelect");
- ctx.drawImage(e.img, canvas.width / 2 - e.img.width / 2, canvas.height / 2 - e.img.height / 2);
- for (var t = 140, n = 0; n < aLangs.length; n++) {
- var r = canvas.width / 2 - t * aLangs.length / 2 + n * t,
- i = canvas.height / 2 - t / 2;
- userInput.addHitArea("langSelect", butEventHandler, {
- lang: aLangs[n]
- }, "rect", {
- aRect: [r, i, r + t, i + 140]
- })
- }
- }
- function initLoadAssets() {
- var e = preAssetLib.getData("preloadImage");
- ctx.drawImage(e.img, canvas.width / 2 - e.img.width / 2, canvas.height / 2 - e.img.height - 10), loadAssets()
- }
- function loadAssets() {
- assetLib = new Utils.AssetLoader(curLang, [{
- id: "background",
- file: "images/background.jpg"
- }, {
- id: "rotateDeviceMessage",
- file: "images/rotateDeviceMessage.jpg"
- }, {
- id: "splash",
- file: "images/splashScreen.jpg"
- }, {
- id: "credits",
- file: "images/creditsScreen.jpg"
- }, {
- id: "hud",
- file: "images/" + curLang + "/hud.png"
- }, {
- id: "goldFish",
- file: "images/goldFish.png"
- }, {
- id: "uiButs",
- file: "images/" + curLang + "/uiButs_112x76.png",
- oData: {
- columns: 6,
- spriteWidth: 112,
- spriteHeight: 76
- }
- }, {
- id: "levelButs",
- file: "images/levelButs_119x96.png",
- oData: {
- columns: 5,
- spriteWidth: 119,
- spriteHeight: 96
- }
- }, {
- id: "panels",
- file: "images/" + curLang + "/panels_383x550.png",
- oData: {
- columns: 2,
- spriteWidth: 383,
- spriteHeight: 550
- }
- }, {
- id: "tutorials",
- file: "images/" + curLang + "/tutorials_383x550.png",
- oData: {
- columns: 2,
- spriteWidth: 383,
- spriteHeight: 550
- }
- }, {
- id: "numbers",
- file: "images/numbers_25x35.png",
- oData: {
- columns: 10,
- spriteWidth: 25,
- spriteHeight: 35
- }
- }, {
- id: "muteBut",
- file: "images/mute_35x35.png",
- oData: {
- columns: 2,
- spriteWidth: 35,
- spriteHeight: 35
- }
- }, {
- id: "log",
- file: "images/log_256x59.png",
- oData: {
- columns: 1,
- spriteWidth: 256,
- spriteHeight: 59
- }
- }, {
- id: "bubble",
- file: "images/bubble_77x128.png",
- oData: {
- oAnims: {
- normal: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
- caught: [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33],
- holding: [33],
- ice: [34],
- fire: [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46],
- jellyfish: [47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61]
- },
- columns: 13,
- spriteWidth: 77,
- spriteHeight: 128
- }
- }, {
- id: "fish",
- file: "images/fish_47x90.png",
- oData: {
- oAnims: {
- normal0: [0, 1, 2, 3, 4],
- normal1: [5, 6, 7, 8, 9],
- normal2: [10, 11, 12, 13, 14],
- normal3: [15, 16, 17, 18, 19],
- normal4: [20, 21, 22, 23, 24],
- normal5: [25, 26, 27, 28, 29],
- normal6: [30, 31, 32, 33, 34],
- normal7: [35, 36, 37, 38, 39],
- normal8: [40, 41, 42, 43, 44],
- onFire: [45, 46, 47, 48, 49, 50],
- stung: [51]
- },
- columns: 21,
- spriteWidth: 47,
- spriteHeight: 90
- }
- }, {
- id: "base",
- file: "images/base_139x140.png",
- oData: {
- oAnims: {
- ambient: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],
- walkRight: [17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28],
- walkLeft: [28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17],
- throwFish: [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]
- },
- columns: 7,
- spriteWidth: 139,
- spriteHeight: 140
- }
- }, {
- id: "logo",
- file: oLogoData.image
- }], ctx, canvas.width, canvas.height), dcdcdc()
- }
- function dcdcdc() {
- assetLib.onReady(ananss);
- }
- function resizeCanvas() {
- var e = window.innerWidth,
- t = window.innerHeight;
- e > 480 && (e -= 1, t -= 1), window.innerWidth > window.innerHeight && isMobile ? ("loading" != gameState && rotatePauseOn(), e / canvas.width < t / canvas.height ? (canvas.style.width = e + "px", canvas.style.height = e / canvas.width * canvas.height + "px", canvasX = 0, canvasY = (t - e / canvas.width * canvas.height) / 2, canvasScaleX = canvasScaleY = canvas.width / e, div.style.marginTop = canvasY + "px", div.style.marginLeft = canvasX + "px") : (canvas.style.width = t / canvas.height * canvas.width + "px", canvas.style.height = t + "px", canvasX = (e - t / canvas.height * canvas.width) / 2, canvasY = 0, canvasScaleX = canvasScaleY = canvas.height / t, div.style.marginTop = canvasY + "px", div.style.marginLeft = canvasX + "px")) : isMobile ? (rotatePause && rotatePauseOff(), canvasX = canvasY = 0, canvasScaleX = canvas.width / e, canvasScaleY = canvas.height / t, canvas.style.width = e + "px", canvas.style.height = t + "px", div.style.marginTop = "0px", div.style.marginLeft = "0px") : (rotatePause && rotatePauseOff(), e / canvas.width < t / canvas.height ? (canvas.style.width = e + "px", canvas.style.height = e / canvas.width * canvas.height + "px", canvasX = 0, canvasY = (t - e / canvas.width * canvas.height) / 2, canvasScaleX = canvasScaleY = canvas.width / e, div.style.marginTop = canvasY + "px", div.style.marginLeft = canvasX + "px") : (canvas.style.width = t / canvas.height * canvas.width + "px", canvas.style.height = t + "px", canvasX = (e - t / canvas.height * canvas.width) / 2, canvasY = 0, canvasScaleX = canvasScaleY = canvas.height / t, div.style.marginTop = canvasY + "px", div.style.marginLeft = canvasX + "px")), userInput.setCanvas(canvasX, canvasY, canvasScaleX, canvasScaleY)
- }
- function playSound(e) {
- 1 == audioType && sound.play(e)
- }
- function toggleMute() {
- muted = !muted, 1 == audioType ? muted ? Howler.mute() : Howler.unmute() : 2 == audioType && (muted ? music.pause() : music.play()), renderMuteBut()
- }
- function renderLogoBut() {
- ctx.drawImage(oLogoBut.oImgData.img, 0, 0, oLogoBut.oImgData.img.width, oLogoBut.oImgData.img.height, oLogoBut.aPos[0] - oLogoBut.oImgData.img.width / 2 * oLogoBut.scale, oLogoBut.aPos[1] - oLogoBut.oImgData.img.height / 2 * oLogoBut.scale, oLogoBut.oImgData.img.width * oLogoBut.scale, oLogoBut.oImgData.img.height * oLogoBut.scale)
- }
- function renderMuteBut() {
- if (0 != audioType) {
- var e = assetLib.getData("muteBut"),
- t = 0;
- muted && (t = 1);
- var n = t * e.oData.spriteWidth % e.img.width,
- r = Math.floor(t / (e.img.width / e.oData.spriteWidth)) * e.oData.spriteHeight;
- ctx.drawImage(e.img, n, r, e.oData.spriteWidth, e.oData.spriteHeight, 340, 10, e.oData.spriteWidth, e.oData.spriteHeight)
- }
- }
- function adPauseOn() {
- toggleManualPause()
- }
- function adPauseOff() {
- manualPause && toggleManualPause()
- }
- function toggleManualPause() {
- if (manualPause) manualPause = !1, userInput.removeHitArea("quitFromPause"), userInput.removeHitArea("resumeFromPause"), userInput.removeHitArea("moreGamesPause"), pauseCoreOff();
- else {
- manualPause = !0, pauseCoreOn();
- var e = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [120, 380],
- scale: 1,
- type: 1,
- frame: 3
- },
- t = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [263, 380],
- scale: 1,
- type: 1,
- frame: 0
- },
- n = {
- oImgData: assetLib.getData("uiButs"),
- aPos: [canvas.width / 2, 460],
- scale: 1,
- type: 1,
- frame: 1
- },
- r = new Array(e, t, n);
- userInput.addHitArea("quitFromPause", butEventHandler, null, "image", e), userInput.addHitArea("resumeFromPause", butEventHandler, null, "image", t), userInput.addHitArea("moreGamesPause", butEventHandler, null, "image", n);
- var i = new Elements.Panel(assetLib.getData("panels"), assetLib.getData("tutorials"), assetLib.getData("numbers"), assetLib.getData("goldFish"), "pause", r, canvas.width, canvas.height);
- i.render(ctx), i.renderButs(ctx)
- }
- }
- function rotatePauseOn() {
- rotatePause = !0, ctx.drawImage(assetLib.getImg("rotateDeviceMessage"), 0, 0), userInput.pauseIsOn = !0, pauseCoreOn()
- }
- function rotatePauseOff() {
- rotatePause = !1, userInput.removeHitArea("quitFromPause"), userInput.removeHitArea("resumeFromPause"), pauseCoreOff()
- }
- function pauseCoreOn() {
- switch (1 == audioType ? Howler.mute() : 2 == audioType && music.pause(), gameState) {
- case "start":
- break;
- case "levelSelect":
- break;
- case "game":
- userInput.removeHitArea("shoot"), userInput.removeHitArea("moveBase"), userInput.removeKey("moveRightEvent"), userInput.removeKey("moveLeftEvent");
- break;
- case "levelComplete":
- }
- }
- function pauseCoreOff() {
- switch (1 == audioType ? muted || Howler.unmute() : 2 == audioType && (muted || music.play()), previousTime = (new Date).getTime(), userInput.pauseIsOn = !1, gameState) {
- case "splash":
- updateSplashScreenEvent();
- break;
- case "start":
- initStartScreen();
- break;
- case "credits":
- initCreditsScreen();
- break;
- case "levelSelect":
- initLevelSelect();
- break;
- case "game":
- manualPause = !1, userInput.addHitArea("shoot", butEventHandler, null, "rect", {
- aRect: [0, 50, canvas.width, 460]
- }, !0), userInput.addHitArea("moveBase", butEventHandler, {
- multiTouch: !0,
- isDraggable: !0
- }, "rect", {
- aRect: [0, 460, canvas.width, 550]
- }, !0), userInput.addKey("moveRightEvent", butEventHandler, null, 39), userInput.addKey("moveLeftEvent", butEventHandler, null, 37), updateGameEvent();
- break;
- case "levelComplete":
- initLevelComplete();
- break;
- case "end":
- }
- }
- var Utils;
- ! function(e) {
- var t = function() {
- function e(e, t, n, r, i, s) {
- "undefined" == typeof s && (s = !0), this.oAssetData = {}, this.assetsLoaded = 0, this.totalAssets = t.length, this.ctx = n, this.canvasWidth = r, this.canvasHeight = i, this.showBar = s, this.topLeftX = this.canvasWidth / 2 - r / 4, this.topLeftY = this.canvasHeight / 2, this.showBar && (ctx.strokeStyle = "#aaaaaa", ctx.lineWidth = 2, ctx.fillStyle = "#ffffff", ctx.moveTo(this.topLeftX, this.topLeftY), ctx.lineTo(this.topLeftX + r / 2, this.topLeftY + 0), ctx.lineTo(this.topLeftX + r / 2, this.topLeftY + 20), ctx.lineTo(this.topLeftX + 0, this.topLeftY + 20), ctx.lineTo(this.topLeftX + 0, this.topLeftY + 0), ctx.stroke());
- for (var o = 0; o < t.length; o++) this.loadImage(t[o])
- }
- return e.prototype.loadImage = function(e) {
- var t = this,
- n = new Image;
- n.onload = function() {
- t.oAssetData[e.id] = {}, t.oAssetData[e.id].img = n, void 0 != e.oData ? (t.oAssetData[e.id].oData = e.oData, t.oAssetData[e.id].isSpriteSheet = !0) : (t.oAssetData[e.id].isSpriteSheet = !1, t.oAssetData[e.id].oData = {}, t.oAssetData[e.id].oData.spriteWidth = t.oAssetData[e.id].img.width, t.oAssetData[e.id].oData.spriteHeight = t.oAssetData[e.id].img.height), ++t.assetsLoaded, t.showBar && ctx.fillRect(t.topLeftX + 2, t.topLeftY + 2, (t.canvasWidth / 2 - 4) / t.totalAssets * t.assetsLoaded, 16), t.checkLoadComplete()
- }, n.src = e.file
- }, e.prototype.checkLoadComplete = function() {
- this.assetsLoaded == this.totalAssets && this.loadedCallback()
- }, e.prototype.onReady = function(e) {
- this.loadedCallback = e
- }, e.prototype.getImg = function(e) {
- return this.oAssetData[e].img
- }, e.prototype.getData = function(e) {
- return this.oAssetData[e]
- }, e
- }();
- e.AssetLoader = t
- }(Utils || (Utils = {}));
- var Utils;
- ! function(e) {
- var t = function() {
- function e(e, t, n, r) {
- this.x = 0, this.y = 0, this.rotation = 0, this.radius = 10, this.removeMe = !1, this.frameInc = 0, this.animType = "loop", this.offsetX = 0, this.offsetY = 0, this.scaleX = 1, this.scaleY = 1, this.oImgData = e, this.oAnims = this.oImgData.oData.oAnims, this.fps = t, this.radius = n, this.animId = r
- }
- return e.prototype.updateAnimation = function(e) {
- this.frameInc += this.fps * e
- }, e.prototype.resetAnim = function() {
- this.frameInc = 0
- }, e.prototype.setFrame = function(e) {
- this.fixedFrame = e
- }, e.prototype.setAnimType = function(e, t, n) {
- switch ("undefined" == typeof n && (n = !0), this.animId = t, this.animType = e, n && this.resetAnim(), e) {
- case "loop":
- break;
- case "once":
- this.maxIdx = this.oAnims[this.animId].length - 1
- }
- }, e.prototype.render = function(e) {
- if (null != this.animId) {
- var t = this.oAnims[this.animId].length,
- n = Math.floor(this.frameInc),
- r = this.oAnims[this.animId][n % t],
- i = r * this.oImgData.oData.spriteWidth % this.oImgData.img.width,
- s = Math.floor(r / (this.oImgData.img.width / this.oImgData.oData.spriteWidth)) * this.oImgData.oData.spriteHeight;
- if ("once" == this.animType && n > this.maxIdx) {
- this.fixedFrame = this.oAnims[this.animId][t - 1], this.animId = null, this.animEndedFunc();
- var i = this.fixedFrame * this.oImgData.oData.spriteWidth % this.oImgData.img.width,
- s = Math.floor(this.fixedFrame / (this.oImgData.img.width / this.oImgData.oData.spriteWidth)) * this.oImgData.oData.spriteHeight
- }
- } else var i = this.fixedFrame * this.oImgData.oData.spriteWidth % this.oImgData.img.width,
- s = Math.floor(this.fixedFrame / (this.oImgData.img.width / this.oImgData.oData.spriteWidth)) * this.oImgData.oData.spriteHeight;
- e.drawImage(this.oImgData.img, i, s, this.oImgData.oData.spriteWidth, this.oImgData.oData.spriteHeight, -this.oImgData.oData.spriteWidth / 2 + this.offsetX, -this.oImgData.oData.spriteHeight / 2 + this.offsetY, this.oImgData.oData.spriteWidth, this.oImgData.oData.spriteHeight)
- }, e
- }();
- e.AnimSprite = t
- }(Utils || (Utils = {}));
- var Utils;
- ! function(e) {
- var t = function() {
- function e(e, t, n) {
- "undefined" == typeof n && (n = 0), this.x = 0, this.y = 0, this.rotation = 0, this.radius = 10, this.removeMe = !1, this.offsetX = 0, this.offsetY = 0, this.scaleX = 1, this.scaleY = 1, this.oImgData = e, this.radius = t, this.setFrame(n)
- }
- return e.prototype.setFrame = function(e) {
- this.frameNum = e
- }, e.prototype.render = function(e) {
- var t = this.frameNum * this.oImgData.oData.spriteWidth % this.oImgData.img.width,
- n = Math.floor(this.frameNum / (this.oImgData.img.width / this.oImgData.oData.spriteWidth)) * this.oImgData.oData.spriteHeight;
- e.drawImage(this.oImgData.img, t, n, this.oImgData.oData.spriteWidth, this.oImgData.oData.spriteHeight, -this.oImgData.oData.spriteWidth / 2 + this.offsetX, -this.oImgData.oData.spriteHeight / 2 + this.offsetY, this.oImgData.oData.spriteWidth, this.oImgData.oData.spriteHeight)
- }, e
- }();
- e.BasicSprite = t
- }(Utils || (Utils = {}));
- var Utils;
- ! function(e) {
- var t = function() {
- function e(e, t) {
- var n = this;
- this.canvasX = 0, this.canvasY = 0, this.canvasScaleX = 1, this.canvasScaleY = 1, this.prevHitTime = 0, this.pauseIsOn = !1, this.isDown = !1, this.isDetectingKeys = !1, this.isBugBrowser = t, e.addEventListener("touchstart", function(e) {
- for (var t = 0; t < e.changedTouches.length; t++) n.hitDown(e, e.changedTouches[t].pageX, e.changedTouches[t].pageY, e.changedTouches[t].identifier)
- }, !1), e.addEventListener("touchend", function(e) {
- for (var t = 0; t < e.changedTouches.length; t++) n.hitUp(e, e.changedTouches[t].pageX, e.changedTouches[t].pageY, e.changedTouches[t].identifier)
- }, !1), e.addEventListener("touchmove", function(e) {
- for (var t = 0; t < n.aHitAreas.length; t++) n.move(e, e.changedTouches[t].pageX, e.changedTouches[t].pageY, e.changedTouches[t].identifier, !0)
- }, !1), e.addEventListener("mousedown", function(e) {
- n.isDown = !0, n.hitDown(e, e.pageX, e.pageY, 1)
- }, !1), e.addEventListener("mouseup", function(e) {
- n.isDown = !1, n.hitUp(e, e.pageX, e.pageY, 1)
- }, !1), e.addEventListener("mousemove", function(e) {
- n.move(e, e.pageX, e.pageY, 1, n.isDown)
- }, !1), this.aHitAreas = new Array, this.aKeys = new Array
- }
- return e.prototype.setCanvas = function(e, t, n, r) {
- this.canvasX = e, this.canvasY = t, this.canvasScaleX = n, this.canvasScaleY = r
- }, e.prototype.hitDown = function(e, t, n, r) {
- if (!this.pauseIsOn) {
- var i = (new Date).getTime();
- if (!(i - this.prevHitTime < 500 && isBugBrowser)) {
- this.prevHitTime = i, e.preventDefault(), e.stopPropagation(), t = (t - this.canvasX) * this.canvasScaleX, n = (n - this.canvasY) * this.canvasScaleY;
- for (var s = 0; s < this.aHitAreas.length; s++)
- if (this.aHitAreas[s].rect && t > this.aHitAreas[s].area[0] && n > this.aHitAreas[s].area[1] && t < this.aHitAreas[s].area[2] && n < this.aHitAreas[s].area[3]) {
- this.aHitAreas[s].aTouchIdentifiers.push(r), this.aHitAreas[s].oData.isDown || (this.aHitAreas[s].oData.isDown = !0, this.aHitAreas[s].oData.x = t, this.aHitAreas[s].oData.y = n, this.aHitAreas[s].callback(this.aHitAreas[s].id, this.aHitAreas[s].oData));
- break
- }
- }
- }
- }, e.prototype.hitUp = function(e, t, n, r) {
- if (!this.pauseIsOn) {
- e.preventDefault(), e.stopPropagation(), t = (t - this.canvasX) * this.canvasScaleX, n = (n - this.canvasY) * this.canvasScaleY;
- for (var i = 0; i < this.aHitAreas.length; i++)
- if (this.aHitAreas[i].rect && t > this.aHitAreas[i].area[0] && n > this.aHitAreas[i].area[1] && t < this.aHitAreas[i].area[2] && n < this.aHitAreas[i].area[3]) {
- for (var s = 0; s < this.aHitAreas[i].aTouchIdentifiers.length; s++) this.aHitAreas[i].aTouchIdentifiers[s] == r && (this.aHitAreas[i].aTouchIdentifiers.splice(s, 1), s -= 1);
- 0 == this.aHitAreas[i].aTouchIdentifiers.length && (this.aHitAreas[i].oData.isDown = !1, this.aHitAreas[i].oData.multiTouch && this.aHitAreas[i].callback(this.aHitAreas[i].id, this.aHitAreas[i].oData));
- break
- }
- }
- }, e.prototype.move = function(e, t, n, r, i) {
- if (!this.pauseIsOn && i) {
- t = (t - this.canvasX) * this.canvasScaleX, n = (n - this.canvasY) * this.canvasScaleY;
- for (var s = 0; s < this.aHitAreas.length; s++)
- if (this.aHitAreas[s].rect)
- if (t > this.aHitAreas[s].area[0] && n > this.aHitAreas[s].area[1] && t < this.aHitAreas[s].area[2] && n < this.aHitAreas[s].area[3]) this.aHitAreas[s].oData.isDown || (this.aHitAreas[s].oData.isDown = !0, this.aHitAreas[s].oData.x = t, this.aHitAreas[s].oData.y = n, this.aHitAreas[s].aTouchIdentifiers.push(r), this.aHitAreas[s].oData.multiTouch && this.aHitAreas[s].callback(this.aHitAreas[s].id, this.aHitAreas[s].oData)), this.aHitAreas[s].oData.isDraggable && (this.aHitAreas[s].oData.isBeingDragged = !0, this.aHitAreas[s].oData.x = t, this.aHitAreas[s].oData.y = n, this.aHitAreas[s].callback(this.aHitAreas[s].id, this.aHitAreas[s].oData), this.aHitAreas[s].oData.isBeingDragged = !1);
- else if (this.aHitAreas[s].oData.isDown) {
- for (var o = 0; o < this.aHitAreas[s].aTouchIdentifiers.length; o++) this.aHitAreas[s].aTouchIdentifiers[o] == r && (this.aHitAreas[s].aTouchIdentifiers.splice(o, 1), o -= 1);
- 0 == this.aHitAreas[s].aTouchIdentifiers.length && (this.aHitAreas[s].oData.isDown = !1, this.aHitAreas[s].oData.multiTouch && this.aHitAreas[s].callback(this.aHitAreas[s].id, this.aHitAreas[s].oData))
- }
- }
- }, e.prototype.keyDown = function(e) {
- for (var t = 0; t < this.aKeys.length; t++) e.keyCode == this.aKeys[t].keyCode && (this.aKeys[t].oData.isDown = !0, this.aKeys[t].callback(this.aKeys[t].id, this.aKeys[t].oData))
- }, e.prototype.keyUp = function(e) {
- for (var t = 0; t < this.aKeys.length; t++) e.keyCode == this.aKeys[t].keyCode && (this.aKeys[t].oData.isDown = !1, this.aKeys[t].callback(this.aKeys[t].id, this.aKeys[t].oData))
- }, e.prototype.addKey = function(e, t, n, r) {
- var i = this;
- this.isDetectingKeys || (window.addEventListener("keydown", function(e) {
- i.keyDown(e)
- }, !1), window.addEventListener("keyup", function(e) {
- i.keyUp(e)
- }, !1), this.isDetectingKeys = !0), null == n && (n = new Object), this.aKeys.push({
- id: e,
- callback: t,
- oData: n,
- keyCode: r
- })
- }, e.prototype.removeKey = function(e) {
- for (var t = 0; t < this.aKeys.length; t++) this.aKeys[t].id == e && (this.aKeys.splice(t, 1), t -= 1)
- }, e.prototype.addHitArea = function(e, t, n, r, i, s) {
- "undefined" == typeof s && (s = !1), null == n && (n = new Object), s && this.removeHitArea(e);
- var o = new Array;
- switch (r) {
- case "image":
- void 0 == i.scale && (i.scale = 1);
- var u;
- i.oImgData.isSpriteSheet ? (u = new Array(i.aPos[0] - i.oImgData.oData.spriteWidth / 2 * i.scale, i.aPos[1] - i.oImgData.oData.spriteHeight / 2 * i.scale, i.aPos[0] + i.oImgData.oData.spriteWidth / 2 * i.scale, i.aPos[1] + i.oImgData.oData.spriteHeight / 2 * i.scale), this.aHitAreas.push({
- id: e,
- aTouchIdentifiers: o,
- callback: t,
- oData: n,
- rect: !0,
- area: u
- })) : (u = new Array(i.aPos[0] - i.oImgData.img.width / 2 * i.scale, i.aPos[1] - i.oImgData.img.height / 2 * i.scale, i.aPos[0] + i.oImgData.img.width / 2 * i.scale, i.aPos[1] + i.oImgData.img.height / 2 * i.scale), this.aHitAreas.push({
- id: e,
- aTouchIdentifiers: o,
- callback: t,
- oData: n,
- rect: !0,
- area: u
- }));
- break;
- case "rect":
- this.aHitAreas.push({
- id: e,
- aTouchIdentifiers: o,
- callback: t,
- oData: n,
- rect: !0,
- area: i.aRect
- })
- }
- }, e.prototype.removeHitArea = function(e) {
- for (var t = 0; t < this.aHitAreas.length; t++) this.aHitAreas[t].id == e && (this.aHitAreas.splice(t, 1), t -= 1)
- }, e
- }();
- e.UserInput = t
- }(Utils || (Utils = {}));
- var Utils;
- ! function(e) {
- var t = function() {
- function e(e) {
- this.updateFreq = 10, this.updateInc = 0, this.frameAverage = 0, this.display = 1, this.log = "", this.render = function(e) {
- this.frameAverage += this.delta / this.updateFreq, ++this.updateInc >= this.updateFreq && (this.updateInc = 0, this.display = this.frameAverage, this.frameAverage = 0), e.textAlign = "left", ctx.font = "10px Helvetica", e.fillStyle = "#333333", e.beginPath(), e.rect(0, this.canvasHeight - 15, 40, 15), e.closePath(), e.fill(), e.fillStyle = "#ffffff", e.fillText(Math.round(1e3 / (1e3 * this.display)) + " fps " + this.log, 5, this.canvasHeight - 5)
- }, this.canvasHeight = e
- }
- return e.prototype.update = function(e) {
- this.delta = e
- }, e
- }();
- e.FpsMeter = t
- }(Utils || (Utils = {}));
- var Elements;
- ! function(e) {
- var t = function() {
- function e(e, t, n) {
- this.x = 0, this.y = 0, this.targY = 0, this.incY = 0, this.posY = 0, this.oImgData = e, this.canvasWidth = t, this.canvasHeight = n
- }
- return e.prototype.updateScroll = function(e) {
- this.incY += 3 * e, this.posY -= 8 * this.posY * e
- }, e.prototype.render = function(e) {
- var t = 40;
- e.drawImage(this.oImgData.img, 0, 0);
- for (var n = 0; t > n; n++) e.drawImage(this.oImgData.img, 0, n * (this.canvasHeight / t), this.canvasWidth, this.canvasHeight / t, 4 * Math.sin(this.incY + n / 3) - this.posY, n * (this.canvasHeight / t), this.canvasWidth, this.canvasHeight / t)
- }, e
- }();
- e.Background = t
- }(Elements || (Elements = {}));
- var Elements;
- ! function(e) {
- var t = function() {
- function e(e, t, n, r, i) {
- this.incY = 0, this.score = 0, this.highestScore = 0, this.posY = 0, this.bgX = 0, this.bgY = 0, this.atmosX = 0, this.atmosY = 0, this.oButs = e, this.oBgImgData = t, this.oTitleImgData = n, this.canvasWidth = r, this.canvasHeight = i, this.posY = -this.canvasHeight
- }
- return e.prototype.setRenderFunc = function(e) {
- switch (this.posY = -this.canvasHeight, e) {
- case "start":
- this.renderFunc = this.renderStartScreen, TweenLite.to(this, .5, {
- posY: 0
- });
- break;
- case "help":
- break;
- case "end":
- }
- }, e.prototype.render = function(e, t) {
- this.renderFunc(e, t)
- }, e.prototype.renderStartScreen = function(e, t) {
- this.incY += 5 * t, this.bgY -= 50 * t, this.bgX -= 50 * Math.sin(this.incY / 10) * t;
- var n = this.bgX % this.canvasWidth,
- r = this.bgY % this.canvasHeight;
- 0 > n && (n += this.canvasWidth), 0 > r && (r += this.canvasHeight), e.drawImage(this.oBgImgData.img, n, r, this.canvasWidth, this.canvasHeight, 0, 0, this.canvasWidth, this.canvasHeight), e.drawImage(this.oTitleImgData.img, 15 + this.posY, 60), e.drawImage(this.oButs.play.imageData.img, this.oButs.play.pos[0] - this.oButs.play.imageData.img.width / 2, this.oButs.play.pos[1] - this.oButs.play.imageData.img.height / 2 - 5 * Math.sin(this.incY) - this.posY), e.drawImage(this.oButs.moreGames.imageData.img, this.oButs.moreGames.pos[0] - this.oButs.moreGames.imageData.img.width / 2, this.oButs.moreGames.pos[1] - this.oButs.moreGames.imageData.img.height / 2 - 5 * Math.sin(this.incY) - this.posY)
- }, e
- }();
- e.Screens = t
- }(Elements || (Elements = {}));
- var Elements;
- ! function(e) {
- var t = function() {
- function e(e, t, n) {
- this.inc = 0, this.oSplashScreenImgData = e, this.canvasWidth = t, this.canvasHeight = n, this.posY = -this.canvasHeight, TweenLite.to(this, .5, {
- posY: 0
- })
- }
- return e.prototype.render = function(e, t) {
- this.inc += 5 * t, e.drawImage(this.oSplashScreenImgData.img, 0, 0 - this.posY)
- }, e
- }();
- e.Splash = t
- }(Elements || (Elements = {}));
- var Elements;
- ! function(e) {
- var t = function() {
- function e(e, t, n, r, i, s, o, u) {
- this.timer = .3, this.endTime = 0, this.posY = 0, this.numberSpace = 18, this.incY = 0, this.oPanelsImgData = e, this.oTutorialsImgData = t, this.oNumbersImgData = n, this.oGoldFishImgData = r, this.panelType = i, this.aButs = s, this.canvasWidth = o, this.canvasHeight = u
- }
- return e.prototype.update = function(e) {
- this.incY += 5 * e
- }, e.prototype.startTween1 = function() {
- this.posY = 550, TweenLite.to(this, .8, {
- posY: 0,
- ease: "Back.easeOut"
- })
- }, e.prototype.startTween2 = function() {
- this.posY = 50, TweenLite.to(this, .5, {
- posY: 0,
- ease: "Back.easeOut"
- })
- }, e.prototype.startTween3 = function() {
- this.posY = 550, TweenLite.to(this, .5, {
- posY: 0,
- ease: "Quad.easeOut"
- })
- }, e.prototype.startTweenEndLevel = function() {
- this.aStarPos = new Array;
- for (var e = 0; e < this.oScoreData.stars; e++) this.aStarPos.push({
- posY: -300
- }), TweenLite.to(this.aStarPos[e], 1.5, {
- posY: 0,
- ease: "Bounce.easeOut",
- delay: .3 * e
- });
- this.posY = 550, TweenLite.to(this, .8, {
- posY: 0,
- ease: "Back.easeOut"
- })
- }, e.prototype.renderButs = function(e) {
- if (null != this.aButs)
- for (var t = 0; t < this.aButs.length; t++) {
- var n = this.posY,
- r = 0;
- if (0 != this.incY && (r = 3 * Math.sin(this.incY + 45 * t)), 0 == t % 2 && (n = -this.posY), 0 == this.aButs[t].type) e.drawImage(this.aButs[t].oImgData.img, 0, 0, this.aButs[t].oImgData.img.width, this.aButs[t].oImgData.img.height, this.aButs[t].aPos[0] - this.aButs[t].oImgData.img.width / 2 * this.aButs[t].scale + n, this.aButs[t].aPos[1] - this.aButs[t].oImgData.img.height / 2 * this.aButs[t].scale - r, this.aButs[t].oImgData.img.width * this.aButs[t].scale, this.aButs[t].oImgData.img.height * this.aButs[t].scale);
- else {
- var i = this.aButs[t].frame,
- s = i * this.aButs[t].oImgData.oData.spriteWidth % this.aButs[t].oImgData.img.width,
- o = Math.floor(i / (this.aButs[t].oImgData.img.width / this.aButs[t].oImgData.oData.spriteWidth)) * this.aButs[t].oImgData.oData.spriteHeight;
- e.drawImage(this.aButs[t].oImgData.img, s, o, this.aButs[t].oImgData.oData.spriteWidth, this.aButs[t].oImgData.oData.spriteHeight, this.aButs[t].aPos[0] - this.aButs[t].oImgData.oData.spriteWidth / 2 + n, this.aButs[t].aPos[1] - this.aButs[t].oImgData.oData.spriteHeight / 2 - r, this.aButs[t].oImgData.oData.spriteWidth * this.aButs[t].scale, this.aButs[t].oImgData.oData.spriteHeight * this.aButs[t].scale)
- }
- }
- }, e.prototype.render = function(e) {
- switch (this.panelType) {
- case "start":
- var t = 0,
- n = t * this.oPanelsImgData.oData.spriteWidth % this.oPanelsImgData.img.width,
- r = Math.floor(t / (this.oPanelsImgData.img.width / this.oPanelsImgData.oData.spriteWidth)) * this.oPanelsImgData.oData.spriteHeight;
- e.drawImage(this.oPanelsImgData.img, n, r, this.oPanelsImgData.oData.spriteWidth, this.oPanelsImgData.oData.spriteHeight, 0, 0 + this.posY, this.oPanelsImgData.oData.spriteWidth, this.oPanelsImgData.oData.spriteHeight);
- break;
- case "credits":
- var t = 3,
- n = t * this.oPanelsImgData.oData.spriteWidth % this.oPanelsImgData.img.width,
- r = Math.floor(t / (this.oPanelsImgData.img.width / this.oPanelsImgData.oData.spriteWidth)) * this.oPanelsImgData.oData.spriteHeight;
- e.drawImage(this.oPanelsImgData.img, n, r, this.oPanelsImgData.oData.spriteWidth, this.oPanelsImgData.oData.spriteHeight, 0, 0 + this.posY, this.oPanelsImgData.oData.spriteWidth, this.oPanelsImgData.oData.spriteHeight);
- break;
- case "levelSelect":
- for (var i = 0; 12 > i; i++)
- for (var s = i + 12 * this.oScoreData.levelButsPage + 1, o = 0; o < s.toString().length; o++) {
- t = parseFloat(s.toString().charAt(o));
- var n = t * this.oNumbersImgData.oData.spriteWidth % this.oNumbersImgData.img.width,
- r = Math.floor(t / (this.oNumbersImgData.img.width / this.oNumbersImgData.oData.spriteWidth)) * this.oNumbersImgData.oData.spriteHeight,
- u = this.posY;
- 0 == i % 2 && (u = -this.posY), e.drawImage(this.oNumbersImgData.img, n, r, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight, this.aButs[i].aPos[0] + o * this.numberSpace - this.numberSpace * s.toString().length / 2 + u, this.aButs[i].aPos[1] + 2, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight)
- }
- break;
- case "levelComplete":
- var t = 1,
- n = t * this.oPanelsImgData.oData.spriteWidth % this.oPanelsImgData.img.width,
- r = Math.floor(t / (this.oPanelsImgData.img.width / this.oPanelsImgData.oData.spriteWidth)) * this.oPanelsImgData.oData.spriteHeight;
- e.drawImage(this.oPanelsImgData.img, n, r, this.oPanelsImgData.oData.spriteWidth, this.oPanelsImgData.oData.spriteHeight, 0, 0 + this.posY, this.oPanelsImgData.oData.spriteWidth, this.oPanelsImgData.oData.spriteHeight);
- for (var s = this.oScoreData.levelScore, o = 0; o < s.toString().length; o++) {
- t = parseFloat(s.toString().charAt(o));
- var n = t * this.oNumbersImgData.oData.spriteWidth % this.oNumbersImgData.img.width,
- r = Math.floor(t / (this.oNumbersImgData.img.width / this.oNumbersImgData.oData.spriteWidth)) * this.oNumbersImgData.oData.spriteHeight;
- e.drawImage(this.oNumbersImgData.img, n, r, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight, 115 + o * this.numberSpace - this.numberSpace * s.toString().length / 2, 320 + this.posY, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight)
- }
- for (var s = this.oScoreData.totalScore, o = 0; o < s.toString().length; o++) {
- t = parseFloat(s.toString().charAt(o));
- var n = t * this.oNumbersImgData.oData.spriteWidth % this.oNumbersImgData.img.width,
- r = Math.floor(t / (this.oNumbersImgData.img.width / this.oNumbersImgData.oData.spriteWidth)) * this.oNumbersImgData.oData.spriteHeight;
- e.drawImage(this.oNumbersImgData.img, n, r, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight, 268 + o * this.numberSpace - this.numberSpace * s.toString().length / 2, 320 + this.posY, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight)
- }
- for (var o = 0; o < this.oScoreData.stars; o++) e.drawImage(this.oGoldFishImgData.img, 52 + 82 * o, 155 + this.aStarPos[o].posY);
- break;
- case "tutorial0":
- case "tutorial1":
- case "tutorial2":
- case "tutorial3":
- var t = parseFloat(this.panelType.charAt(this.panelType.length - 1)),
- n = t * this.oTutorialsImgData.oData.spriteWidth % this.oTutorialsImgData.img.width,
- r = Math.floor(t / (this.oTutorialsImgData.img.width / this.oTutorialsImgData.oData.spriteWidth)) * this.oTutorialsImgData.oData.spriteHeight;
- e.drawImage(this.oTutorialsImgData.img, n, r, this.oTutorialsImgData.oData.spriteWidth, this.oTutorialsImgData.oData.spriteHeight, 0, 0 + this.posY, this.oTutorialsImgData.oData.spriteWidth, this.oTutorialsImgData.oData.spriteHeight);
- break;
- case "pause":
- var t = 2,
- n = t * this.oPanelsImgData.oData.spriteWidth % this.oPanelsImgData.img.width,
- r = Math.floor(t / (this.oPanelsImgData.img.width / this.oPanelsImgData.oData.spriteWidth)) * this.oPanelsImgData.oData.spriteHeight;
- e.drawImage(this.oPanelsImgData.img, n, r, this.oPanelsImgData.oData.spriteWidth, this.oPanelsImgData.oData.spriteHeight, 0, 0, this.oPanelsImgData.oData.spriteWidth, this.oPanelsImgData.oData.spriteHeight)
- }
- }, e
- }();
- e.Panel = t
- }(Elements || (Elements = {}));
- var Elements;
- ! function(e) {
- var t = function() {
- function e(e, t, n, r, i, s) {
- this.score = 0, this.letterSpace = 18, this.oHudImgData = e, this.oNumbersImgData = t, this.canvasWidth = n, this.canvasHeight = r, this.score = i, this.levelNum = s
- }
- return e.prototype.render = function(e) {
- e.drawImage(this.oHudImgData.img, 0, 0);
- for (var t = 0; t < this.levelNum.toString().length; t++) {
- var n = parseFloat(this.levelNum.toString().charAt(t)),
- r = n * this.oNumbersImgData.oData.spriteWidth % this.oNumbersImgData.img.width,
- i = Math.floor(n / (this.oNumbersImgData.img.width / this.oNumbersImgData.oData.spriteWidth)) * this.oNumbersImgData.oData.spriteHeight;
- e.drawImage(this.oNumbersImgData.img, r, i, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight, 65 + t * this.letterSpace, 40, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight)
- }
- if (this.score > 0)
- for (var t = 0; t < this.score.toString().length; t++) {
- var n = parseFloat(this.score.toString().charAt(t)),
- r = n * this.oNumbersImgData.oData.spriteWidth % this.oNumbersImgData.img.width,
- i = Math.floor(n / (this.oNumbersImgData.img.width / this.oNumbersImgData.oData.spriteWidth)) * this.oNumbersImgData.oData.spriteHeight;
- e.drawImage(this.oNumbersImgData.img, r, i, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight, 170 + t * this.letterSpace - this.letterSpace * this.score.toString().length / 2, 10, this.oNumbersImgData.oData.spriteWidth, this.oNumbersImgData.oData.spriteHeight)
- }
- }, e.prototype.updateScore = function(e) {
- this.score = e
- }, e
- }();
- e.Hud = t
- }(Elements || (Elements = {}));
- var __extends = this.__extends || function(e, t) {
- function n() {
- this.constructor = e
- }
- n.prototype = t.prototype, e.prototype = new n
- },
- Elements;
- ! function(e) {
- var t = function(e) {
- function t(t, n, r, i) {
- e.call(this, t, 2, 43, "normal" + n.colourId), this.radian = Math.PI / 180, this.angle = 0, this.state = "held", this.skipBubble = null, this.isOnFire = !1, this.inc = 0, this.vx = 0, this.vy = 0, this.m = 1, this.f = 1, this.b = 1, this.oData = n, this.x = this.oData.x, this.y = this.oData.y + 10, this.p0 = {
- x: this.x,
- y: this.y
- }, this.p1 = {
- x: this.x,
- y: this.y
- }, this.offsetY = 10, this.canvasWidth = r, this.canvasHeight = i, this.updateFunc = this.updateHeld
- }
- return __extends(t, e), t.prototype.caught = function(e) {
- this.state = "caught", this.isOnFire = !1, this.caughtBubble = e, this.updateFunc = this.updateCaught, this.setAnimType("loop", "normal" + this.oData.colourId), -1 == this.caughtBubble.movingDir && TweenLite.to(this, .7, {
- x: this.caughtBubble.x,
- y: this.caughtBubble.y,
- ease: "Elastic.easeOut"
- }), this.fps = 2
- }, t.prototype.stung = function() {
- this.state = "stung", this.isOnFire = !1, this.updateFunc = this.updateStung, this.setAnimType("loop", "stung")
- }, t.prototype.thrown = function(e, t) {
- this.rotation = Math.atan2(e - this.x, -(t - this.y)), this.state = "flying", this.p0 = {
- x: this.x,
- y: this.y
- }, this.p1 = {
- x: this.x,
- y: this.y
- }, this.vx = 4 * Math.cos(this.rotation - 90 * this.radian), this.vy = 4 * Math.sin(this.rotation - 90 * this.radian), this.updateFunc = this.updateFlying
- }, t.prototype.release = function(e) {
- TweenLite.killTweensOf(this), this.state = "flying", this.updateFunc = this.updateFlying, this.skipBubble = e, this.vx = 4 * Math.cos(this.rotation - 90 * this.radian), this.vy = 4 * Math.sin(this.rotation - 90 * this.radian), this.p0 = {
- x: this.x,
- y: this.y
- }, this.p1 = {
- x: this.x,
- y: this.y
- }, "fire" == e.oData.subType && (this.setAnimType("loop", "onFire"), this.fps = 10, this.isOnFire = !0)
- }, t.prototype.update = function(e, t, n) {
- this.updateFunc(e, t, n)
- }, t.prototype.updateFlying = function(t, n, r) {
- e.prototype.updateAnimation.call(this, r), this.vy = this.vy + 5 * r, this.angle = Math.atan2(this.vy, this.vx) + 90 * this.radian, this.angle - this.rotation > 180 * this.radian ? this.angle -= 360 * this.radian : this.angle - this.rotation < -180 * this.radian && (this.angle += 360 * this.radian), this.rotation -= 60 * ((this.rotation - this.angle) / 5) * r, this.y > this.canvasHeight + 100 && (this.removeMe = !0)
- }, t.prototype.updateStung = function(t, n, r) {
- e.prototype.updateAnimation.call(this, r), this.vy = this.vy + 5 * r, this.y += this.vy, this.rotation += this.vy / 100, this.y > this.canvasHeight + 100 && (this.removeMe = !0)
- }, t.prototype.updateCaught = function(t, n, r) {
- e.prototype.updateAnimation.call(this, r), -1 != this.caughtBubble.movingDir && (this.x = this.caughtBubble.x, this.y = this.caughtBubble.y)
- }, t.prototype.updateHeld = function(t, n, r) {
- e.prototype.updateAnimation.call(this, r), this.x = t, this.y -= (this.y - n + 20) / 5, this.inc += r, this.rotation = Math.sin(20 * this.inc) / 5
- }, t
- }(Utils.AnimSprite);
- e.Fish = t
- }(Elements || (Elements = {}));
- var Elements;
- ! function(e) {
- var t = function(e) {
- function t(t, n, r, i, s) {
- e.call(this, t, 20, 20, r.subType), this.state = "normal", this.movingDir = -1, this.isBiggerX = !0, this.vx = 0, this.vy = 0, this.m = 1, this.f = 1, this.b = 1, this.oData = r, this.subType = r.subType, this.offsetY = -24, this.offsetX = 2, this.frameInc = Math.ceil(10 * Math.random()), this.x = this.oData.p0.x, this.y = this.oData.p0.y, this.p0 = this.oData.p0, this.p1 = this.oData.p1, (this.p0.x != this.p1.x || this.p0.y != this.p1.y) && (this.movingDir = 0), Math.abs(this.p0.x - this.p1.x) < Math.abs(this.p0.y - this.p1.y) && (this.isBiggerX = !1), this.id = n, this.canvasWidth = i, this.canvasHeight = s
- }
- return __extends(t, e), t.prototype.changeState = function(e, t) {
- switch (this.state = e, this.state) {
- case "holding":
- this.setAnimType("loop", this.state);
- break;
- case "caught":
- this.caughtFish = t.caughtFish, "normal" == this.subType ? (this.animEndedFunc = function() {
- this.changeState("holding")
- }, this.setAnimType("once", this.state)) : "fire" == this.subType;
- break;
- case "normal":
- this.setAnimType("loop", this.state), this.subType = "normal"
- }
- }, t.prototype.update = function(t) {
- e.prototype.updateAnimation.call(this, t), 0 == this.movingDir ? (this.x -= (this.p0.x - this.p1.x) / 3 * t, this.y -= (this.p0.y - this.p1.y) / 3 * t, this.isBiggerX ? (this.p0.x < this.p1.x && this.x > this.p1.x || this.p1.x < this.p0.x && this.x < this.p1.x) && (this.movingDir = 1) : (this.p0.y < this.p1.y && this.y > this.p1.y || this.p1.y < this.p0.y && this.y < this.p1.y) && (this.movingDir = 1)) : 1 == this.movingDir && (this.x += (this.p0.x - this.p1.x) / 3 * t, this.y += (this.p0.y - this.p1.y) / 3 * t, this.isBiggerX ? (this.p0.x < this.p1.x && this.x < this.p0.x || this.p1.x < this.p0.x && this.x > this.p0.x) && (this.movingDir = 0) : (this.p0.y < this.p1.y && this.y < this.p0.y || this.p1.y < this.p0.y && this.y > this.p0.y) && (this.movingDir = 0))
- }, t
- }(Utils.AnimSprite);
- e.Bubble = t
- }(Elements || (Elements = {}));
- var Elements;
- ! function(e) {
- var t = function(e) {
- function t(t, n, r, i) {
- e.call(this, t, 24, 15, "ambient"), this.acc = 0, this.targX = 0, this.isMoving = !1, this.rightPull = 0, this.leftPull = 0, this.oBaseImgData = t, this.oData = n, this.offsetY = -20, this.x = this.oData.x, this.y = this.oData.y, this.canvasWidth = r, this.canvasHeight = i
- }
- return __extends(t, e), t.prototype.update = function(t) {
- e.prototype.updateAnimation.call(this, t), this.isMoving ? this.acc = Math.max(Math.min((this.targX - this.x) / 10, 4), -4) : this.acc *= .5, this.x += 60 * this.acc * t
- }, t.prototype.startMoving = function(e) {
- this.targX = Math.max(Math.min(e, 308), 75), this.isMoving = !0, e > this.x && "walkRight" != this.animId ? this.setAnimType("loop", "walkRight") : e < this.x && "walkLeft" != this.animId && this.setAnimType("loop", "walkLeft")
- }, t.prototype.throwFish = function() {
- this.animEndedFunc = function() {
- this.stopMoving()
- }, this.setAnimType("once", "throwFish")
- }, t.prototype.stopMoving = function() {
- this.isMoving = !1, this.setAnimType("loop", "ambient")
- }, t
- }(Utils.AnimSprite);
- e.Base = t
- }(Elements || (Elements = {}));
- var Elements;
- ! function(e) {
- var t = function(e) {
- function t(t, n, r, i) {
- e.call(this, t, 0, 0), this.radian = Math.PI / 180, this.oData = n, this.x = (this.oData.p1.x - this.oData.p0.x) / 2 + this.oData.p0.x, this.y = (this.oData.p1.y - this.oData.p0.y) / 2 + this.oData.p0.y, this.rotation = Math.atan2(this.oData.p1.x - this.oData.p0.x, -(this.oData.p1.y - this.oData.p0.y)) - 90 * this.radian, this.canvasWidth = r, this.canvasHeight = i
- }
- return __extends(t, e), t
- }(Utils.BasicSprite);
- e.Log = t
- }(Elements || (Elements = {}));
- var Utils;
- ! function(e) {
- var t = function() {
- function e(e, t) {
- this.aLines = new Array, this.aFishes = new Array, this.aBalls = new Array, this.aLines = e, this.defrostBubble = t, this.inc = 1;
- for (var n = 0; n < this.aLines.length; n++) this.updateVector(this.aLines[n], null, !0)
- }
- return e.prototype.drawAll = function(e) {
- for (var t = 0; t < this.aFishes.length; t++)
- if ("flying" == this.aFishes[t].state) {
- var n = this.aFishes[t];
- n.x = n.p1.x, n.y = n.p1.y, n.p0 = n.p1, this.updateVector(n, e)
- }
- }, e.prototype.update = function(e) {
- var t;
- for (t = 0; t < this.aFishes.length; t++)
- if ("flying" == this.aFishes[t].state) {
- var n = this.aFishes[t];
- this.updateVector(n, e);
- for (var r = 0; r < this.aLines.length; r++) {
- this.fi = this.findIntersection(n, this.aLines[r]), this.updateVector(this.fi, e, !1);
- var i = n.radius - this.fi.len;
- if (i >= 0) {
- "ice" == this.aLines[r].subType ? this.aFishes[t].isOnFire ? this.defrostBubble(this.aLines[r].id) : playSound("hitIce") : playSound("hitSide"), n.p1.x += this.fi.dx * i, n.p1.y += this.fi.dy * i;
- var s = {
- dx: this.fi.lx,
- dy: this.fi.ly,
- lx: this.fi.dx,
- ly: this.fi.dy,
- b: 1,
- f: 1
- },
- o = this.bounce(n, s);
- n.vx = o.vx, n.vy = o.vy
- }
- }
- }
- this.drawAll(e)
- }, e.prototype.updateVector = function(e, t, n) {
- "undefined" == typeof n && (n = !1), null == t && (t = .016), 1 == n ? (e.vx = e.p1.x - e.p0.x, e.vy = e.p1.y - e.p0.y) : (e.p1.x = e.p0.x + 60 * e.vx * t, e.p1.y = e.p0.y + 60 * e.vy * t), this.makeVector(e)
- }, e.prototype.makeVector = function(e) {
- e.len = Math.sqrt(e.vx * e.vx + e.vy * e.vy), e.len > 0 ? (e.dx = e.vx / e.len, e.dy = e.vy / e.len) : (e.dx = 0, e.dy = 0), e.rx = -e.dy, e.ry = e.dx, e.lx = e.dy, e.ly = -e.dx
- }, e.prototype.dotP = function(e, t) {
- var n = e.vx * t.vx + e.vy * t.vy;
- return n
- }, e.prototype.projectVector = function(e, t, n) {
- var r = e.vx * t + e.vy * n,
- i = {};
- return i.vx = r * t, i.vy = r * n, i
- }, e.prototype.bounceBalls = function(e, t, n) {
- var r = this.projectVector(e, n.dx, n.dy),
- i = this.projectVector(e, n.lx, n.ly),
- s = this.projectVector(t, n.dx, n.dy),
- o = this.projectVector(t, n.lx, n.ly),
- u = e.m * r.vx + t.m * s.vx,
- a = r.vx - s.vx,
- f = (u + a * e.m) / (e.m + t.m),
- l = f - a;
- u = e.m * r.vy + t.m * s.vy, a = r.vy - s.vy;
- var c = (u + a * e.m) / (e.m + t.m),
- h = c - a,
- p = {};
- return p.vx1 = i.vx + l, p.vy1 = i.vy + h, p.vx2 = o.vx + f, p.vy2 = o.vy + c, p
- }, e.prototype.bounce = function(e, t) {
- var n = this.projectVector(e, t.dx, t.dy),
- r = this.projectVector(e, t.lx, t.ly),
- i = {};
- return r.len = Math.sqrt(r.vx * r.vx + r.vy * r.vy), r.vx = t.lx * r.len, r.vy = t.ly * r.len, i.vx = e.f * t.f * n.vx + e.b * t.b * r.vx, i.vy = e.f * t.f * n.vy + e.b * t.b * r.vy, i
- }, e.prototype.findIntersection = function(e, t) {
- var n = {},
- r = {};
- r.vx = e.p1.x - t.p0.x, r.vy = e.p1.y - t.p0.y;
- var i = r.vx * t.dx + r.vy * t.dy;
- if (0 > i) n = r;
- else {
- var s = {};
- s.vx = e.p1.x - t.p1.x, s.vy = e.p1.y - t.p1.y, i = s.vx * t.dx + s.vy * t.dy, n = i > 0 ? s : this.projectVector(r, t.lx, t.ly)
- }
- return n.p0 = {
- x: 0,
- y: 0
- }, n.p1 = {
- x: 0,
- y: 0
- }, n
- }, e
- }();
- e.Physics2D = t
- }(Utils || (Utils = {}));
- var requestAnimFrame = function() {
- return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(e) {
- window.setTimeout(e, 1e3 / 60, (new Date).getTime())
- }
- }(),
- previousTime, canvas = document.getElementById("canvas"),
- ctx = canvas.getContext("2d");
- canvas.width = 383, canvas.height = 550;
- var canvasX, canvasY, canvasScaleX, canvasScaleY, div = document.getElementById("viewporter"),
- sound, music, audioType = 0,
- muted = !1,
- splash, splashTimer = 0,
- assetLib, preAssetLib, rotatePause = !1,
- manualPause = !1,
- isMobile = !1,
- gameState = "loading",
- aLangs = new Array("EN"),
- curLang = "",
- isBugBrowser = !1,
- spilAPI, oLogoData = {},
- oMoreGamesData = {},
- isIE10 = !1;
- navigator.userAgent.match(/MSIE\s([\d]+)/) && (isIE10 = !0);
- var deviceAgent = navigator.userAgent.toLowerCase();
- (deviceAgent.match(/(iphone|ipod|ipad)/) || deviceAgent.match(/(android)/) || deviceAgent.match(/(iemobile)/) || deviceAgent.match(/iphone/i) || deviceAgent.match(/ipad/i) || deviceAgent.match(/ipod/i) || deviceAgent.match(/blackberry/i) || deviceAgent.match(/bada/i)) && (isMobile = !0, deviceAgent.match(/(android)/) && !/Chrome/.test(navigator.userAgent) && (isBugBrowser = !0));
- var userInput = new Utils.UserInput(canvas, isBugBrowser);
- resizeCanvas(), window.onresize = function() {
- setTimeout(function() {
- resizeCanvas()
- }, 1)
- }, document.addEventListener("visibilitychange", function() {
- document.hidden ? Howler.mute() : muted || Howler.unmute()
- }, !1), window.addEventListener("load", function() {
- setTimeout(function() {
- resizeCanvas()
- }, 0), window.addEventListener("orientationchange", function() {
- resizeCanvas()
- }, !1), GameAPI.loadAPI(function(e) {
- spilAPI = e;
- if (spilAPI.Branding.getLogo().image) {
- oLogoData = spilAPI.Branding.getLogo()
- } else {
- oLogoData = spilAPI.Branding.getLogo();
- oLogoData.image = "images/blank.png"
- }
- oMoreGamesData = spilAPI.Branding.getLink("more_games");
- curLang = aLangs[0], loadAssets()
- }, {
- id: "576742227280291504"
- })
- }), isIE10 || "undefined" == typeof window.AudioContext && "undefined" == typeof window.webkitAudioContext && -1 != navigator.userAgent.indexOf("Android") ? audioType = 0 : (audioType = 1, sound = new Howl({
- urls: ["audio/sound.ogg", "audio/sound.m4a"],
- sprite: {
- bubbleLand1: [0, 350],
- bubbleLand2: [500, 350],
- bubbleLand3: [1e3, 350],
- bubbleLand4: [1500, 350],
- crabThrow: [2e3, 750],
- hitJellyfish: [3e3, 850],
- hitIce: [4e3, 350],
- breakIce: [4500, 800],
- launchFire: [5500, 800],
- hitSide: [6500, 500],
- newFish: [7500, 1750],
- levelComplete: [9500, 2e3],
- click: [12e3, 350]
- }
- }), music = new Howl({
- urls: ["audio/music.ogg", "audio/music.m4a"],
- volume: .25,
- loop: !0
- }));
- var panel, hud, background, levelScore = 0,
- levelNum = 0,
- aLevelUps, bonusScore, aTutorials = new Array({
- levelNum: 0,
- shown: !1,
- panelType: "tutorial0"
- }, {
- levelNum: 2,
- shown: !1,
- panelType: "tutorial1"
- }, {
- levelNum: 4,
- shown: !1,
- panelType: "tutorial2"
- }, {
- levelNum: 11,
- shown: !1,
- panelType: "tutorial3"
- }),
- panelFrame, aBubbles, aFishes, aLogs, physics2D, base, fishCaught, fishColourInc = 0,
- levelCompleteTimer = -1,
- tutorialIsOn, levelButsPage = 0,
- levelThrows, bubbleTarg, oLogoBut, aLevelData = new Array([{
- type: "bubble",
- p0: {
- x: 192,
- y: 318
- },
- p1: {
- x: 192,
- y: 318
- },
- subType: "normal"
- }], [{
- type: "line",
- p0: {
- x: 0,
- y: 0
- },
- p1: {
- x: 275,
- y: 145
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 292,
- y: 338
- },
- p1: {
- x: 292,
- y: 338
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 92,
- y: 338
- },
- p1: {
- x: 92,
- y: 338
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 192,
- y: 308
- },
- p1: {
- x: 192,
- y: 308
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 192,
- y: 223
- },
- p1: {
- x: 192,
- y: 223
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 192,
- y: 336
- },
- p1: {
- x: 192,
- y: 336
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 192,
- y: 112
- },
- p1: {
- x: 192,
- y: 112
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 192,
- y: 223
- },
- p1: {
- x: 192,
- y: 223
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 192,
- y: 336
- },
- p1: {
- x: 192,
- y: 336
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 293,
- y: 239
- },
- p1: {
- x: 293,
- y: 239
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 197,
- y: 344
- },
- p1: {
- x: 197,
- y: 344
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 126,
- y: 249
- },
- p1: {
- x: 218,
- y: 277
- },
- subType: "normal"
- }, {
- type: "line",
- p0: {
- x: 514,
- y: 130
- },
- p1: {
- x: 323,
- y: 192
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: -166,
- y: 211
- },
- p1: {
- x: 28,
- y: 261
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 64,
- y: 199
- },
- p1: {
- x: 64,
- y: 199
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 259,
- y: 174
- },
- p1: {
- x: 259,
- y: 174
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 298,
- y: 263
- },
- p1: {
- x: 298,
- y: 263
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 166,
- y: 160
- },
- p1: {
- x: 166,
- y: 160
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 67,
- y: 325
- },
- p1: {
- x: 67,
- y: 325
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 280,
- y: 350
- },
- p1: {
- x: 280,
- y: 350
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 163,
- y: 356
- },
- p1: {
- x: 163,
- y: 356
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 331,
- y: 250
- },
- p1: {
- x: 331,
- y: 250
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 289,
- y: 345
- },
- p1: {
- x: 289,
- y: 345
- },
- subType: "normal"
- }, {
- type: "line",
- p0: {
- x: -63,
- y: 174
- },
- p1: {
- x: 88,
- y: 304
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 152,
- y: 230
- },
- p1: {
- x: 152,
- y: 230
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 40,
- y: 143
- },
- p1: {
- x: 343,
- y: 143
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 192,
- y: 328
- },
- p1: {
- x: 192,
- y: 328
- },
- subType: "normal"
- }], [{
- type: "line",
- p0: {
- x: 168,
- y: 43
- },
- p1: {
- x: 364,
- y: 1
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 192,
- y: 173
- },
- p1: {
- x: 192,
- y: 173
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 192,
- y: 293
- },
- p1: {
- x: 192,
- y: 293
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 40,
- y: 113
- },
- p1: {
- x: 343,
- y: 113
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 343,
- y: 233
- },
- p1: {
- x: 40,
- y: 233
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 40,
- y: 353
- },
- p1: {
- x: 343,
- y: 353
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 186,
- y: 250
- },
- p1: {
- x: 186,
- y: 250
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 237,
- y: 304
- },
- p1: {
- x: 237,
- y: 304
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 131,
- y: 304
- },
- p1: {
- x: 131,
- y: 304
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 85,
- y: 367
- },
- p1: {
- x: 285,
- y: 367
- },
- subType: "jellyfish"
- }], [{
- type: "bubble",
- p0: {
- x: 87,
- y: 104
- },
- p1: {
- x: 87,
- y: 104
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 86,
- y: 235
- },
- p1: {
- x: 86,
- y: 235
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 83,
- y: 363
- },
- p1: {
- x: 83,
- y: 363
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 297,
- y: 104
- },
- p1: {
- x: 297,
- y: 104
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 296,
- y: 235
- },
- p1: {
- x: 296,
- y: 235
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 293,
- y: 363
- },
- p1: {
- x: 293,
- y: 363
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 300,
- y: 169
- },
- p1: {
- x: 80,
- y: 171
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 187,
- y: 104
- },
- p1: {
- x: 187,
- y: 104
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 186,
- y: 235
- },
- p1: {
- x: 186,
- y: 235
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 183,
- y: 363
- },
- p1: {
- x: 183,
- y: 363
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 73,
- y: 301
- },
- p1: {
- x: 293,
- y: 299
- },
- subType: "jellyfish"
- }], [{
- type: "bubble",
- p0: {
- x: 118,
- y: 236
- },
- p1: {
- x: 204,
- y: 236
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 52,
- y: 195
- },
- p1: {
- x: 52,
- y: 195
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 52,
- y: 284
- },
- p1: {
- x: 52,
- y: 284
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 49,
- y: 103
- },
- p1: {
- x: 334,
- y: 207
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 49,
- y: 367
- },
- p1: {
- x: 334,
- y: 263
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 201,
- y: 246
- },
- p1: {
- x: 201,
- y: 246
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 121,
- y: 298
- },
- p1: {
- x: 121,
- y: 298
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 260,
- y: 324
- },
- p1: {
- x: 260,
- y: 324
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 182,
- y: 372
- },
- p1: {
- x: 182,
- y: 372
- },
- subType: "fire"
- }], [{
- type: "bubble",
- p0: {
- x: 195,
- y: 98
- },
- p1: {
- x: 195,
- y: 98
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 194,
- y: 215
- },
- p1: {
- x: 194,
- y: 215
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 332,
- y: 115
- },
- p1: {
- x: 332,
- y: 115
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 62,
- y: 115
- },
- p1: {
- x: 62,
- y: 115
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 272,
- y: 218
- },
- p1: {
- x: 272,
- y: 218
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 122,
- y: 218
- },
- p1: {
- x: 122,
- y: 218
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 192,
- y: 339
- },
- p1: {
- x: 192,
- y: 339
- },
- subType: "fire"
- }], [{
- type: "bubble",
- p0: {
- x: 191,
- y: 362
- },
- p1: {
- x: 191,
- y: 362
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 85,
- y: 365
- },
- p1: {
- x: 85,
- y: 365
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 298,
- y: 220
- },
- p1: {
- x: 298,
- y: 220
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 344,
- y: 283
- },
- p1: {
- x: 344,
- y: 283
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 241,
- y: 287
- },
- p1: {
- x: 241,
- y: 287
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 341,
- y: 139
- },
- p1: {
- x: 341,
- y: 139
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 34,
- y: 250
- },
- p1: {
- x: 34,
- y: 250
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 289,
- y: 348
- },
- p1: {
- x: 289,
- y: 348
- },
- subType: "normal"
- }, {
- type: "line",
- p0: {
- x: 129,
- y: 320
- },
- p1: {
- x: 254,
- y: 164
- },
- subType: "log"
- }], [{
- type: "bubble",
- p0: {
- x: 83,
- y: 359
- },
- p1: {
- x: 83,
- y: 359
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 52,
- y: 224
- },
- p1: {
- x: 52,
- y: 224
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 315,
- y: 355
- },
- p1: {
- x: 315,
- y: 355
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 188,
- y: 383
- },
- p1: {
- x: 122,
- y: 195
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 157,
- y: 118
- },
- p1: {
- x: 227,
- y: 306
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 342,
- y: 111
- },
- p1: {
- x: 342,
- y: 111
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 281,
- y: 125
- },
- p1: {
- x: 281,
- y: 125
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 219,
- y: 116
- },
- p1: {
- x: 219,
- y: 116
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 306,
- y: 218
- },
- p1: {
- x: 306,
- y: 218
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 96,
- y: 113
- },
- p1: {
- x: 96,
- y: 113
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 39,
- y: 109
- },
- p1: {
- x: 39,
- y: 109
- },
- subType: "normal"
- }], [{
- type: "line",
- p0: {
- x: 183,
- y: 16
- },
- p1: {
- x: 366,
- y: 96
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: -1,
- y: 69
- },
- p1: {
- x: 197,
- y: 43
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 272,
- y: 129
- },
- p1: {
- x: 272,
- y: 129
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 100,
- y: 132
- },
- p1: {
- x: 100,
- y: 132
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 189,
- y: 222
- },
- p1: {
- x: 189,
- y: 222
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 324,
- y: 273
- },
- p1: {
- x: 324,
- y: 273
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 280,
- y: 322
- },
- p1: {
- x: 280,
- y: 322
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 217,
- y: 346
- },
- p1: {
- x: 217,
- y: 346
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 156,
- y: 344
- },
- p1: {
- x: 156,
- y: 344
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 104,
- y: 320
- },
- p1: {
- x: 104,
- y: 320
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 60,
- y: 280
- },
- p1: {
- x: 60,
- y: 280
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 219,
- y: 314
- },
- p1: {
- x: 219,
- y: 314
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 172,
- y: 64
- },
- p1: {
- x: 172,
- y: 64
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 47,
- y: 134
- },
- p1: {
- x: 47,
- y: 134
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 186,
- y: 133
- },
- p1: {
- x: 186,
- y: 133
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 190,
- y: 231
- },
- p1: {
- x: 190,
- y: 231
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 161,
- y: 290
- },
- p1: {
- x: 161,
- y: 290
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 324,
- y: 134
- },
- p1: {
- x: 324,
- y: 134
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 250,
- y: 85
- },
- p1: {
- x: 250,
- y: 85
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 124,
- y: 109
- },
- p1: {
- x: 124,
- y: 109
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 48,
- y: 209
- },
- p1: {
- x: 48,
- y: 209
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 332,
- y: 214
- },
- p1: {
- x: 332,
- y: 214
- },
- subType: "ice"
- }, {
- type: "line",
- p0: {
- x: 305,
- y: 359
- },
- p1: {
- x: 248,
- y: 168
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: 71,
- y: 358
- },
- p1: {
- x: 135,
- y: 169
- },
- subType: "log"
- }], [{
- type: "bubble",
- p0: {
- x: 50,
- y: 260
- },
- p1: {
- x: 50,
- y: 260
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 337,
- y: 137
- },
- p1: {
- x: 236,
- y: 78
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 236,
- y: 153
- },
- p1: {
- x: 337,
- y: 211
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 180,
- y: 286
- },
- p1: {
- x: 180,
- y: 286
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 106,
- y: 326
- },
- p1: {
- x: 106,
- y: 326
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 264,
- y: 247
- },
- p1: {
- x: 264,
- y: 247
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 108,
- y: 183
- },
- p1: {
- x: 108,
- y: 183
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 33,
- y: 164
- },
- p1: {
- x: 33,
- y: 164
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 192,
- y: 209
- },
- p1: {
- x: 192,
- y: 209
- },
- subType: "ice"
- }, {
- type: "line",
- p0: {
- x: 215,
- y: 350
- },
- p1: {
- x: 404,
- y: 287
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: -56,
- y: 84
- },
- p1: {
- x: 139,
- y: 130
- },
- subType: "log"
- }], [{
- type: "bubble",
- p0: {
- x: 38,
- y: 96
- },
- p1: {
- x: 94,
- y: 96
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 213,
- y: 100
- },
- p1: {
- x: 353,
- y: 100
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 154,
- y: 98
- },
- p1: {
- x: 154,
- y: 98
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 33,
- y: 159
- },
- p1: {
- x: 351,
- y: 159
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 247,
- y: 224
- },
- p1: {
- x: 350,
- y: 224
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 38,
- y: 224
- },
- p1: {
- x: 126,
- y: 224
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 185,
- y: 224
- },
- p1: {
- x: 185,
- y: 224
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 33,
- y: 290
- },
- p1: {
- x: 351,
- y: 290
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 231,
- y: 359
- },
- p1: {
- x: 231,
- y: 359
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 291,
- y: 358
- },
- p1: {
- x: 347,
- y: 358
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 32,
- y: 357
- },
- p1: {
- x: 172,
- y: 357
- },
- subType: "jellyfish"
- }], [{
- type: "bubble",
- p0: {
- x: 301,
- y: 252
- },
- p1: {
- x: 301,
- y: 252
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 58,
- y: 324
- },
- p1: {
- x: 58,
- y: 324
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 55,
- y: 219
- },
- p1: {
- x: 200,
- y: 355
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 90,
- y: 72
- },
- p1: {
- x: 290,
- y: 72
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 244,
- y: 208
- },
- p1: {
- x: 244,
- y: 208
- },
- subType: "fire"
- }, {
- type: "line",
- p0: {
- x: 290,
- y: 167
- },
- p1: {
- x: 433,
- y: 26
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: 146,
- y: 206
- },
- p1: {
- x: 293,
- y: 342
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: -92,
- y: -12
- },
- p1: {
- x: 54,
- y: 124
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 98,
- y: 166
- },
- p1: {
- x: 98,
- y: 166
- },
- subType: "ice"
- }], [{
- type: "bubble",
- p0: {
- x: 187,
- y: 312
- },
- p1: {
- x: 187,
- y: 312
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 185,
- y: 381
- },
- p1: {
- x: 185,
- y: 381
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 252,
- y: 376
- },
- p1: {
- x: 252,
- y: 376
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 123,
- y: 374
- },
- p1: {
- x: 123,
- y: 374
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 31,
- y: 297
- },
- p1: {
- x: 31,
- y: 297
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 34,
- y: 179
- },
- p1: {
- x: 34,
- y: 179
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 343,
- y: 177
- },
- p1: {
- x: 343,
- y: 177
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 346,
- y: 299
- },
- p1: {
- x: 346,
- y: 299
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 189,
- y: 160
- },
- p1: {
- x: 189,
- y: 160
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 254,
- y: 95
- },
- p1: {
- x: 254,
- y: 95
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 189,
- y: 97
- },
- p1: {
- x: 189,
- y: 97
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 124,
- y: 96
- },
- p1: {
- x: 124,
- y: 96
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 30,
- y: 238
- },
- p1: {
- x: 348,
- y: 238
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 326,
- y: 359
- },
- p1: {
- x: 50,
- y: 117
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 51,
- y: 359
- },
- p1: {
- x: 326,
- y: 117
- },
- subType: "jellyfish"
- }], [{
- type: "bubble",
- p0: {
- x: 283,
- y: 352
- },
- p1: {
- x: 283,
- y: 352
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 159,
- y: 349
- },
- p1: {
- x: 159,
- y: 349
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 34,
- y: 346
- },
- p1: {
- x: 34,
- y: 346
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 347,
- y: 277
- },
- p1: {
- x: 347,
- y: 277
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 224,
- y: 282
- },
- p1: {
- x: 224,
- y: 282
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 348,
- y: 352
- },
- p1: {
- x: 348,
- y: 352
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 281,
- y: 276
- },
- p1: {
- x: 281,
- y: 276
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 216,
- y: 352
- },
- p1: {
- x: 216,
- y: 352
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 163,
- y: 280
- },
- p1: {
- x: 163,
- y: 280
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 95,
- y: 346
- },
- p1: {
- x: 95,
- y: 346
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 101,
- y: 277
- },
- p1: {
- x: 101,
- y: 277
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 39,
- y: 275
- },
- p1: {
- x: 39,
- y: 275
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 283,
- y: 215
- },
- p1: {
- x: 283,
- y: 215
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 159,
- y: 212
- },
- p1: {
- x: 159,
- y: 212
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 34,
- y: 209
- },
- p1: {
- x: 34,
- y: 209
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 347,
- y: 140
- },
- p1: {
- x: 347,
- y: 140
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 224,
- y: 145
- },
- p1: {
- x: 224,
- y: 145
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 348,
- y: 215
- },
- p1: {
- x: 348,
- y: 215
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 281,
- y: 139
- },
- p1: {
- x: 281,
- y: 139
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 216,
- y: 215
- },
- p1: {
- x: 216,
- y: 215
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 163,
- y: 143
- },
- p1: {
- x: 163,
- y: 143
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 95,
- y: 209
- },
- p1: {
- x: 95,
- y: 209
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 101,
- y: 140
- },
- p1: {
- x: 101,
- y: 140
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 39,
- y: 138
- },
- p1: {
- x: 39,
- y: 138
- },
- subType: "ice"
- }], [{
- type: "bubble",
- p0: {
- x: 184,
- y: 242
- },
- p1: {
- x: 184,
- y: 242
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 166,
- y: 309
- },
- p1: {
- x: 198,
- y: 309
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 169,
- y: 180
- },
- p1: {
- x: 201,
- y: 180
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 113,
- y: 358
- },
- p1: {
- x: 113,
- y: 358
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 61,
- y: 306
- },
- p1: {
- x: 61,
- y: 306
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 257,
- y: 360
- },
- p1: {
- x: 257,
- y: 360
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 320,
- y: 311
- },
- p1: {
- x: 320,
- y: 311
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 311,
- y: 175
- },
- p1: {
- x: 311,
- y: 175
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 252,
- y: 128
- },
- p1: {
- x: 252,
- y: 128
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 122,
- y: 127
- },
- p1: {
- x: 122,
- y: 127
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 69,
- y: 169
- },
- p1: {
- x: 69,
- y: 169
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 41,
- y: 234
- },
- p1: {
- x: 41,
- y: 234
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 183,
- y: 379
- },
- p1: {
- x: 183,
- y: 379
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 344,
- y: 240
- },
- p1: {
- x: 344,
- y: 240
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 188,
- y: 111
- },
- p1: {
- x: 188,
- y: 111
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 131,
- y: 381
- },
- p1: {
- x: 131,
- y: 381
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 38,
- y: 289
- },
- p1: {
- x: 38,
- y: 289
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 37,
- y: 161
- },
- p1: {
- x: 37,
- y: 161
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 132,
- y: 76
- },
- p1: {
- x: 132,
- y: 76
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 256,
- y: 381
- },
- p1: {
- x: 256,
- y: 381
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 349,
- y: 289
- },
- p1: {
- x: 349,
- y: 289
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 350,
- y: 161
- },
- p1: {
- x: 350,
- y: 161
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 255,
- y: 76
- },
- p1: {
- x: 255,
- y: 76
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 130,
- y: 277
- },
- p1: {
- x: 53,
- y: 381
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 131,
- y: 220
- },
- p1: {
- x: 36,
- y: 222
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 131,
- y: 164
- },
- p1: {
- x: 47,
- y: 82
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 257,
- y: 277
- },
- p1: {
- x: 335,
- y: 381
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 257,
- y: 220
- },
- p1: {
- x: 351,
- y: 222
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 256,
- y: 164
- },
- p1: {
- x: 341,
- y: 82
- },
- subType: "normal"
- }, {
- type: "line",
- p0: {
- x: 195,
- y: 179
- },
- p1: {
- x: 195,
- y: 379
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: 195,
- y: -75
- },
- p1: {
- x: 195,
- y: 125
- },
- subType: "log"
- }], [{
- type: "bubble",
- p0: {
- x: 158,
- y: 107
- },
- p1: {
- x: 346,
- y: 107
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 32,
- y: 275
- },
- p1: {
- x: 220,
- y: 275
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 171,
- y: 367
- },
- p1: {
- x: 171,
- y: 367
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 74,
- y: 86
- },
- p1: {
- x: 74,
- y: 86
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 231,
- y: 356
- },
- p1: {
- x: 231,
- y: 356
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 276,
- y: 312
- },
- p1: {
- x: 276,
- y: 312
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 287,
- y: 253
- },
- p1: {
- x: 287,
- y: 253
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 253,
- y: 203
- },
- p1: {
- x: 253,
- y: 203
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 199,
- y: 179
- },
- p1: {
- x: 199,
- y: 179
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 138,
- y: 174
- },
- p1: {
- x: 138,
- y: 174
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 87,
- y: 142
- },
- p1: {
- x: 87,
- y: 142
- },
- subType: "normal"
- }], [{
- type: "bubble",
- p0: {
- x: 293,
- y: 89
- },
- p1: {
- x: 293,
- y: 89
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 169,
- y: 272
- },
- p1: {
- x: 169,
- y: 272
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 198,
- y: 94
- },
- p1: {
- x: 198,
- y: 94
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 97,
- y: 299
- },
- p1: {
- x: 97,
- y: 299
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 296,
- y: 202
- },
- p1: {
- x: 296,
- y: 202
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 264,
- y: 350
- },
- p1: {
- x: 264,
- y: 350
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 188,
- y: 183
- },
- p1: {
- x: 188,
- y: 183
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 158,
- y: 356
- },
- p1: {
- x: 158,
- y: 356
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 255,
- y: 140
- },
- p1: {
- x: 255,
- y: 140
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 116,
- y: 217
- },
- p1: {
- x: 116,
- y: 217
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 243,
- y: 263
- },
- p1: {
- x: 243,
- y: 263
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 118,
- y: 120
- },
- p1: {
- x: 118,
- y: 120
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 28,
- y: 301
- },
- p1: {
- x: -70,
- y: 301
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 26,
- y: 179
- },
- p1: {
- x: -72,
- y: 179
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: -74,
- y: 362
- },
- p1: {
- x: 24,
- y: 362
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: -73,
- y: 241
- },
- p1: {
- x: 25,
- y: 241
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: -72,
- y: 116
- },
- p1: {
- x: 26,
- y: 116
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 460,
- y: 301
- },
- p1: {
- x: 362,
- y: 301
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 458,
- y: 179
- },
- p1: {
- x: 360,
- y: 179
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 358,
- y: 362
- },
- p1: {
- x: 456,
- y: 362
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 359,
- y: 241
- },
- p1: {
- x: 457,
- y: 241
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 360,
- y: 116
- },
- p1: {
- x: 458,
- y: 116
- },
- subType: "jellyfish"
- }], [{
- type: "line",
- p0: {
- x: 297,
- y: 326
- },
- p1: {
- x: 355,
- y: 134
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 55,
- y: 244
- },
- p1: {
- x: 220,
- y: 178
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 220,
- y: 104
- },
- p1: {
- x: 220,
- y: 104
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 140,
- y: 134
- },
- p1: {
- x: 140,
- y: 134
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 221,
- y: 254
- },
- p1: {
- x: 221,
- y: 254
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 141,
- y: 281
- },
- p1: {
- x: 141,
- y: 281
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 61,
- y: 314
- },
- p1: {
- x: 61,
- y: 314
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 60,
- y: 164
- },
- p1: {
- x: 60,
- y: 164
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 163,
- y: 369
- },
- p1: {
- x: 163,
- y: 369
- },
- subType: "fire"
- }], [{
- type: "bubble",
- p0: {
- x: 349,
- y: 351
- },
- p1: {
- x: 345,
- y: 201
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 188,
- y: 216
- },
- p1: {
- x: 188,
- y: 216
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 326,
- y: 117
- },
- p1: {
- x: 326,
- y: 117
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 43,
- y: 355
- },
- p1: {
- x: 43,
- y: 355
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 225,
- y: 323
- },
- p1: {
- x: 225,
- y: 323
- },
- subType: "ice"
- }, {
- type: "line",
- p0: {
- x: 290,
- y: 338
- },
- p1: {
- x: 259,
- y: 140
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: -61,
- y: 139
- },
- p1: {
- x: 66,
- y: 293
- },
- subType: "log"
- }], [{
- type: "bubble",
- p0: {
- x: 308,
- y: 150
- },
- p1: {
- x: 354,
- y: 130
- },
- subType: "normal"
- }, {
- type: "line",
- p0: {
- x: 256,
- y: 229
- },
- p1: {
- x: 440,
- y: 151
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 278,
- y: 380
- },
- p1: {
- x: 278,
- y: 380
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 211,
- y: 279
- },
- p1: {
- x: 211,
- y: 279
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 152,
- y: 192
- },
- p1: {
- x: 152,
- y: 192
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 78,
- y: 107
- },
- p1: {
- x: 78,
- y: 408
- },
- subType: "normal"
- }], [{
- type: "line",
- p0: {
- x: -156,
- y: 121
- },
- p1: {
- x: 35,
- y: 179
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 102,
- y: 173
- },
- p1: {
- x: 302,
- y: 179
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 315,
- y: 335
- },
- p1: {
- x: 315,
- y: 335
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 51,
- y: 352
- },
- p1: {
- x: 51,
- y: 352
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 347,
- y: 99
- },
- p1: {
- x: 347,
- y: 99
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 189,
- y: 394
- },
- p1: {
- x: 189,
- y: 394
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 344,
- y: 228
- },
- p1: {
- x: 344,
- y: 228
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 142,
- y: 115
- },
- p1: {
- x: 142,
- y: 115
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 58,
- y: 245
- },
- p1: {
- x: 58,
- y: 245
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 127,
- y: 276
- },
- p1: {
- x: 127,
- y: 276
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 227,
- y: 305
- },
- p1: {
- x: 227,
- y: 305
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 197,
- y: 235
- },
- p1: {
- x: 197,
- y: 235
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 85,
- y: 85
- },
- p1: {
- x: 85,
- y: 85
- },
- subType: "ice"
- }], [{
- type: "bubble",
- p0: {
- x: 39,
- y: 182
- },
- p1: {
- x: 144,
- y: 234
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 276,
- y: 154
- },
- p1: {
- x: 276,
- y: 154
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 146,
- y: 379
- },
- p1: {
- x: 146,
- y: 379
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 137,
- y: 91
- },
- p1: {
- x: 137,
- y: 91
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 338,
- y: 326
- },
- p1: {
- x: 338,
- y: 326
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 338,
- y: 91
- },
- p1: {
- x: 210,
- y: 94
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 352,
- y: 263
- },
- p1: {
- x: 49,
- y: 122
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 337,
- y: 197
- },
- p1: {
- x: 43,
- y: 358
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 269,
- y: 359
- },
- p1: {
- x: 41,
- y: 254
- },
- subType: "jellyfish"
- }], [{
- type: "line",
- p0: {
- x: 384,
- y: -151
- },
- p1: {
- x: 217,
- y: -42
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: 403,
- y: 30
- },
- p1: {
- x: 216,
- y: -43
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 33,
- y: 315
- },
- p1: {
- x: 35,
- y: -44
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 150,
- y: 276
- },
- p1: {
- x: 151,
- y: 372
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 221,
- y: 205
- },
- p1: {
- x: 221,
- y: 205
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 227,
- y: 337
- },
- p1: {
- x: 227,
- y: 337
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 32,
- y: 375
- },
- p1: {
- x: 32,
- y: 375
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 326,
- y: 81
- },
- p1: {
- x: 326,
- y: 81
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 356,
- y: 148
- },
- p1: {
- x: 356,
- y: 148
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 344,
- y: 229
- },
- p1: {
- x: 344,
- y: 229
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 353,
- y: 305
- },
- p1: {
- x: 353,
- y: 305
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 327,
- y: 374
- },
- p1: {
- x: 327,
- y: 374
- },
- subType: "fire"
- }, {
- type: "line",
- p0: {
- x: 286,
- y: 127
- },
- p1: {
- x: 91,
- y: 172
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: 287,
- y: 133
- },
- p1: {
- x: 287,
- y: 333
- },
- subType: "log"
- }, {
- type: "line",
- p0: {
- x: 89,
- y: 173
- },
- p1: {
- x: 89,
- y: 373
- },
- subType: "log"
- }], [{
- type: "bubble",
- p0: {
- x: 183,
- y: 108
- },
- p1: {
- x: 183,
- y: 108
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 37,
- y: 205
- },
- p1: {
- x: 37,
- y: 205
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 346,
- y: 221
- },
- p1: {
- x: 346,
- y: 221
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 238,
- y: 140
- },
- p1: {
- x: 238,
- y: 140
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 128,
- y: 136
- },
- p1: {
- x: 128,
- y: 136
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 61,
- y: 372
- },
- p1: {
- x: 61,
- y: 372
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 323,
- y: 374
- },
- p1: {
- x: 323,
- y: 374
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 143,
- y: 197
- },
- p1: {
- x: 219,
- y: 369
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 338,
- y: 294
- },
- p1: {
- x: 35,
- y: 273
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 159,
- y: 351
- },
- p1: {
- x: 197,
- y: 228
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 285,
- y: 237
- },
- p1: {
- x: 106,
- y: 326
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 93,
- y: 239
- },
- p1: {
- x: 271,
- y: 329
- },
- subType: "jellyfish"
- }], [{
- type: "bubble",
- p0: {
- x: 191,
- y: 359
- },
- p1: {
- x: 191,
- y: 359
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 130,
- y: 310
- },
- p1: {
- x: 130,
- y: 310
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 311,
- y: 79
- },
- p1: {
- x: 281,
- y: 132
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 60,
- y: 119
- },
- p1: {
- x: 38,
- y: 317
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 207,
- y: 97
- },
- p1: {
- x: 207,
- y: 97
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 335,
- y: 340
- },
- p1: {
- x: 335,
- y: 340
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 178,
- y: 160
- },
- p1: {
- x: 349,
- y: 264
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 119,
- y: 120
- },
- p1: {
- x: 119,
- y: 120
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 336,
- y: 187
- },
- p1: {
- x: 336,
- y: 187
- },
- subType: "fire"
- }, {
- type: "line",
- p0: {
- x: 115,
- y: 192
- },
- p1: {
- x: 281,
- y: 304
- },
- subType: "log"
- }], [{
- type: "bubble",
- p0: {
- x: 214,
- y: 141
- },
- p1: {
- x: 214,
- y: 141
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 131,
- y: 157
- },
- p1: {
- x: 131,
- y: 157
- },
- subType: "fire"
- }, {
- type: "line",
- p0: {
- x: -87,
- y: 185
- },
- p1: {
- x: 72,
- y: 307
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 264,
- y: 307
- },
- p1: {
- x: 264,
- y: 307
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 183,
- y: 225
- },
- p1: {
- x: 183,
- y: 225
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 60,
- y: 109
- },
- p1: {
- x: 60,
- y: 109
- },
- subType: "fire"
- }, {
- type: "bubble",
- p0: {
- x: 346,
- y: 115
- },
- p1: {
- x: 346,
- y: 397
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 145,
- y: 288
- },
- p1: {
- x: 145,
- y: 288
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 35,
- y: 166
- },
- p1: {
- x: 35,
- y: 166
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 97,
- y: 215
- },
- p1: {
- x: 97,
- y: 215
- },
- subType: "ice"
- }], [{
- type: "bubble",
- p0: {
- x: 325,
- y: 194
- },
- p1: {
- x: 336,
- y: -2
- },
- subType: "jellyfish"
- }, {
- type: "bubble",
- p0: {
- x: 125,
- y: 244
- },
- p1: {
- x: 125,
- y: 244
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 139,
- y: 88
- },
- p1: {
- x: 139,
- y: 88
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 51,
- y: 136
- },
- p1: {
- x: 51,
- y: 136
- },
- subType: "normal"
- }, {
- type: "line",
- p0: {
- x: 227,
- y: 90
- },
- p1: {
- x: 266,
- y: -106
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 346,
- y: 350
- },
- p1: {
- x: 346,
- y: 350
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 229,
- y: 352
- },
- p1: {
- x: 229,
- y: 352
- },
- subType: "normal"
- }, {
- type: "bubble",
- p0: {
- x: 50,
- y: 304
- },
- p1: {
- x: 50,
- y: 304
- },
- subType: "normal"
- }, {
- type: "line",
- p0: {
- x: 158,
- y: 418
- },
- p1: {
- x: 197,
- y: 222
- },
- subType: "log"
- }, {
- type: "bubble",
- p0: {
- x: 288,
- y: 324
- },
- p1: {
- x: 288,
- y: 324
- },
- subType: "ice"
- }, {
- type: "bubble",
- p0: {
- x: 201,
- y: 152
- },
- p1: {
- x: 201,
- y: 152
- },
- subType: "fire"
- }]),
- aLevelStore = new Array;
- aLevelStore.push(0), aLevelStore.push(0);
- for (var i = 0; 35 > i; i++) aLevelStore.push(1), aLevelStore.push(0);
- if ("undefined" != typeof Storage)
- if (null != localStorage.getItem("bubblefishBuddiesData")) {
- aLevelStore = localStorage.getItem("bubblefishBuddiesData").split(",");
- for (var a in aLevelStore) aLevelStore[a] = parseInt(aLevelStore[a])
- } else saveData()
|