game.min.js 122 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630
  1. function Config() {}
  2. function startup() {
  3. game = new Phaser.Game(Config.WIDTH, Config.HEIGHT, Phaser.CANVAS, "gameArea"), game.state.add("Boot", App.BootState), game.state.add("Preloader", App.PreloaderState), game.state.add("MainMenu", App.MainMenuState), game.state.add("LevelSelect", App.LevelSelectState), game.state.add("Gameplay", App.GameplayState), game.state.add("GameComplete", App.GameCompleteState), game.state.start("Boot")
  4. }
  5. App.Commands = Class.extend({
  6. init: function() {},
  7. gameStart: function() {
  8. SG_Hooks.start(), Config.TEST_GAME_COMPLETE ? cmd.gameComplete() : cookies.isNewGame ? cmd.levelStart(Config.START_LEVEL) : game.state.start("LevelSelect")
  9. },
  10. levelStart: function(a) {
  11. data.curLevel = data.levels[a], data.levelStartTime = game.time.now, data.pauseTime = 0, game.state.start("Gameplay")
  12. },
  13. levelComplete: function() {
  14. SG_Hooks.levelUp(data.curLevel.id + 1, 1000), game.state.getCurrentState().levelComplete(), data.curLevel.complete(), cookies.levelComplete(), stateSlider.levelComplete();
  15. },
  16. gameComplete: function() {
  17. SG_Hooks.gameOver(data.curLevel.id + 1, 1000); fader.fade(this.doGameComplete, this);
  18. },
  19. doGameComplete: function() {
  20. game.state.start("GameComplete")
  21. }
  22. }), Config.VERSION = "0.99", Config.WIDTH = 640, Config.HEIGHT = 712, Config.FONT_LEVEL_SELECT_ID = "Arial", Config.FONT_GAMEPLAY_LEVEL_ID = "Titan One", Config.TOUCH_BOUNDS = {
  23. x: 0,
  24. y: 100,
  25. width: Config.WIDTH,
  26. height: Config.HEIGHT - 100
  27. }, Config.BITMAP_LINES = !0, Config.USE_PARTICLES = !0, Config.ANIMATION = !0, Config.SOUNDS_ENABLED = !1, Config.TRANSPARENT = !1, Config.START_LEVEL = 0, Config.TEST_GAME_COMPLETE = !1, Config.SHOW_FPS = !0, Config.OPEN_ALL_LEVELS = !0, Config.DEBUG_PHYSICS = !1, Config.ENABLE_CHEAT = !0, Config.RELEASE = !0, Config.RELEASE && (Config.ANIMATION = !0, Config.SOUNDS_ENABLED = !0, Config.TRANSPARENT = !1, Config.START_LEVEL = 0, Config.TEST_GAME_COMPLETE = !1, Config.SHOW_FPS = !1, Config.OPEN_ALL_LEVELS = !1, Config.DEBUG_PHYSICS = !1, Config.ENABLE_CHEAT = !1), App.Cookies = Class.extend({
  28. init: function() {
  29. this.gameStorageKey = "doodleconnect", this.initSound(), this.isNewGame = !0, this.initLevels()
  30. },
  31. isSupported: function() {
  32. var a = "test",
  33. b = window.sessionStorage;
  34. try {
  35. return b.setItem(a, "1"), b.removeItem(a), !0
  36. } catch (c) {
  37. return !1
  38. }
  39. },
  40. getStorage: function(a) {
  41. return localStorage[this.gameStorageKey + "." + a]
  42. },
  43. setStorage: function(a, b) {
  44. this.isSupported() && (localStorage[this.gameStorageKey + "." + a] = b)
  45. },
  46. initSound: function() {
  47. Config.SOUNDS_ENABLED = "false" == this.getStorage("soundEnabled") ? !1 : !0
  48. },
  49. saveSound: function() {
  50. this.setStorage("soundEnabled", Config.SOUNDS_ENABLED)
  51. },
  52. initLevels: function() {
  53. if (void 0 != this.getStorage("levels"))
  54. for (var a = 0; a < data.levels.length; a++) {
  55. var b = data.levels[a];
  56. "true" == this.getStorage("levels." + a + ".isCompleted") && (b.isOpen = !0, b.isCompleted = !0, this.isNewGame = !1)
  57. }
  58. this.updateOpenLevels()
  59. },
  60. updateOpenLevels: function() {
  61. var a, b;
  62. if (Config.OPEN_ALL_LEVELS)
  63. for (a = 0; a < data.levels.length; a++) b = data.levels[a], b.isOpen = !0;
  64. else
  65. for (a = 0; a < data.levels.length; a++)
  66. if (b = data.levels[a], !b.isCompleted) {
  67. b.isOpen = !0;
  68. break
  69. }
  70. },
  71. levelComplete: function() {
  72. this.setStorage("levels", "true");
  73. var a = data.curLevel.id;
  74. this.setStorage("levels." + a + ".isCompleted", "true"), this.isNewGame = !1, this.updateOpenLevels()
  75. },
  76. clear: function() {
  77. localStorage.clear(), this.isNewGame = !0, this.uncompleteLevels(), this.updateOpenLevels()
  78. },
  79. uncompleteLevels: function() {
  80. for (var a = 0; a < data.levels.length; a++) {
  81. var b = data.levels[a];
  82. b.reset()
  83. }
  84. }
  85. }), App.Data = Class.extend({
  86. init: function(a) {
  87. this.lang = a, this.texts = JSON.parse(game.cache.getText("textData")), this.curLevel = null, this.levelStartTime = 0, this.levelStartTime = 0, this.pauseTime = 0, this.pausedByUser = !1, this.initLevels(), this.sndPiano = game.add.audio("sndPiano");
  88. for (var b = 0; 24 > b; b++) this.sndPiano.addMarker("note" + b, b, 1);
  89. this.atlasName = "pics"
  90. },
  91. getAtlasKey: function(a) {
  92. return this.atlasName + "/" + a + "_0000"
  93. },
  94. addAtlasSprite: function(a, b) {
  95. var c = 0,
  96. d = 0,
  97. e = game.world;
  98. return b && (void 0 != b.x && (c = b.x), void 0 != b.y && (d = b.y), void 0 != b.parent && (e = b.parent)), game.add.sprite(c, d, this.atlasName, this.getAtlasKey(a), e)
  99. },
  100. initLevels: function() {
  101. this.levels = [], this.addLevel({
  102. name: "P1",
  103. items: [{
  104. id: 0,
  105. x: 160,
  106. y: 240
  107. }, {
  108. id: 1,
  109. x: 480,
  110. y: 240
  111. }, {
  112. id: 2,
  113. x: 160,
  114. y: 560
  115. }, {
  116. id: 3,
  117. x: 480,
  118. y: 560
  119. }],
  120. links: [{
  121. p1: 3,
  122. p2: 2
  123. }, {
  124. p1: 1,
  125. p2: 3
  126. }, {
  127. p1: 0,
  128. p2: 1
  129. }, {
  130. p1: 2,
  131. p2: 0
  132. }],
  133. decor: {
  134. name: "pic1",
  135. x: 239,
  136. y: 333
  137. }
  138. }), this.addLevel({
  139. name: "Star",
  140. items: [{
  141. id: 0,
  142. x: 80,
  143. y: 320
  144. }, {
  145. id: 1,
  146. x: 323,
  147. y: 161
  148. }, {
  149. id: 2,
  150. x: 160,
  151. y: 600
  152. }, {
  153. id: 3,
  154. x: 480,
  155. y: 600
  156. }, {
  157. id: 4,
  158. x: 560,
  159. y: 320
  160. }],
  161. links: [{
  162. p1: 3,
  163. p2: 0
  164. }, {
  165. p1: 1,
  166. p2: 3
  167. }, {
  168. p1: 2,
  169. p2: 1
  170. }, {
  171. p1: 4,
  172. p2: 2
  173. }, {
  174. p1: 0,
  175. p2: 4
  176. }],
  177. decor: {
  178. name: "pic2",
  179. x: 117,
  180. y: 153
  181. }
  182. }), this.addLevel({
  183. name: "Three Rombs",
  184. items: [{
  185. id: 0,
  186. x: 80,
  187. y: 389
  188. }, {
  189. id: 1,
  190. x: 320,
  191. y: 629
  192. }, {
  193. id: 2,
  194. x: 560,
  195. y: 389
  196. }, {
  197. id: 3,
  198. x: 480,
  199. y: 389
  200. }, {
  201. id: 4,
  202. x: 320,
  203. y: 549
  204. }, {
  205. id: 5,
  206. x: 160,
  207. y: 389
  208. }, {
  209. id: 6,
  210. x: 320,
  211. y: 149
  212. }, {
  213. id: 7,
  214. x: 320,
  215. y: 229
  216. }, {
  217. id: 8,
  218. x: 320,
  219. y: 469
  220. }, {
  221. id: 9,
  222. x: 400,
  223. y: 389
  224. }, {
  225. id: 10,
  226. x: 240,
  227. y: 389
  228. }, {
  229. id: 11,
  230. x: 320,
  231. y: 309
  232. }],
  233. links: [{
  234. p1: 2,
  235. p2: 6
  236. }, {
  237. p1: 1,
  238. p2: 2
  239. }, {
  240. p1: 0,
  241. p2: 1
  242. }, {
  243. p1: 6,
  244. p2: 0
  245. }, {
  246. p1: 7,
  247. p2: 6
  248. }, {
  249. p1: 3,
  250. p2: 7
  251. }, {
  252. p1: 4,
  253. p2: 3
  254. }, {
  255. p1: 5,
  256. p2: 4
  257. }, {
  258. p1: 7,
  259. p2: 5
  260. }, {
  261. p1: 11,
  262. p2: 7
  263. }, {
  264. p1: 9,
  265. p2: 11
  266. }, {
  267. p1: 8,
  268. p2: 9
  269. }, {
  270. p1: 10,
  271. p2: 8
  272. }, {
  273. p1: 11,
  274. p2: 10
  275. }],
  276. decor: {
  277. name: "pic3",
  278. x: 97,
  279. y: 495
  280. }
  281. }), this.addLevel({
  282. name: "Possible Quad",
  283. items: [{
  284. id: 0,
  285. x: 320,
  286. y: 361
  287. }, {
  288. id: 1,
  289. x: 120,
  290. y: 160
  291. }, {
  292. id: 2,
  293. x: 120,
  294. y: 560
  295. }, {
  296. id: 3,
  297. x: 520,
  298. y: 560
  299. }, {
  300. id: 4,
  301. x: 520,
  302. y: 160
  303. }],
  304. links: [{
  305. p1: 1,
  306. p2: 4
  307. }, {
  308. p1: 0,
  309. p2: 3
  310. }, {
  311. p1: 0,
  312. p2: 2
  313. }, {
  314. p1: 2,
  315. p2: 1
  316. }, {
  317. p1: 4,
  318. p2: 3
  319. }, {
  320. p1: 0,
  321. p2: 4
  322. }, {
  323. p1: 1,
  324. p2: 0
  325. }],
  326. decor: {
  327. name: "pic4",
  328. x: 191,
  329. y: 494
  330. }
  331. }), this.addLevel({
  332. name: "Resistor",
  333. items: [{
  334. id: 0,
  335. x: 440,
  336. y: 332
  337. }, {
  338. id: 1,
  339. x: 200,
  340. y: 332
  341. }, {
  342. id: 2,
  343. x: 560,
  344. y: 332
  345. }, {
  346. id: 3,
  347. x: 80,
  348. y: 332
  349. }, {
  350. id: 4,
  351. x: 200,
  352. y: 172
  353. }, {
  354. id: 5,
  355. x: 440,
  356. y: 172
  357. }, {
  358. id: 6,
  359. x: 200,
  360. y: 492
  361. }, {
  362. id: 7,
  363. x: 440,
  364. y: 492
  365. }],
  366. links: [{
  367. p1: 0,
  368. p2: 2
  369. }, {
  370. p1: 1,
  371. p2: 0
  372. }, {
  373. p1: 1,
  374. p2: 3
  375. }, {
  376. p1: 1,
  377. p2: 4
  378. }, {
  379. p1: 6,
  380. p2: 1
  381. }, {
  382. p1: 7,
  383. p2: 6
  384. }, {
  385. p1: 0,
  386. p2: 7
  387. }, {
  388. p1: 5,
  389. p2: 0
  390. }, {
  391. p1: 4,
  392. p2: 5
  393. }],
  394. decor: {
  395. name: "pic5",
  396. x: 388,
  397. y: 518
  398. }
  399. }), this.addLevel({
  400. name: "Pyramid",
  401. items: [{
  402. id: 0,
  403. x: 560,
  404. y: 560
  405. }, {
  406. id: 1,
  407. x: 320,
  408. y: 560
  409. }, {
  410. id: 2,
  411. x: 80,
  412. y: 560
  413. }, {
  414. id: 3,
  415. x: 440,
  416. y: 400
  417. }, {
  418. id: 4,
  419. x: 320,
  420. y: 240
  421. }, {
  422. id: 5,
  423. x: 200,
  424. y: 400
  425. }],
  426. links: [{
  427. p1: 1,
  428. p2: 5
  429. }, {
  430. p1: 3,
  431. p2: 1
  432. }, {
  433. p1: 5,
  434. p2: 3
  435. }, {
  436. p1: 3,
  437. p2: 4
  438. }, {
  439. p1: 0,
  440. p2: 3
  441. }, {
  442. p1: 1,
  443. p2: 0
  444. }, {
  445. p1: 2,
  446. p2: 1
  447. }, {
  448. p1: 5,
  449. p2: 2
  450. }, {
  451. p1: 4,
  452. p2: 5
  453. }],
  454. decor: {
  455. name: "pic6",
  456. x: 424,
  457. y: 131
  458. }
  459. }), this.addLevel({
  460. name: "House",
  461. items: [{
  462. id: 0,
  463. x: 100,
  464. y: 350
  465. }, {
  466. id: 1,
  467. x: 300,
  468. y: 150
  469. }, {
  470. id: 2,
  471. x: 101,
  472. y: 601
  473. }, {
  474. id: 3,
  475. x: 548,
  476. y: 600
  477. }, {
  478. id: 4,
  479. x: 550,
  480. y: 350
  481. }],
  482. links: [{
  483. p1: 4,
  484. p2: 0
  485. }, {
  486. p1: 2,
  487. p2: 4
  488. }, {
  489. p1: 0,
  490. p2: 3
  491. }, {
  492. p1: 2,
  493. p2: 0
  494. }, {
  495. p1: 3,
  496. p2: 2
  497. }, {
  498. p1: 4,
  499. p2: 3
  500. }, {
  501. p1: 1,
  502. p2: 4
  503. }, {
  504. p1: 0,
  505. p2: 1
  506. }],
  507. decor: {
  508. name: "pic7",
  509. x: 198,
  510. y: 200
  511. }
  512. }), this.addLevel({
  513. name: "Triangle Down",
  514. items: [{
  515. id: 0,
  516. x: 387,
  517. y: 440
  518. }, {
  519. id: 1,
  520. x: 480,
  521. y: 200
  522. }, {
  523. id: 2,
  524. x: 160,
  525. y: 200
  526. }, {
  527. id: 3,
  528. x: 320,
  529. y: 560
  530. }, {
  531. id: 4,
  532. x: 253,
  533. y: 440
  534. }, {
  535. id: 5,
  536. x: 160,
  537. y: 320
  538. }, {
  539. id: 6,
  540. x: 480,
  541. y: 320
  542. }],
  543. links: [{
  544. p1: 0,
  545. p2: 6
  546. }, {
  547. p1: 3,
  548. p2: 0
  549. }, {
  550. p1: 4,
  551. p2: 3
  552. }, {
  553. p1: 5,
  554. p2: 4
  555. }, {
  556. p1: 0,
  557. p2: 4
  558. }, {
  559. p1: 6,
  560. p2: 5
  561. }, {
  562. p1: 2,
  563. p2: 6
  564. }, {
  565. p1: 1,
  566. p2: 5
  567. }, {
  568. p1: 1,
  569. p2: 6
  570. }, {
  571. p1: 2,
  572. p2: 5
  573. }],
  574. decor: {
  575. name: "pic8",
  576. x: 386,
  577. y: 494
  578. }
  579. }), this.addLevel({
  580. name: "Star2",
  581. items: [{
  582. id: 0,
  583. x: 560,
  584. y: 480
  585. }, {
  586. id: 1,
  587. x: 480,
  588. y: 200
  589. }, {
  590. id: 2,
  591. x: 160,
  592. y: 200
  593. }, {
  594. id: 3,
  595. x: 80,
  596. y: 480
  597. }, {
  598. id: 4,
  599. x: 320,
  600. y: 680
  601. }, {
  602. id: 5,
  603. x: 80,
  604. y: 320
  605. }, {
  606. id: 6,
  607. x: 323,
  608. y: 161
  609. }, {
  610. id: 7,
  611. x: 160,
  612. y: 600
  613. }, {
  614. id: 8,
  615. x: 480,
  616. y: 600
  617. }, {
  618. id: 9,
  619. x: 560,
  620. y: 320
  621. }],
  622. links: [{
  623. p1: 2,
  624. p2: 5
  625. }, {
  626. p1: 6,
  627. p2: 2
  628. }, {
  629. p1: 1,
  630. p2: 6
  631. }, {
  632. p1: 9,
  633. p2: 1
  634. }, {
  635. p1: 0,
  636. p2: 9
  637. }, {
  638. p1: 8,
  639. p2: 0
  640. }, {
  641. p1: 3,
  642. p2: 5
  643. }, {
  644. p1: 7,
  645. p2: 3
  646. }, {
  647. p1: 4,
  648. p2: 7
  649. }, {
  650. p1: 4,
  651. p2: 8
  652. }, {
  653. p1: 7,
  654. p2: 8
  655. }, {
  656. p1: 8,
  657. p2: 5
  658. }, {
  659. p1: 6,
  660. p2: 8
  661. }, {
  662. p1: 7,
  663. p2: 6
  664. }, {
  665. p1: 9,
  666. p2: 7
  667. }, {
  668. p1: 5,
  669. p2: 9
  670. }],
  671. decor: {
  672. name: "pic9",
  673. x: 265,
  674. y: 325
  675. }
  676. }), this.addLevel({
  677. name: "Rocket",
  678. items: [{
  679. id: 0,
  680. x: 107,
  681. y: 640
  682. }, {
  683. id: 1,
  684. x: 107,
  685. y: 200
  686. }, {
  687. id: 2,
  688. x: 107,
  689. y: 400
  690. }, {
  691. id: 3,
  692. x: 307,
  693. y: 400
  694. }, {
  695. id: 4,
  696. x: 427,
  697. y: 480
  698. }, {
  699. id: 5,
  700. x: 427,
  701. y: 320
  702. }, {
  703. id: 6,
  704. x: 547,
  705. y: 400
  706. }],
  707. links: [{
  708. p1: 1,
  709. p2: 5
  710. }, {
  711. p1: 3,
  712. p2: 2
  713. }, {
  714. p1: 2,
  715. p2: 1
  716. }, {
  717. p1: 0,
  718. p2: 2
  719. }, {
  720. p1: 4,
  721. p2: 0
  722. }, {
  723. p1: 3,
  724. p2: 4
  725. }, {
  726. p1: 5,
  727. p2: 3
  728. }, {
  729. p1: 4,
  730. p2: 6
  731. }, {
  732. p1: 5,
  733. p2: 4
  734. }, {
  735. p1: 6,
  736. p2: 5
  737. }],
  738. decor: {
  739. name: "pic10",
  740. x: 418,
  741. y: 499
  742. }
  743. }), this.addLevel({
  744. name: "P3",
  745. items: [{
  746. id: 0,
  747. x: 320,
  748. y: 360
  749. }, {
  750. id: 1,
  751. x: 560,
  752. y: 360
  753. }, {
  754. id: 2,
  755. x: 80,
  756. y: 360
  757. }, {
  758. id: 3,
  759. x: 440,
  760. y: 480
  761. }, {
  762. id: 4,
  763. x: 200,
  764. y: 480
  765. }, {
  766. id: 5,
  767. x: 440,
  768. y: 240
  769. }, {
  770. id: 6,
  771. x: 200,
  772. y: 240
  773. }],
  774. links: [{
  775. p1: 0,
  776. p2: 5
  777. }, {
  778. p1: 3,
  779. p2: 0
  780. }, {
  781. p1: 0,
  782. p2: 4
  783. }, {
  784. p1: 6,
  785. p2: 0
  786. }, {
  787. p1: 1,
  788. p2: 3
  789. }, {
  790. p1: 5,
  791. p2: 1
  792. }, {
  793. p1: 2,
  794. p2: 4
  795. }, {
  796. p1: 6,
  797. p2: 2
  798. }, {
  799. p1: 4,
  800. p2: 6
  801. }, {
  802. p1: 3,
  803. p2: 4
  804. }, {
  805. p1: 5,
  806. p2: 3
  807. }, {
  808. p1: 6,
  809. p2: 5
  810. }],
  811. decor: {
  812. name: "pic11",
  813. x: 78,
  814. y: 527
  815. }
  816. }), this.addLevel({
  817. name: "Romb",
  818. items: [{
  819. id: 0,
  820. x: 120,
  821. y: 560
  822. }, {
  823. id: 1,
  824. x: 520,
  825. y: 560
  826. }, {
  827. id: 2,
  828. x: 520,
  829. y: 160
  830. }, {
  831. id: 3,
  832. x: 120,
  833. y: 160
  834. }, {
  835. id: 4,
  836. x: 240,
  837. y: 440
  838. }, {
  839. id: 5,
  840. x: 400,
  841. y: 440
  842. }, {
  843. id: 6,
  844. x: 400,
  845. y: 280
  846. }, {
  847. id: 7,
  848. x: 240,
  849. y: 280
  850. }],
  851. links: [{
  852. p1: 5,
  853. p2: 7
  854. }, {
  855. p1: 5,
  856. p2: 1
  857. }, {
  858. p1: 2,
  859. p2: 3
  860. }, {
  861. p1: 1,
  862. p2: 2
  863. }, {
  864. p1: 0,
  865. p2: 1
  866. }, {
  867. p1: 3,
  868. p2: 0
  869. }, {
  870. p1: 7,
  871. p2: 3
  872. }, {
  873. p1: 5,
  874. p2: 4
  875. }, {
  876. p1: 6,
  877. p2: 5
  878. }, {
  879. p1: 7,
  880. p2: 6
  881. }, {
  882. p1: 4,
  883. p2: 7
  884. }],
  885. decor: {
  886. name: "pic12",
  887. x: 439,
  888. y: 573
  889. }
  890. }), this.addLevel({
  891. name: "P8",
  892. items: [{
  893. id: 0,
  894. x: 560,
  895. y: 400
  896. }, {
  897. id: 1,
  898. x: 320,
  899. y: 640
  900. }, {
  901. id: 2,
  902. x: 80,
  903. y: 400
  904. }, {
  905. id: 3,
  906. x: 320,
  907. y: 160
  908. }, {
  909. id: 4,
  910. x: 440,
  911. y: 400
  912. }, {
  913. id: 5,
  914. x: 320,
  915. y: 520
  916. }, {
  917. id: 6,
  918. x: 200,
  919. y: 400
  920. }, {
  921. id: 7,
  922. x: 320,
  923. y: 280
  924. }, {
  925. id: 8,
  926. x: 80,
  927. y: 160
  928. }, {
  929. id: 9,
  930. x: 80,
  931. y: 640
  932. }, {
  933. id: 10,
  934. x: 560,
  935. y: 640
  936. }, {
  937. id: 11,
  938. x: 560,
  939. y: 160
  940. }, {
  941. id: 12,
  942. x: 200,
  943. y: 280
  944. }, {
  945. id: 13,
  946. x: 440,
  947. y: 280
  948. }, {
  949. id: 14,
  950. x: 200,
  951. y: 520
  952. }, {
  953. id: 15,
  954. x: 440,
  955. y: 520
  956. }],
  957. links: [{
  958. p1: 5,
  959. p2: 6
  960. }, {
  961. p1: 4,
  962. p2: 5
  963. }, {
  964. p1: 7,
  965. p2: 4
  966. }, {
  967. p1: 6,
  968. p2: 7
  969. }, {
  970. p1: 14,
  971. p2: 2
  972. }, {
  973. p1: 1,
  974. p2: 14
  975. }, {
  976. p1: 15,
  977. p2: 1
  978. }, {
  979. p1: 0,
  980. p2: 15
  981. }, {
  982. p1: 13,
  983. p2: 0
  984. }, {
  985. p1: 3,
  986. p2: 13
  987. }, {
  988. p1: 12,
  989. p2: 3
  990. }, {
  991. p1: 2,
  992. p2: 12
  993. }, {
  994. p1: 3,
  995. p2: 8
  996. }, {
  997. p1: 11,
  998. p2: 3
  999. }, {
  1000. p1: 0,
  1001. p2: 11
  1002. }, {
  1003. p1: 10,
  1004. p2: 0
  1005. }, {
  1006. p1: 1,
  1007. p2: 10
  1008. }, {
  1009. p1: 9,
  1010. p2: 1
  1011. }, {
  1012. p1: 2,
  1013. p2: 9
  1014. }, {
  1015. p1: 8,
  1016. p2: 2
  1017. }, {
  1018. p1: 6,
  1019. p2: 12
  1020. }, {
  1021. p1: 14,
  1022. p2: 6
  1023. }, {
  1024. p1: 5,
  1025. p2: 14
  1026. }, {
  1027. p1: 15,
  1028. p2: 5
  1029. }, {
  1030. p1: 4,
  1031. p2: 15
  1032. }, {
  1033. p1: 13,
  1034. p2: 4
  1035. }, {
  1036. p1: 7,
  1037. p2: 13
  1038. }, {
  1039. p1: 12,
  1040. p2: 7
  1041. }],
  1042. decor: {
  1043. name: "pic13",
  1044. x: 272,
  1045. y: 315
  1046. }
  1047. }), this.addLevel({
  1048. name: "House3",
  1049. items: [{
  1050. id: 0,
  1051. x: 240,
  1052. y: 280
  1053. }, {
  1054. id: 1,
  1055. x: 400,
  1056. y: 280
  1057. }, {
  1058. id: 2,
  1059. x: 80,
  1060. y: 600
  1061. }, {
  1062. id: 3,
  1063. x: 80,
  1064. y: 400
  1065. }, {
  1066. id: 4,
  1067. x: 560,
  1068. y: 600
  1069. }, {
  1070. id: 5,
  1071. x: 560,
  1072. y: 400
  1073. }, {
  1074. id: 6,
  1075. x: 240,
  1076. y: 400
  1077. }, {
  1078. id: 7,
  1079. x: 400,
  1080. y: 400
  1081. }, {
  1082. id: 8,
  1083. x: 240,
  1084. y: 600
  1085. }, {
  1086. id: 9,
  1087. x: 400,
  1088. y: 600
  1089. }],
  1090. links: [{
  1091. p1: 1,
  1092. p2: 5
  1093. }, {
  1094. p1: 6,
  1095. p2: 1
  1096. }, {
  1097. p1: 0,
  1098. p2: 7
  1099. }, {
  1100. p1: 3,
  1101. p2: 0
  1102. }, {
  1103. p1: 8,
  1104. p2: 7
  1105. }, {
  1106. p1: 6,
  1107. p2: 9
  1108. }, {
  1109. p1: 5,
  1110. p2: 7
  1111. }, {
  1112. p1: 4,
  1113. p2: 5
  1114. }, {
  1115. p1: 9,
  1116. p2: 4
  1117. }, {
  1118. p1: 2,
  1119. p2: 8
  1120. }, {
  1121. p1: 3,
  1122. p2: 2
  1123. }, {
  1124. p1: 6,
  1125. p2: 3
  1126. }, {
  1127. p1: 8,
  1128. p2: 6
  1129. }, {
  1130. p1: 9,
  1131. p2: 8
  1132. }, {
  1133. p1: 7,
  1134. p2: 9
  1135. }],
  1136. decor: {
  1137. name: "pic14",
  1138. x: 428,
  1139. y: 109
  1140. }
  1141. }), this.addLevel({
  1142. name: "P6",
  1143. items: [{
  1144. id: 0,
  1145. x: 380,
  1146. y: 460
  1147. }, {
  1148. id: 1,
  1149. x: 260,
  1150. y: 460
  1151. }, {
  1152. id: 2,
  1153. x: 380,
  1154. y: 260
  1155. }, {
  1156. id: 3,
  1157. x: 260,
  1158. y: 260
  1159. }, {
  1160. id: 4,
  1161. x: 440,
  1162. y: 360
  1163. }, {
  1164. id: 5,
  1165. x: 320,
  1166. y: 560
  1167. }, {
  1168. id: 6,
  1169. x: 200,
  1170. y: 360
  1171. }, {
  1172. id: 7,
  1173. x: 320,
  1174. y: 160
  1175. }, {
  1176. id: 8,
  1177. x: 560,
  1178. y: 360
  1179. }, {
  1180. id: 9,
  1181. x: 440,
  1182. y: 160
  1183. }, {
  1184. id: 10,
  1185. x: 440,
  1186. y: 560
  1187. }, {
  1188. id: 11,
  1189. x: 80,
  1190. y: 360
  1191. }, {
  1192. id: 12,
  1193. x: 320,
  1194. y: 360
  1195. }, {
  1196. id: 13,
  1197. x: 200,
  1198. y: 160
  1199. }, {
  1200. id: 14,
  1201. x: 200,
  1202. y: 560
  1203. }],
  1204. links: [{
  1205. p1: 0,
  1206. p2: 10
  1207. }, {
  1208. p1: 12,
  1209. p2: 0
  1210. }, {
  1211. p1: 1,
  1212. p2: 14
  1213. }, {
  1214. p1: 12,
  1215. p2: 1
  1216. }, {
  1217. p1: 1,
  1218. p2: 6
  1219. }, {
  1220. p1: 5,
  1221. p2: 1
  1222. }, {
  1223. p1: 0,
  1224. p2: 5
  1225. }, {
  1226. p1: 4,
  1227. p2: 0
  1228. }, {
  1229. p1: 2,
  1230. p2: 4
  1231. }, {
  1232. p1: 7,
  1233. p2: 2
  1234. }, {
  1235. p1: 2,
  1236. p2: 9
  1237. }, {
  1238. p1: 12,
  1239. p2: 2
  1240. }, {
  1241. p1: 3,
  1242. p2: 7
  1243. }, {
  1244. p1: 6,
  1245. p2: 3
  1246. }, {
  1247. p1: 3,
  1248. p2: 13
  1249. }, {
  1250. p1: 12,
  1251. p2: 3
  1252. }, {
  1253. p1: 8,
  1254. p2: 10
  1255. }, {
  1256. p1: 9,
  1257. p2: 8
  1258. }, {
  1259. p1: 14,
  1260. p2: 11
  1261. }, {
  1262. p1: 11,
  1263. p2: 13
  1264. }],
  1265. decor: {
  1266. name: "pic15",
  1267. x: 374,
  1268. y: 553
  1269. }
  1270. }), this.addLevel({
  1271. name: "P14",
  1272. items: [{
  1273. id: 0,
  1274. x: 440,
  1275. y: 520
  1276. }, {
  1277. id: 1,
  1278. x: 200,
  1279. y: 520
  1280. }, {
  1281. id: 2,
  1282. x: 440,
  1283. y: 360
  1284. }, {
  1285. id: 3,
  1286. x: 200,
  1287. y: 360
  1288. }, {
  1289. id: 4,
  1290. x: 440,
  1291. y: 200
  1292. }, {
  1293. id: 5,
  1294. x: 440,
  1295. y: 680
  1296. }, {
  1297. id: 6,
  1298. x: 560,
  1299. y: 600
  1300. }, {
  1301. id: 7,
  1302. x: 560,
  1303. y: 440
  1304. }, {
  1305. id: 8,
  1306. x: 560,
  1307. y: 280
  1308. }, {
  1309. id: 9,
  1310. x: 320,
  1311. y: 440
  1312. }, {
  1313. id: 10,
  1314. x: 200,
  1315. y: 680
  1316. }, {
  1317. id: 11,
  1318. x: 320,
  1319. y: 600
  1320. }, {
  1321. id: 12,
  1322. x: 80,
  1323. y: 600
  1324. }, {
  1325. id: 13,
  1326. x: 80,
  1327. y: 440
  1328. }, {
  1329. id: 14,
  1330. x: 200,
  1331. y: 200
  1332. }, {
  1333. id: 15,
  1334. x: 320,
  1335. y: 280
  1336. }, {
  1337. id: 16,
  1338. x: 80,
  1339. y: 280
  1340. }],
  1341. links: [{
  1342. p1: 3,
  1343. p2: 15
  1344. }, {
  1345. p1: 13,
  1346. p2: 3
  1347. }, {
  1348. p1: 3,
  1349. p2: 16
  1350. }, {
  1351. p1: 9,
  1352. p2: 3
  1353. }, {
  1354. p1: 2,
  1355. p2: 8
  1356. }, {
  1357. p1: 9,
  1358. p2: 2
  1359. }, {
  1360. p1: 2,
  1361. p2: 15
  1362. }, {
  1363. p1: 7,
  1364. p2: 2
  1365. }, {
  1366. p1: 0,
  1367. p2: 7
  1368. }, {
  1369. p1: 11,
  1370. p2: 0
  1371. }, {
  1372. p1: 0,
  1373. p2: 6
  1374. }, {
  1375. p1: 9,
  1376. p2: 0
  1377. }, {
  1378. p1: 1,
  1379. p2: 9
  1380. }, {
  1381. p1: 12,
  1382. p2: 1
  1383. }, {
  1384. p1: 1,
  1385. p2: 13
  1386. }, {
  1387. p1: 11,
  1388. p2: 1
  1389. }, {
  1390. p1: 5,
  1391. p2: 6
  1392. }, {
  1393. p1: 11,
  1394. p2: 5
  1395. }, {
  1396. p1: 4,
  1397. p2: 8
  1398. }, {
  1399. p1: 15,
  1400. p2: 4
  1401. }, {
  1402. p1: 8,
  1403. p2: 15
  1404. }, {
  1405. p1: 7,
  1406. p2: 8
  1407. }, {
  1408. p1: 6,
  1409. p2: 7
  1410. }, {
  1411. p1: 11,
  1412. p2: 6
  1413. }, {
  1414. p1: 10,
  1415. p2: 11
  1416. }, {
  1417. p1: 12,
  1418. p2: 10
  1419. }, {
  1420. p1: 14,
  1421. p2: 15
  1422. }, {
  1423. p1: 16,
  1424. p2: 14
  1425. }, {
  1426. p1: 12,
  1427. p2: 13
  1428. }, {
  1429. p1: 11,
  1430. p2: 12
  1431. }, {
  1432. p1: 9,
  1433. p2: 11
  1434. }, {
  1435. p1: 16,
  1436. p2: 13
  1437. }, {
  1438. p1: 15,
  1439. p2: 16
  1440. }, {
  1441. p1: 9,
  1442. p2: 15
  1443. }],
  1444. decor: {
  1445. name: "pic16",
  1446. x: 246,
  1447. y: 108
  1448. }
  1449. }), this.addLevel({
  1450. name: "Arrow Quad",
  1451. items: [{
  1452. id: 0,
  1453. x: 480,
  1454. y: 560
  1455. }, {
  1456. id: 1,
  1457. x: 160,
  1458. y: 560
  1459. }, {
  1460. id: 2,
  1461. x: 480,
  1462. y: 280
  1463. }, {
  1464. id: 3,
  1465. x: 160,
  1466. y: 280
  1467. }],
  1468. links: [{
  1469. p1: 1,
  1470. p2: 3,
  1471. arrow: !0
  1472. }, {
  1473. p1: 0,
  1474. p2: 1,
  1475. arrow: !0
  1476. }, {
  1477. p1: 2,
  1478. p2: 0,
  1479. arrow: !0
  1480. }, {
  1481. p1: 3,
  1482. p2: 2,
  1483. arrow: !0
  1484. }],
  1485. decor: {
  1486. name: "pic17",
  1487. x: 256,
  1488. y: 301
  1489. }
  1490. }), this.addLevel({
  1491. name: "Spiral",
  1492. items: [{
  1493. id: 0,
  1494. x: 560,
  1495. y: 560
  1496. }, {
  1497. id: 1,
  1498. x: 240,
  1499. y: 320
  1500. }, {
  1501. id: 2,
  1502. x: 240,
  1503. y: 480
  1504. }, {
  1505. id: 3,
  1506. x: 480,
  1507. y: 480
  1508. }, {
  1509. id: 4,
  1510. x: 160,
  1511. y: 560
  1512. }, {
  1513. id: 5,
  1514. x: 480,
  1515. y: 240
  1516. }, {
  1517. id: 6,
  1518. x: 160,
  1519. y: 240
  1520. }, {
  1521. id: 7,
  1522. x: 80,
  1523. y: 160
  1524. }, {
  1525. id: 8,
  1526. x: 80,
  1527. y: 640
  1528. }, {
  1529. id: 9,
  1530. x: 560,
  1531. y: 640
  1532. }, {
  1533. id: 10,
  1534. x: 560,
  1535. y: 160
  1536. }],
  1537. links: [{
  1538. p1: 2,
  1539. p2: 1,
  1540. arrow: !0
  1541. }, {
  1542. p1: 10,
  1543. p2: 7,
  1544. arrow: !0
  1545. }, {
  1546. p1: 3,
  1547. p2: 2
  1548. }, {
  1549. p1: 5,
  1550. p2: 3
  1551. }, {
  1552. p1: 6,
  1553. p2: 5
  1554. }, {
  1555. p1: 0,
  1556. p2: 10
  1557. }, {
  1558. p1: 4,
  1559. p2: 6
  1560. }, {
  1561. p1: 0,
  1562. p2: 4
  1563. }, {
  1564. p1: 9,
  1565. p2: 0
  1566. }, {
  1567. p1: 8,
  1568. p2: 7
  1569. }, {
  1570. p1: 9,
  1571. p2: 8
  1572. }],
  1573. decor: {
  1574. name: "pic18",
  1575. x: 284,
  1576. y: 278
  1577. }
  1578. }), this.addLevel({
  1579. name: "Arrow Romb",
  1580. items: [{
  1581. id: 0,
  1582. x: 280,
  1583. y: 600
  1584. }, {
  1585. id: 1,
  1586. x: 360,
  1587. y: 200
  1588. }, {
  1589. id: 2,
  1590. x: 480,
  1591. y: 400
  1592. }, {
  1593. id: 3,
  1594. x: 160,
  1595. y: 400
  1596. }, {
  1597. id: 4,
  1598. x: 480,
  1599. y: 600
  1600. }, {
  1601. id: 5,
  1602. x: 160,
  1603. y: 600
  1604. }, {
  1605. id: 6,
  1606. x: 480,
  1607. y: 200
  1608. }, {
  1609. id: 7,
  1610. x: 160,
  1611. y: 200
  1612. }],
  1613. links: [{
  1614. p1: 2,
  1615. p2: 1,
  1616. arrow: !0
  1617. }, {
  1618. p1: 0,
  1619. p2: 3,
  1620. arrow: !0
  1621. }, {
  1622. p1: 2,
  1623. p2: 0
  1624. }, {
  1625. p1: 3,
  1626. p2: 1
  1627. }, {
  1628. p1: 3,
  1629. p2: 2
  1630. }, {
  1631. p1: 5,
  1632. p2: 3
  1633. }, {
  1634. p1: 0,
  1635. p2: 5
  1636. }, {
  1637. p1: 4,
  1638. p2: 0
  1639. }, {
  1640. p1: 2,
  1641. p2: 4
  1642. }, {
  1643. p1: 6,
  1644. p2: 2
  1645. }, {
  1646. p1: 1,
  1647. p2: 6
  1648. }, {
  1649. p1: 7,
  1650. p2: 1
  1651. }, {
  1652. p1: 3,
  1653. p2: 7
  1654. }],
  1655. decor: {
  1656. name: "pic19",
  1657. x: 196,
  1658. y: 399
  1659. }
  1660. }), this.addLevel({
  1661. name: "House2",
  1662. items: [{
  1663. id: 0,
  1664. x: 320,
  1665. y: 560
  1666. }, {
  1667. id: 1,
  1668. x: 320,
  1669. y: 360
  1670. }, {
  1671. id: 2,
  1672. x: 520,
  1673. y: 560
  1674. }, {
  1675. id: 3,
  1676. x: 120,
  1677. y: 560
  1678. }, {
  1679. id: 4,
  1680. x: 520,
  1681. y: 360
  1682. }, {
  1683. id: 5,
  1684. x: 120,
  1685. y: 360
  1686. }, {
  1687. id: 6,
  1688. x: 320,
  1689. y: 200
  1690. }],
  1691. links: [{
  1692. p1: 5,
  1693. p2: 6,
  1694. arrow: !0
  1695. }, {
  1696. p1: 4,
  1697. p2: 6,
  1698. arrow: !0
  1699. }, {
  1700. p1: 1,
  1701. p2: 4,
  1702. arrow: !0
  1703. }, {
  1704. p1: 1,
  1705. p2: 5,
  1706. arrow: !0
  1707. }, {
  1708. p1: 1,
  1709. p2: 0
  1710. }, {
  1711. p1: 0,
  1712. p2: 5
  1713. }, {
  1714. p1: 4,
  1715. p2: 0
  1716. }, {
  1717. p1: 2,
  1718. p2: 4
  1719. }, {
  1720. p1: 0,
  1721. p2: 2
  1722. }, {
  1723. p1: 3,
  1724. p2: 0
  1725. }, {
  1726. p1: 5,
  1727. p2: 3
  1728. }, {
  1729. p1: 6,
  1730. p2: 1
  1731. }],
  1732. decor: {
  1733. name: "pic20",
  1734. x: 409,
  1735. y: 132
  1736. }
  1737. }), this.addLevel({
  1738. name: "Jail",
  1739. items: [{
  1740. id: 0,
  1741. x: 320,
  1742. y: 160
  1743. }, {
  1744. id: 1,
  1745. x: 320,
  1746. y: 640
  1747. }, {
  1748. id: 2,
  1749. x: 320,
  1750. y: 560
  1751. }, {
  1752. id: 3,
  1753. x: 320,
  1754. y: 240
  1755. }, {
  1756. id: 4,
  1757. x: 440,
  1758. y: 400
  1759. }, {
  1760. id: 5,
  1761. x: 200,
  1762. y: 400
  1763. }, {
  1764. id: 6,
  1765. x: 520,
  1766. y: 560
  1767. }, {
  1768. id: 7,
  1769. x: 120,
  1770. y: 560
  1771. }, {
  1772. id: 8,
  1773. x: 520,
  1774. y: 240
  1775. }, {
  1776. id: 9,
  1777. x: 120,
  1778. y: 240
  1779. }],
  1780. links: [{
  1781. p1: 4,
  1782. p2: 2,
  1783. arrow: !0
  1784. }, {
  1785. p1: 3,
  1786. p2: 4,
  1787. arrow: !0
  1788. }, {
  1789. p1: 5,
  1790. p2: 3,
  1791. arrow: !0
  1792. }, {
  1793. p1: 2,
  1794. p2: 5,
  1795. arrow: !0
  1796. }, {
  1797. p1: 9,
  1798. p2: 7,
  1799. arrow: !0
  1800. }, {
  1801. p1: 6,
  1802. p2: 8,
  1803. arrow: !0
  1804. }, {
  1805. p1: 9,
  1806. p2: 6
  1807. }, {
  1808. p1: 7,
  1809. p2: 8
  1810. }, {
  1811. p1: 1,
  1812. p2: 6
  1813. }, {
  1814. p1: 7,
  1815. p2: 1
  1816. }, {
  1817. p1: 2,
  1818. p2: 6
  1819. }, {
  1820. p1: 7,
  1821. p2: 2
  1822. }, {
  1823. p1: 0,
  1824. p2: 9
  1825. }, {
  1826. p1: 8,
  1827. p2: 0
  1828. }, {
  1829. p1: 3,
  1830. p2: 8
  1831. }, {
  1832. p1: 9,
  1833. p2: 3
  1834. }],
  1835. decor: {
  1836. name: "pic21",
  1837. x: 423,
  1838. y: 566
  1839. }
  1840. }), this.addLevel({
  1841. name: "P4 copy",
  1842. items: [{
  1843. id: 0,
  1844. x: 560,
  1845. y: 600
  1846. }, {
  1847. id: 1,
  1848. x: 400,
  1849. y: 600
  1850. }, {
  1851. id: 2,
  1852. x: 240,
  1853. y: 600
  1854. }, {
  1855. id: 3,
  1856. x: 80,
  1857. y: 600
  1858. }, {
  1859. id: 4,
  1860. x: 480,
  1861. y: 480
  1862. }, {
  1863. id: 5,
  1864. x: 320,
  1865. y: 480
  1866. }, {
  1867. id: 6,
  1868. x: 160,
  1869. y: 480
  1870. }, {
  1871. id: 7,
  1872. x: 400,
  1873. y: 360
  1874. }, {
  1875. id: 8,
  1876. x: 320,
  1877. y: 240
  1878. }, {
  1879. id: 9,
  1880. x: 240,
  1881. y: 360
  1882. }],
  1883. links: [{
  1884. p1: 7,
  1885. p2: 9,
  1886. arrow: !0
  1887. }, {
  1888. p1: 5,
  1889. p2: 4,
  1890. arrow: !0
  1891. }, {
  1892. p1: 6,
  1893. p2: 5,
  1894. arrow: !0
  1895. }, {
  1896. p1: 1,
  1897. p2: 0,
  1898. arrow: !0
  1899. }, {
  1900. p1: 2,
  1901. p2: 1,
  1902. arrow: !0
  1903. }, {
  1904. p1: 3,
  1905. p2: 2,
  1906. arrow: !0
  1907. }, {
  1908. p1: 4,
  1909. p2: 0
  1910. }, {
  1911. p1: 1,
  1912. p2: 4
  1913. }, {
  1914. p1: 5,
  1915. p2: 1
  1916. }, {
  1917. p1: 2,
  1918. p2: 5
  1919. }, {
  1920. p1: 6,
  1921. p2: 2
  1922. }, {
  1923. p1: 3,
  1924. p2: 6
  1925. }, {
  1926. p1: 7,
  1927. p2: 4
  1928. }, {
  1929. p1: 5,
  1930. p2: 7
  1931. }, {
  1932. p1: 5,
  1933. p2: 9
  1934. }, {
  1935. p1: 9,
  1936. p2: 6
  1937. }, {
  1938. p1: 7,
  1939. p2: 8
  1940. }, {
  1941. p1: 8,
  1942. p2: 9
  1943. }],
  1944. decor: {
  1945. name: "pic22",
  1946. x: 372,
  1947. y: 108
  1948. }
  1949. }), this.addLevel({
  1950. name: "Romb2",
  1951. items: [{
  1952. id: 0,
  1953. x: 160,
  1954. y: 480
  1955. }, {
  1956. id: 1,
  1957. x: 480,
  1958. y: 480
  1959. }, {
  1960. id: 2,
  1961. x: 480,
  1962. y: 320
  1963. }, {
  1964. id: 3,
  1965. x: 80,
  1966. y: 400
  1967. }, {
  1968. id: 4,
  1969. x: 160,
  1970. y: 320
  1971. }, {
  1972. id: 5,
  1973. x: 320,
  1974. y: 640
  1975. }, {
  1976. id: 6,
  1977. x: 320,
  1978. y: 160
  1979. }, {
  1980. id: 7,
  1981. x: 560,
  1982. y: 400
  1983. }, {
  1984. id: 8,
  1985. x: 320,
  1986. y: 520
  1987. }, {
  1988. id: 9,
  1989. x: 320,
  1990. y: 280
  1991. }],
  1992. links: [{
  1993. p1: 8,
  1994. p2: 5,
  1995. arrow: !0
  1996. }, {
  1997. p1: 9,
  1998. p2: 8,
  1999. arrow: !0
  2000. }, {
  2001. p1: 6,
  2002. p2: 9,
  2003. arrow: !0
  2004. }, {
  2005. p1: 2,
  2006. p2: 1
  2007. }, {
  2008. p1: 5,
  2009. p2: 1
  2010. }, {
  2011. p1: 0,
  2012. p2: 5
  2013. }, {
  2014. p1: 6,
  2015. p2: 2
  2016. }, {
  2017. p1: 4,
  2018. p2: 6
  2019. }, {
  2020. p1: 2,
  2021. p2: 9
  2022. }, {
  2023. p1: 7,
  2024. p2: 2
  2025. }, {
  2026. p1: 1,
  2027. p2: 7
  2028. }, {
  2029. p1: 8,
  2030. p2: 1
  2031. }, {
  2032. p1: 4,
  2033. p2: 0
  2034. }, {
  2035. p1: 4,
  2036. p2: 9
  2037. }, {
  2038. p1: 3,
  2039. p2: 4
  2040. }, {
  2041. p1: 0,
  2042. p2: 3
  2043. }, {
  2044. p1: 8,
  2045. p2: 0
  2046. }],
  2047. decor: {
  2048. name: "pic23",
  2049. x: 418,
  2050. y: 99
  2051. }
  2052. }), this.addLevel({
  2053. name: "P13 copy",
  2054. items: [{
  2055. id: 0,
  2056. x: 440,
  2057. y: 480
  2058. }, {
  2059. id: 1,
  2060. x: 480,
  2061. y: 560
  2062. }, {
  2063. id: 2,
  2064. x: 520,
  2065. y: 480
  2066. }, {
  2067. id: 3,
  2068. x: 380,
  2069. y: 520
  2070. }, {
  2071. id: 4,
  2072. x: 200,
  2073. y: 480
  2074. }, {
  2075. id: 5,
  2076. x: 280,
  2077. y: 480
  2078. }, {
  2079. id: 6,
  2080. x: 240,
  2081. y: 560
  2082. }, {
  2083. id: 7,
  2084. x: 160,
  2085. y: 560
  2086. }, {
  2087. id: 8,
  2088. x: 120,
  2089. y: 480
  2090. }, {
  2091. id: 9,
  2092. x: 320,
  2093. y: 240
  2094. }, {
  2095. id: 10,
  2096. x: 240,
  2097. y: 240
  2098. }, {
  2099. id: 11,
  2100. x: 280,
  2101. y: 320
  2102. }, {
  2103. id: 12,
  2104. x: 380,
  2105. y: 280
  2106. }, {
  2107. id: 13,
  2108. x: 200,
  2109. y: 640
  2110. }, {
  2111. id: 14,
  2112. x: 80,
  2113. y: 400
  2114. }, {
  2115. id: 15,
  2116. x: 200,
  2117. y: 400
  2118. }, {
  2119. id: 16,
  2120. x: 440,
  2121. y: 640
  2122. }, {
  2123. id: 17,
  2124. x: 560,
  2125. y: 400
  2126. }, {
  2127. id: 18,
  2128. x: 480,
  2129. y: 400
  2130. }, {
  2131. id: 19,
  2132. x: 400,
  2133. y: 400
  2134. }, {
  2135. id: 20,
  2136. x: 320,
  2137. y: 400
  2138. }, {
  2139. id: 21,
  2140. x: 440,
  2141. y: 160
  2142. }, {
  2143. id: 22,
  2144. x: 360,
  2145. y: 160
  2146. }, {
  2147. id: 23,
  2148. x: 280,
  2149. y: 160
  2150. }, {
  2151. id: 24,
  2152. x: 200,
  2153. y: 160
  2154. }],
  2155. links: [{
  2156. p1: 20,
  2157. p2: 11,
  2158. arrow: !0
  2159. }, {
  2160. p1: 20,
  2161. p2: 19,
  2162. arrow: !0
  2163. }, {
  2164. p1: 20,
  2165. p2: 15,
  2166. arrow: !0
  2167. }, {
  2168. p1: 23,
  2169. p2: 10
  2170. }, {
  2171. p1: 3,
  2172. p2: 1
  2173. }, {
  2174. p1: 19,
  2175. p2: 3
  2176. }, {
  2177. p1: 2,
  2178. p2: 18
  2179. }, {
  2180. p1: 0,
  2181. p2: 2
  2182. }, {
  2183. p1: 18,
  2184. p2: 0
  2185. }, {
  2186. p1: 0,
  2187. p2: 19
  2188. }, {
  2189. p1: 1,
  2190. p2: 0
  2191. }, {
  2192. p1: 2,
  2193. p2: 17
  2194. }, {
  2195. p1: 1,
  2196. p2: 2
  2197. }, {
  2198. p1: 16,
  2199. p2: 1
  2200. }, {
  2201. p1: 3,
  2202. p2: 16
  2203. }, {
  2204. p1: 20,
  2205. p2: 3
  2206. }, {
  2207. p1: 18,
  2208. p2: 17
  2209. }, {
  2210. p1: 19,
  2211. p2: 18
  2212. }, {
  2213. p1: 6,
  2214. p2: 4
  2215. }, {
  2216. p1: 7,
  2217. p2: 6
  2218. }, {
  2219. p1: 4,
  2220. p2: 7
  2221. }, {
  2222. p1: 4,
  2223. p2: 5
  2224. }, {
  2225. p1: 8,
  2226. p2: 4
  2227. }, {
  2228. p1: 15,
  2229. p2: 5
  2230. }, {
  2231. p1: 8,
  2232. p2: 15
  2233. }, {
  2234. p1: 7,
  2235. p2: 13
  2236. }, {
  2237. p1: 8,
  2238. p2: 7
  2239. }, {
  2240. p1: 14,
  2241. p2: 8
  2242. }, {
  2243. p1: 5,
  2244. p2: 20
  2245. }, {
  2246. p1: 6,
  2247. p2: 5
  2248. }, {
  2249. p1: 13,
  2250. p2: 6
  2251. }, {
  2252. p1: 12,
  2253. p2: 11
  2254. }, {
  2255. p1: 22,
  2256. p2: 12
  2257. }, {
  2258. p1: 9,
  2259. p2: 10
  2260. }, {
  2261. p1: 22,
  2262. p2: 21
  2263. }, {
  2264. p1: 23,
  2265. p2: 22
  2266. }, {
  2267. p1: 24,
  2268. p2: 23
  2269. }, {
  2270. p1: 23,
  2271. p2: 9
  2272. }, {
  2273. p1: 9,
  2274. p2: 22
  2275. }, {
  2276. p1: 11,
  2277. p2: 9
  2278. }, {
  2279. p1: 10,
  2280. p2: 24
  2281. }, {
  2282. p1: 11,
  2283. p2: 10
  2284. }, {
  2285. p1: 12,
  2286. p2: 21
  2287. }, {
  2288. p1: 20,
  2289. p2: 12
  2290. }, {
  2291. p1: 15,
  2292. p2: 14
  2293. }],
  2294. decor: {
  2295. name: "pic24",
  2296. x: 385,
  2297. y: 186
  2298. }
  2299. }), this.addLevel({
  2300. name: "Doit",
  2301. items: [{
  2302. id: 0,
  2303. x: 320,
  2304. y: 240
  2305. }, {
  2306. id: 1,
  2307. x: 480,
  2308. y: 240
  2309. }, {
  2310. id: 2,
  2311. x: 480,
  2312. y: 560
  2313. }, {
  2314. id: 3,
  2315. x: 160,
  2316. y: 560
  2317. }, {
  2318. id: 4,
  2319. x: 160,
  2320. y: 240
  2321. }, {
  2322. id: 5,
  2323. x: 240,
  2324. y: 480
  2325. }, {
  2326. id: 6,
  2327. x: 400,
  2328. y: 480
  2329. }, {
  2330. id: 7,
  2331. x: 400,
  2332. y: 320
  2333. }, {
  2334. id: 8,
  2335. x: 240,
  2336. y: 320
  2337. }],
  2338. links: [{
  2339. p1: 4,
  2340. p2: 3,
  2341. arrow: !0
  2342. }, {
  2343. p1: 1,
  2344. p2: 2,
  2345. arrow: !0
  2346. }, {
  2347. p1: 5,
  2348. p2: 8,
  2349. arrow: !0
  2350. }, {
  2351. p1: 6,
  2352. p2: 5,
  2353. arrow: !0
  2354. }, {
  2355. p1: 7,
  2356. p2: 6,
  2357. arrow: !0
  2358. }, {
  2359. p1: 7,
  2360. p2: 8,
  2361. arrow: !0
  2362. }, {
  2363. p1: 0,
  2364. p2: 7
  2365. }, {
  2366. p1: 0,
  2367. p2: 8
  2368. }, {
  2369. p1: 8,
  2370. p2: 6
  2371. }, {
  2372. p1: 5,
  2373. p2: 7
  2374. }, {
  2375. p1: 1,
  2376. p2: 7
  2377. }, {
  2378. p1: 6,
  2379. p2: 2
  2380. }, {
  2381. p1: 3,
  2382. p2: 5
  2383. }, {
  2384. p1: 8,
  2385. p2: 4
  2386. }],
  2387. decor: {
  2388. name: "pic25",
  2389. x: 243,
  2390. y: 489
  2391. }
  2392. }), this.addLevel({
  2393. name: "P9 copy",
  2394. items: [{
  2395. id: 0,
  2396. x: 421,
  2397. y: 400
  2398. }, {
  2399. id: 1,
  2400. x: 221,
  2401. y: 400
  2402. }, {
  2403. id: 2,
  2404. x: 320,
  2405. y: 520
  2406. }, {
  2407. id: 3,
  2408. x: 320,
  2409. y: 280
  2410. }, {
  2411. id: 4,
  2412. x: 600,
  2413. y: 400
  2414. }, {
  2415. id: 5,
  2416. x: 40,
  2417. y: 400
  2418. }, {
  2419. id: 6,
  2420. x: 520,
  2421. y: 520
  2422. }, {
  2423. id: 7,
  2424. x: 120,
  2425. y: 520
  2426. }, {
  2427. id: 8,
  2428. x: 520,
  2429. y: 280
  2430. }, {
  2431. id: 9,
  2432. x: 120,
  2433. y: 280
  2434. }],
  2435. links: [{
  2436. p1: 8,
  2437. p2: 3,
  2438. arrow: !0
  2439. }, {
  2440. p1: 9,
  2441. p2: 3,
  2442. arrow: !0
  2443. }, {
  2444. p1: 2,
  2445. p2: 6,
  2446. arrow: !0
  2447. }, {
  2448. p1: 2,
  2449. p2: 7,
  2450. arrow: !0
  2451. }, {
  2452. p1: 0,
  2453. p2: 6
  2454. }, {
  2455. p1: 0,
  2456. p2: 2
  2457. }, {
  2458. p1: 0,
  2459. p2: 8
  2460. }, {
  2461. p1: 3,
  2462. p2: 0
  2463. }, {
  2464. p1: 1,
  2465. p2: 7
  2466. }, {
  2467. p1: 1,
  2468. p2: 9
  2469. }, {
  2470. p1: 1,
  2471. p2: 3
  2472. }, {
  2473. p1: 2,
  2474. p2: 1
  2475. }, {
  2476. p1: 3,
  2477. p2: 2
  2478. }, {
  2479. p1: 6,
  2480. p2: 8
  2481. }, {
  2482. p1: 4,
  2483. p2: 6
  2484. }, {
  2485. p1: 8,
  2486. p2: 4
  2487. }, {
  2488. p1: 5,
  2489. p2: 7
  2490. }, {
  2491. p1: 9,
  2492. p2: 5
  2493. }, {
  2494. p1: 7,
  2495. p2: 9
  2496. }],
  2497. decor: {
  2498. name: "pic26",
  2499. x: 259,
  2500. y: 58
  2501. }
  2502. }), this.addLevel({
  2503. name: "P11 copy",
  2504. items: [{
  2505. id: 0,
  2506. x: 320,
  2507. y: 293
  2508. }, {
  2509. id: 1,
  2510. x: 380,
  2511. y: 260
  2512. }, {
  2513. id: 2,
  2514. x: 260,
  2515. y: 260
  2516. }, {
  2517. id: 3,
  2518. x: 440,
  2519. y: 572
  2520. }, {
  2521. id: 4,
  2522. x: 531,
  2523. y: 520
  2524. }, {
  2525. id: 5,
  2526. x: 200,
  2527. y: 572
  2528. }, {
  2529. id: 6,
  2530. x: 109,
  2531. y: 520
  2532. }, {
  2533. id: 7,
  2534. x: 320,
  2535. y: 640
  2536. }, {
  2537. id: 8,
  2538. x: 600,
  2539. y: 640
  2540. }, {
  2541. id: 9,
  2542. x: 40,
  2543. y: 640
  2544. }, {
  2545. id: 10,
  2546. x: 320,
  2547. y: 160
  2548. }, {
  2549. id: 11,
  2550. x: 200,
  2551. y: 640
  2552. }, {
  2553. id: 12,
  2554. x: 440,
  2555. y: 640
  2556. }, {
  2557. id: 13,
  2558. x: 440,
  2559. y: 360
  2560. }, {
  2561. id: 14,
  2562. x: 200,
  2563. y: 360
  2564. }],
  2565. links: [{
  2566. p1: 1,
  2567. p2: 2,
  2568. arrow: !0
  2569. }, {
  2570. p1: 13,
  2571. p2: 14,
  2572. arrow: !0
  2573. }, {
  2574. p1: 11,
  2575. p2: 9,
  2576. arrow: !0
  2577. }, {
  2578. p1: 7,
  2579. p2: 11,
  2580. arrow: !0
  2581. }, {
  2582. p1: 12,
  2583. p2: 7,
  2584. arrow: !0
  2585. }, {
  2586. p1: 8,
  2587. p2: 12,
  2588. arrow: !0
  2589. }, {
  2590. p1: 4,
  2591. p2: 13
  2592. }, {
  2593. p1: 8,
  2594. p2: 4
  2595. }, {
  2596. p1: 6,
  2597. p2: 14
  2598. }, {
  2599. p1: 9,
  2600. p2: 6
  2601. }, {
  2602. p1: 1,
  2603. p2: 10
  2604. }, {
  2605. p1: 13,
  2606. p2: 1
  2607. }, {
  2608. p1: 2,
  2609. p2: 10
  2610. }, {
  2611. p1: 14,
  2612. p2: 2
  2613. }, {
  2614. p1: 3,
  2615. p2: 13
  2616. }, {
  2617. p1: 12,
  2618. p2: 3
  2619. }, {
  2620. p1: 5,
  2621. p2: 14
  2622. }, {
  2623. p1: 11,
  2624. p2: 5
  2625. }, {
  2626. p1: 7,
  2627. p2: 13
  2628. }, {
  2629. p1: 7,
  2630. p2: 14
  2631. }, {
  2632. p1: 0,
  2633. p2: 1
  2634. }, {
  2635. p1: 14,
  2636. p2: 0
  2637. }, {
  2638. p1: 0,
  2639. p2: 2
  2640. }, {
  2641. p1: 13,
  2642. p2: 0
  2643. }, {
  2644. p1: 3,
  2645. p2: 4
  2646. }, {
  2647. p1: 7,
  2648. p2: 3
  2649. }, {
  2650. p1: 5,
  2651. p2: 6
  2652. }, {
  2653. p1: 7,
  2654. p2: 5
  2655. }, {
  2656. p1: 12,
  2657. p2: 4
  2658. }, {
  2659. p1: 11,
  2660. p2: 6
  2661. }],
  2662. decor: {
  2663. name: "pic27",
  2664. x: 378,
  2665. y: 101
  2666. }
  2667. }), this.addLevel({
  2668. name: "P10",
  2669. items: [{
  2670. id: 0,
  2671. x: 480,
  2672. y: 400
  2673. }, {
  2674. id: 1,
  2675. x: 560,
  2676. y: 400
  2677. }, {
  2678. id: 2,
  2679. x: 560,
  2680. y: 480
  2681. }, {
  2682. id: 3,
  2683. x: 560,
  2684. y: 560
  2685. }, {
  2686. id: 4,
  2687. x: 480,
  2688. y: 560
  2689. }, {
  2690. id: 5,
  2691. x: 400,
  2692. y: 480
  2693. }, {
  2694. id: 6,
  2695. x: 400,
  2696. y: 560
  2697. }, {
  2698. id: 7,
  2699. x: 320,
  2700. y: 560
  2701. }, {
  2702. id: 8,
  2703. x: 240,
  2704. y: 560
  2705. }, {
  2706. id: 9,
  2707. x: 240,
  2708. y: 480
  2709. }, {
  2710. id: 10,
  2711. x: 240,
  2712. y: 320
  2713. }, {
  2714. id: 11,
  2715. x: 400,
  2716. y: 320
  2717. }, {
  2718. id: 12,
  2719. x: 400,
  2720. y: 400
  2721. }, {
  2722. id: 13,
  2723. x: 320,
  2724. y: 400
  2725. }, {
  2726. id: 14,
  2727. x: 240,
  2728. y: 400
  2729. }, {
  2730. id: 15,
  2731. x: 160,
  2732. y: 400
  2733. }, {
  2734. id: 16,
  2735. x: 80,
  2736. y: 400
  2737. }, {
  2738. id: 17,
  2739. x: 80,
  2740. y: 320
  2741. }, {
  2742. id: 18,
  2743. x: 400,
  2744. y: 240
  2745. }, {
  2746. id: 19,
  2747. x: 320,
  2748. y: 240
  2749. }, {
  2750. id: 20,
  2751. x: 160,
  2752. y: 240
  2753. }, {
  2754. id: 21,
  2755. x: 80,
  2756. y: 240
  2757. }, {
  2758. id: 22,
  2759. x: 240,
  2760. y: 240
  2761. }],
  2762. links: [{
  2763. p1: 9,
  2764. p2: 14,
  2765. arrow: !0
  2766. }, {
  2767. p1: 10,
  2768. p2: 14,
  2769. arrow: !0
  2770. }, {
  2771. p1: 14,
  2772. p2: 15,
  2773. arrow: !0
  2774. }, {
  2775. p1: 14,
  2776. p2: 13,
  2777. arrow: !0
  2778. }, {
  2779. p1: 12,
  2780. p2: 11,
  2781. arrow: !0
  2782. }, {
  2783. p1: 0,
  2784. p2: 12,
  2785. arrow: !0
  2786. }, {
  2787. p1: 13,
  2788. p2: 12,
  2789. arrow: !0
  2790. }, {
  2791. p1: 12,
  2792. p2: 5,
  2793. arrow: !0
  2794. }, {
  2795. p1: 5,
  2796. p2: 4
  2797. }, {
  2798. p1: 0,
  2799. p2: 5
  2800. }, {
  2801. p1: 2,
  2802. p2: 0
  2803. }, {
  2804. p1: 4,
  2805. p2: 2
  2806. }, {
  2807. p1: 7,
  2808. p2: 9
  2809. }, {
  2810. p1: 5,
  2811. p2: 7
  2812. }, {
  2813. p1: 13,
  2814. p2: 5
  2815. }, {
  2816. p1: 9,
  2817. p2: 13
  2818. }, {
  2819. p1: 13,
  2820. p2: 10
  2821. }, {
  2822. p1: 11,
  2823. p2: 13
  2824. }, {
  2825. p1: 19,
  2826. p2: 11
  2827. }, {
  2828. p1: 10,
  2829. p2: 19
  2830. }, {
  2831. p1: 15,
  2832. p2: 17
  2833. }, {
  2834. p1: 10,
  2835. p2: 15
  2836. }, {
  2837. p1: 20,
  2838. p2: 10
  2839. }, {
  2840. p1: 17,
  2841. p2: 20
  2842. }, {
  2843. p1: 4,
  2844. p2: 6
  2845. }, {
  2846. p1: 3,
  2847. p2: 4
  2848. }, {
  2849. p1: 2,
  2850. p2: 3
  2851. }, {
  2852. p1: 1,
  2853. p2: 2
  2854. }, {
  2855. p1: 0,
  2856. p2: 1
  2857. }, {
  2858. p1: 6,
  2859. p2: 5
  2860. }, {
  2861. p1: 7,
  2862. p2: 6
  2863. }, {
  2864. p1: 8,
  2865. p2: 7
  2866. }, {
  2867. p1: 9,
  2868. p2: 8
  2869. }, {
  2870. p1: 18,
  2871. p2: 11
  2872. }, {
  2873. p1: 19,
  2874. p2: 18
  2875. }, {
  2876. p1: 22,
  2877. p2: 19
  2878. }, {
  2879. p1: 17,
  2880. p2: 21
  2881. }, {
  2882. p1: 16,
  2883. p2: 17
  2884. }, {
  2885. p1: 15,
  2886. p2: 16
  2887. }, {
  2888. p1: 22,
  2889. p2: 10
  2890. }, {
  2891. p1: 20,
  2892. p2: 22
  2893. }, {
  2894. p1: 21,
  2895. p2: 20
  2896. }],
  2897. decor: {
  2898. name: "pic28",
  2899. x: 410,
  2900. y: 103
  2901. }
  2902. }), this.addLevel({
  2903. name: "Krest",
  2904. items: [{
  2905. id: 0,
  2906. x: 160,
  2907. y: 320
  2908. }, {
  2909. id: 1,
  2910. x: 160,
  2911. y: 440
  2912. }, {
  2913. id: 2,
  2914. x: 280,
  2915. y: 560
  2916. }, {
  2917. id: 3,
  2918. x: 400,
  2919. y: 560
  2920. }, {
  2921. id: 4,
  2922. x: 520,
  2923. y: 440
  2924. }, {
  2925. id: 5,
  2926. x: 520,
  2927. y: 320
  2928. }, {
  2929. id: 6,
  2930. x: 400,
  2931. y: 200
  2932. }, {
  2933. id: 7,
  2934. x: 280,
  2935. y: 200
  2936. }, {
  2937. id: 8,
  2938. x: 280,
  2939. y: 440
  2940. }, {
  2941. id: 9,
  2942. x: 400,
  2943. y: 440
  2944. }, {
  2945. id: 10,
  2946. x: 280,
  2947. y: 320
  2948. }, {
  2949. id: 11,
  2950. x: 400,
  2951. y: 320
  2952. }],
  2953. links: [{
  2954. p1: 6,
  2955. p2: 11,
  2956. arrow: !0
  2957. }, {
  2958. p1: 9,
  2959. p2: 3,
  2960. arrow: !0
  2961. }, {
  2962. p1: 5,
  2963. p2: 4,
  2964. arrow: !0
  2965. }, {
  2966. p1: 10,
  2967. p2: 8,
  2968. arrow: !0
  2969. }, {
  2970. p1: 11,
  2971. p2: 9,
  2972. arrow: !0
  2973. }, {
  2974. p1: 11,
  2975. p2: 7
  2976. }, {
  2977. p1: 4,
  2978. p2: 11
  2979. }, {
  2980. p1: 8,
  2981. p2: 3
  2982. }, {
  2983. p1: 8,
  2984. p2: 11
  2985. }, {
  2986. p1: 3,
  2987. p2: 4
  2988. }, {
  2989. p1: 0,
  2990. p2: 7
  2991. }, {
  2992. p1: 2,
  2993. p2: 3
  2994. }, {
  2995. p1: 8,
  2996. p2: 2
  2997. }, {
  2998. p1: 0,
  2999. p2: 10
  3000. }, {
  3001. p1: 1,
  3002. p2: 0
  3003. }, {
  3004. p1: 8,
  3005. p2: 1
  3006. }, {
  3007. p1: 4,
  3008. p2: 9
  3009. }, {
  3010. p1: 11,
  3011. p2: 5
  3012. }, {
  3013. p1: 7,
  3014. p2: 6
  3015. }, {
  3016. p1: 10,
  3017. p2: 7
  3018. }, {
  3019. p1: 9,
  3020. p2: 8
  3021. }, {
  3022. p1: 10,
  3023. p2: 11
  3024. }],
  3025. decor: {
  3026. name: "pic29",
  3027. x: 82,
  3028. y: 485
  3029. }
  3030. }), this.addLevel({
  3031. name: "Two Quads",
  3032. items: [{
  3033. id: 0,
  3034. x: 120,
  3035. y: 240
  3036. }, {
  3037. id: 1,
  3038. x: 360,
  3039. y: 160
  3040. }, {
  3041. id: 2,
  3042. x: 520,
  3043. y: 320
  3044. }, {
  3045. id: 3,
  3046. x: 200,
  3047. y: 640
  3048. }, {
  3049. id: 4,
  3050. x: 440,
  3051. y: 560
  3052. }, {
  3053. id: 5,
  3054. x: 200,
  3055. y: 480
  3056. }, {
  3057. id: 6,
  3058. x: 280,
  3059. y: 560
  3060. }, {
  3061. id: 7,
  3062. x: 120,
  3063. y: 560
  3064. }, {
  3065. id: 8,
  3066. x: 120,
  3067. y: 400
  3068. }, {
  3069. id: 9,
  3070. x: 360,
  3071. y: 320
  3072. }, {
  3073. id: 10,
  3074. x: 440,
  3075. y: 400
  3076. }, {
  3077. id: 11,
  3078. x: 280,
  3079. y: 400
  3080. }, {
  3081. id: 12,
  3082. x: 440,
  3083. y: 240
  3084. }, {
  3085. id: 13,
  3086. x: 280,
  3087. y: 240
  3088. }],
  3089. links: [{
  3090. p1: 8,
  3091. p2: 7,
  3092. arrow: !0
  3093. }, {
  3094. p1: 6,
  3095. p2: 7,
  3096. arrow: !0
  3097. }, {
  3098. p1: 12,
  3099. p2: 10,
  3100. arrow: !0
  3101. }, {
  3102. p1: 12,
  3103. p2: 13,
  3104. arrow: !0
  3105. }, {
  3106. p1: 11,
  3107. p2: 10,
  3108. arrow: !0
  3109. }, {
  3110. p1: 8,
  3111. p2: 11,
  3112. arrow: !0
  3113. }, {
  3114. p1: 11,
  3115. p2: 13,
  3116. arrow: !0
  3117. }, {
  3118. p1: 6,
  3119. p2: 11,
  3120. arrow: !0
  3121. }, {
  3122. p1: 0,
  3123. p2: 13
  3124. }, {
  3125. p1: 8,
  3126. p2: 0
  3127. }, {
  3128. p1: 4,
  3129. p2: 10
  3130. }, {
  3131. p1: 6,
  3132. p2: 4
  3133. }, {
  3134. p1: 3,
  3135. p2: 7
  3136. }, {
  3137. p1: 6,
  3138. p2: 3
  3139. }, {
  3140. p1: 10,
  3141. p2: 6
  3142. }, {
  3143. p1: 13,
  3144. p2: 8
  3145. }, {
  3146. p1: 1,
  3147. p2: 13
  3148. }, {
  3149. p1: 12,
  3150. p2: 1
  3151. }, {
  3152. p1: 2,
  3153. p2: 12
  3154. }, {
  3155. p1: 10,
  3156. p2: 2
  3157. }, {
  3158. p1: 9,
  3159. p2: 10
  3160. }, {
  3161. p1: 13,
  3162. p2: 9
  3163. }, {
  3164. p1: 9,
  3165. p2: 12
  3166. }, {
  3167. p1: 11,
  3168. p2: 9
  3169. }, {
  3170. p1: 5,
  3171. p2: 6
  3172. }, {
  3173. p1: 8,
  3174. p2: 5
  3175. }, {
  3176. p1: 5,
  3177. p2: 7
  3178. }, {
  3179. p1: 11,
  3180. p2: 5
  3181. }],
  3182. decor: {
  3183. name: "pic30",
  3184. x: 426,
  3185. y: 514
  3186. }
  3187. }), this.addLevel({
  3188. name: "P12 copy",
  3189. items: [{
  3190. id: 0,
  3191. x: 400,
  3192. y: 640
  3193. }, {
  3194. id: 1,
  3195. x: 240,
  3196. y: 640
  3197. }, {
  3198. id: 2,
  3199. x: 440,
  3200. y: 200
  3201. }, {
  3202. id: 3,
  3203. x: 200,
  3204. y: 200
  3205. }, {
  3206. id: 4,
  3207. x: 560,
  3208. y: 280
  3209. }, {
  3210. id: 5,
  3211. x: 440,
  3212. y: 280
  3213. }, {
  3214. id: 6,
  3215. x: 200,
  3216. y: 280
  3217. }, {
  3218. id: 7,
  3219. x: 80,
  3220. y: 280
  3221. }, {
  3222. id: 8,
  3223. x: 440,
  3224. y: 360
  3225. }, {
  3226. id: 9,
  3227. x: 320,
  3228. y: 360
  3229. }, {
  3230. id: 10,
  3231. x: 200,
  3232. y: 360
  3233. }, {
  3234. id: 11,
  3235. x: 560,
  3236. y: 440
  3237. }, {
  3238. id: 12,
  3239. x: 440,
  3240. y: 440
  3241. }, {
  3242. id: 13,
  3243. x: 320,
  3244. y: 440
  3245. }, {
  3246. id: 14,
  3247. x: 200,
  3248. y: 440
  3249. }, {
  3250. id: 15,
  3251. x: 80,
  3252. y: 440
  3253. }, {
  3254. id: 16,
  3255. x: 560,
  3256. y: 520
  3257. }, {
  3258. id: 17,
  3259. x: 440,
  3260. y: 520
  3261. }, {
  3262. id: 18,
  3263. x: 200,
  3264. y: 520
  3265. }, {
  3266. id: 19,
  3267. x: 80,
  3268. y: 520
  3269. }],
  3270. links: [{
  3271. p1: 4,
  3272. p2: 11,
  3273. arrow: !0
  3274. }, {
  3275. p1: 15,
  3276. p2: 7,
  3277. arrow: !0
  3278. }, {
  3279. p1: 0,
  3280. p2: 1,
  3281. arrow: !0
  3282. }, {
  3283. p1: 18,
  3284. p2: 17,
  3285. arrow: !0
  3286. }, {
  3287. p1: 16,
  3288. p2: 12
  3289. }, {
  3290. p1: 2,
  3291. p2: 4
  3292. }, {
  3293. p1: 5,
  3294. p2: 2
  3295. }, {
  3296. p1: 3,
  3297. p2: 6
  3298. }, {
  3299. p1: 7,
  3300. p2: 3
  3301. }, {
  3302. p1: 0,
  3303. p2: 16
  3304. }, {
  3305. p1: 19,
  3306. p2: 1
  3307. }, {
  3308. p1: 13,
  3309. p2: 17
  3310. }, {
  3311. p1: 18,
  3312. p2: 13
  3313. }, {
  3314. p1: 9,
  3315. p2: 12
  3316. }, {
  3317. p1: 9,
  3318. p2: 14
  3319. }, {
  3320. p1: 9,
  3321. p2: 5
  3322. }, {
  3323. p1: 6,
  3324. p2: 9
  3325. }, {
  3326. p1: 10,
  3327. p2: 7
  3328. }, {
  3329. p1: 15,
  3330. p2: 10
  3331. }, {
  3332. p1: 6,
  3333. p2: 7
  3334. }, {
  3335. p1: 10,
  3336. p2: 6
  3337. }, {
  3338. p1: 14,
  3339. p2: 10
  3340. }, {
  3341. p1: 8,
  3342. p2: 4
  3343. }, {
  3344. p1: 11,
  3345. p2: 8
  3346. }, {
  3347. p1: 5,
  3348. p2: 4
  3349. }, {
  3350. p1: 8,
  3351. p2: 5
  3352. }, {
  3353. p1: 12,
  3354. p2: 8
  3355. }, {
  3356. p1: 11,
  3357. p2: 16
  3358. }, {
  3359. p1: 12,
  3360. p2: 11
  3361. }, {
  3362. p1: 12,
  3363. p2: 17
  3364. }, {
  3365. p1: 13,
  3366. p2: 12
  3367. }, {
  3368. p1: 14,
  3369. p2: 13
  3370. }, {
  3371. p1: 14,
  3372. p2: 18
  3373. }, {
  3374. p1: 15,
  3375. p2: 14
  3376. }, {
  3377. p1: 19,
  3378. p2: 15
  3379. }, {
  3380. p1: 18,
  3381. p2: 19
  3382. }, {
  3383. p1: 16,
  3384. p2: 17
  3385. }],
  3386. decor: {
  3387. name: "pic31",
  3388. x: 200,
  3389. y: 146
  3390. }
  3391. }), this.addLevel({
  3392. name: "P7",
  3393. items: [{
  3394. id: 0,
  3395. x: 560,
  3396. y: 520
  3397. }, {
  3398. id: 1,
  3399. x: 320,
  3400. y: 520
  3401. }, {
  3402. id: 2,
  3403. x: 440,
  3404. y: 520
  3405. }, {
  3406. id: 3,
  3407. x: 80,
  3408. y: 520
  3409. }, {
  3410. id: 4,
  3411. x: 200,
  3412. y: 520
  3413. }, {
  3414. id: 5,
  3415. x: 560,
  3416. y: 400
  3417. }, {
  3418. id: 6,
  3419. x: 320,
  3420. y: 400
  3421. }, {
  3422. id: 7,
  3423. x: 440,
  3424. y: 400
  3425. }, {
  3426. id: 8,
  3427. x: 80,
  3428. y: 400
  3429. }, {
  3430. id: 9,
  3431. x: 200,
  3432. y: 400
  3433. }, {
  3434. id: 10,
  3435. x: 560,
  3436. y: 280
  3437. }, {
  3438. id: 11,
  3439. x: 320,
  3440. y: 280
  3441. }, {
  3442. id: 12,
  3443. x: 440,
  3444. y: 280
  3445. }, {
  3446. id: 13,
  3447. x: 560,
  3448. y: 160
  3449. }, {
  3450. id: 14,
  3451. x: 440,
  3452. y: 160
  3453. }, {
  3454. id: 15,
  3455. x: 80,
  3456. y: 280
  3457. }, {
  3458. id: 16,
  3459. x: 200,
  3460. y: 280
  3461. }, {
  3462. id: 17,
  3463. x: 200,
  3464. y: 160
  3465. }, {
  3466. id: 18,
  3467. x: 80,
  3468. y: 160
  3469. }, {
  3470. id: 19,
  3471. x: 320,
  3472. y: 160
  3473. }],
  3474. links: [{
  3475. p1: 4,
  3476. p2: 1,
  3477. arrow: !0
  3478. }, {
  3479. p1: 6,
  3480. p2: 7,
  3481. arrow: !0
  3482. }, {
  3483. p1: 17,
  3484. p2: 19,
  3485. arrow: !0
  3486. }, {
  3487. p1: 4,
  3488. p2: 8
  3489. }, {
  3490. p1: 5,
  3491. p2: 2
  3492. }, {
  3493. p1: 14,
  3494. p2: 10
  3495. }, {
  3496. p1: 15,
  3497. p2: 17
  3498. }, {
  3499. p1: 7,
  3500. p2: 2
  3501. }, {
  3502. p1: 12,
  3503. p2: 7
  3504. }, {
  3505. p1: 14,
  3506. p2: 12
  3507. }, {
  3508. p1: 6,
  3509. p2: 1
  3510. }, {
  3511. p1: 11,
  3512. p2: 6
  3513. }, {
  3514. p1: 19,
  3515. p2: 11
  3516. }, {
  3517. p1: 9,
  3518. p2: 4
  3519. }, {
  3520. p1: 16,
  3521. p2: 9
  3522. }, {
  3523. p1: 17,
  3524. p2: 16
  3525. }, {
  3526. p1: 7,
  3527. p2: 5
  3528. }, {
  3529. p1: 9,
  3530. p2: 6
  3531. }, {
  3532. p1: 8,
  3533. p2: 9
  3534. }, {
  3535. p1: 12,
  3536. p2: 10
  3537. }, {
  3538. p1: 11,
  3539. p2: 12
  3540. }, {
  3541. p1: 16,
  3542. p2: 11
  3543. }, {
  3544. p1: 15,
  3545. p2: 16
  3546. }, {
  3547. p1: 15,
  3548. p2: 18
  3549. }, {
  3550. p1: 8,
  3551. p2: 15
  3552. }, {
  3553. p1: 3,
  3554. p2: 8
  3555. }, {
  3556. p1: 4,
  3557. p2: 3
  3558. }, {
  3559. p1: 2,
  3560. p2: 1
  3561. }, {
  3562. p1: 0,
  3563. p2: 2
  3564. }, {
  3565. p1: 5,
  3566. p2: 0
  3567. }, {
  3568. p1: 10,
  3569. p2: 5
  3570. }, {
  3571. p1: 13,
  3572. p2: 10
  3573. }, {
  3574. p1: 14,
  3575. p2: 13
  3576. }, {
  3577. p1: 19,
  3578. p2: 14
  3579. }, {
  3580. p1: 18,
  3581. p2: 17
  3582. }],
  3583. decor: {
  3584. name: "pic32",
  3585. x: 407,
  3586. y: 532
  3587. }
  3588. })
  3589. },
  3590. addLevel: function(a) {
  3591. var b = this.levels.length,
  3592. c = new App.Level(b, a);
  3593. this.levels.push(c)
  3594. },
  3595. getLevelTime: function() {
  3596. return Math.round(game.time.elapsedSince(this.levelStartTime) - data.pauseTime)
  3597. },
  3598. getTotalTime: function() {
  3599. for (var a = 0, b = 0; b < this.levels.length; b++) {
  3600. var c = this.levels[b];
  3601. c.isCompleted && (a += c.bestTime)
  3602. }
  3603. return a
  3604. }
  3605. }), App.Dialog = Class.extend({
  3606. init: function(a, b, c) {
  3607. this.game = a;
  3608. var d = 0,
  3609. e = 0,
  3610. f = !1,
  3611. g = !0;
  3612. if (c && (void 0 != c.x && (d = c.x), void 0 != c.y && (e = c.y), 1 == c.blockBack && (f = !0), 0 == c.doTween && (g = !1)), this.holder = new Phaser.Group(this.game, this.game.world), f && (this.block = new Phaser.Sprite(this.game, 0, 0, "blackBack"), this.block.inputEnabled = !0, this.holder.add(this.block)), this.boxHolder = new Phaser.Group(this.game, this.holder), this.boxHolder.x = d, this.boxHolder.y = e, this.box = new Phaser.Sprite(this.game, 0, 0, b), this.boxHolder.add(this.box), g) {
  3613. var h = this.boxHolder.y;
  3614. this.boxHolder.y = Config.HEIGHT, this.game.add.tween(this.boxHolder).to({
  3615. y: h
  3616. }, 1e3, Phaser.Easing.Back.Out, !0), f && (this.block.alpha = 0, this.game.add.tween(this.block).to({
  3617. alpha: 1
  3618. }, 500, Phaser.Easing.Linear.None, !0))
  3619. }
  3620. },
  3621. destroy: function() {
  3622. this.holder.destroy()
  3623. }
  3624. }), App.GameLogic = Class.extend({
  3625. init: function(a, b, c, d, e, f) {
  3626. this.game = a, this.parentGroup = b, this.dotsGroup = c, this.linksGroup = d, this.dots = e, this.staticLinks = f, this.drawLine = null, this.userLinks = [], this.game.input.onDown.add(this.touchDownHandler, this), this.game.input.onUp.add(this.touchUpHandler, this), sounds.startLevel(), this.game.world.setBounds(-Config.WIDTH, 0, 4 * Config.WIDTH, Config.HEIGHT), Config.USE_PARTICLES && (this.vfx = new App.VisualFX(this.game))
  3627. },
  3628. addStaticLink: function(a, b) {
  3629. var c = this.getDotById(a),
  3630. d = this.getDotById(b),
  3631. e = new App.StaticLink(this.game, this.linksGroup, c, d);
  3632. this.staticLinks.push(e)
  3633. },
  3634. removeStaticLink: function(a) {
  3635. var b = this.staticLinks.indexOf(a);
  3636. this.staticLinks.splice(b, 1), a.destroy()
  3637. },
  3638. getDotById: function(a) {
  3639. for (var b = 0; b < this.dots.length; b++) {
  3640. var c = this.dots[b];
  3641. if (c.id === a) return c
  3642. }
  3643. return null
  3644. },
  3645. touchDownHandler: function(a) {
  3646. if (!data.pausedByUser && this.touchInsideBounds(a.x, a.y))
  3647. if (this.drawLine) this.drawLine.startFollow();
  3648. else {
  3649. var b = Math.round(a.x),
  3650. c = Math.round(a.y),
  3651. d = this.getTapDotUnderPoint(b, c);
  3652. d && (this.partyDot(d), this.startDrawingLine(d))
  3653. }
  3654. },
  3655. partyDot: function(a) {
  3656. a.wobble(), sounds.playPiano(), Config.USE_PARTICLES && this.vfx.explodeStars(a.getX(), a.getY())
  3657. },
  3658. touchInsideBounds: function(a, b) {
  3659. var c = Config.TOUCH_BOUNDS.x,
  3660. d = Config.TOUCH_BOUNDS.y,
  3661. e = Config.TOUCH_BOUNDS.width,
  3662. f = Config.TOUCH_BOUNDS.height;
  3663. return a >= c && c + e >= a && b >= d && d + f >= b ? !0 : !1
  3664. },
  3665. fitPointInBounds: function(a, b) {
  3666. var c = Config.TOUCH_BOUNDS.x,
  3667. d = Config.TOUCH_BOUNDS.y,
  3668. e = Config.TOUCH_BOUNDS.width,
  3669. f = Config.TOUCH_BOUNDS.height;
  3670. return c > a ? a = c : a > c + e && (a = c + e), d > b ? b = d : b > d + f && (b = d + f), {
  3671. x: a,
  3672. y: b
  3673. }
  3674. },
  3675. startDrawingLine: function(a) {
  3676. this.drawLine = new App.DrawLine(this.game, a, this.parentGroup)
  3677. },
  3678. touchUpHandler: function() {
  3679. this.drawLine && this.drawLine.stopFollow()
  3680. },
  3681. getTapDotUnderPoint: function(a, b) {
  3682. for (var c = 40, d = void 0, e = 0; e < this.dots.length; e++) {
  3683. var f = this.dots[e],
  3684. g = a - f.getX(),
  3685. h = b - f.getY(),
  3686. i = Math.sqrt(g * g + h * h);
  3687. c >= i && (c = i, d = f)
  3688. }
  3689. return d
  3690. },
  3691. getNearestDotUnderPoint: function(a, b) {
  3692. for (var c = 30, d = void 0, e = 0; e < this.dots.length; e++) {
  3693. var f = this.dots[e];
  3694. if (f != this.drawLine.dot) {
  3695. var g = a - f.getX(),
  3696. h = b - f.getY(),
  3697. i = Math.sqrt(g * g + h * h);
  3698. c >= i && (c = i, d = f)
  3699. }
  3700. }
  3701. return d
  3702. },
  3703. getStaticLinkByDots: function(a, b) {
  3704. for (var c = 0; c < this.staticLinks.length; c++) {
  3705. var d = this.staticLinks[c];
  3706. if (d.a1 === a && d.a2 === b || d.a1 === b && d.a2 === a) return d
  3707. }
  3708. return null
  3709. },
  3710. update: function() {
  3711. if (this.drawLine && (this.drawLine.update(), this.drawLine.isFollowing())) {
  3712. var a = this.game.input.activePointer.worldX,
  3713. b = this.game.input.activePointer.worldY,
  3714. c = this.getNearestDotUnderPoint(a, b);
  3715. if (c) {
  3716. var d = this.getStaticLinkByDots(this.drawLine.dot, c);
  3717. if (d)
  3718. if (d.isArrow)
  3719. if (this.drawLine.dot === d.a1) this.connectTwoDots(c, d);
  3720. else {
  3721. var e = this.fitPointInBounds(a, b);
  3722. this.drawLine.setEndPos(e.x, e.y)
  3723. } else this.connectTwoDots(c, d);
  3724. else {
  3725. var e = this.fitPointInBounds(a, b);
  3726. this.drawLine.setEndPos(e.x, e.y)
  3727. }
  3728. } else {
  3729. var e = this.fitPointInBounds(a, b);
  3730. this.drawLine.setEndPos(e.x, e.y)
  3731. }
  3732. }
  3733. },
  3734. connectTwoDots: function(a, b) {
  3735. var c = new App.UserLink(this.game, this.linksGroup, this.drawLine.dot, a, b.isArrow);
  3736. this.userLinks.push(c), this.partyDot(a), this.drawLine.destroy(), this.drawLine = null, this.removeStaticLink(b), 0 == this.staticLinks.length ? this.playerSolvedLevel() : this.startDrawingLine(a)
  3737. },
  3738. playerSolvedLevel: function() {
  3739. sounds.play("sndLevelComplete"), this.game.input.onDown.remove(this.touchDownHandler, this), this.game.input.onUp.add(this.touchUpHandler, this), cmd.levelComplete()
  3740. },
  3741. undo: function() {
  3742. if (this.userLinks.length > 0) {
  3743. var a = this.userLinks.pop();
  3744. this.addStaticLink(a.a1.id, a.a2.id), this.drawLine.destroy(), this.startDrawingLine(a.a1), this.drawLine.stopFollow(), a.destroy()
  3745. } else this.drawLine && (this.drawLine.destroy(), this.drawLine = null)
  3746. }
  3747. }), App.Level = Class.extend({
  3748. init: function(a, b) {
  3749. this.id = a, this.data = b, this.reset()
  3750. },
  3751. reset: function() {
  3752. this.isCompleted = !1, this.isOpen = !1
  3753. },
  3754. complete: function() {
  3755. this.isCompleted = !0
  3756. },
  3757. getTitle: function() {
  3758. return this.data.name
  3759. }
  3760. });
  3761. var game, cmd, data, cookies, fader, stateSlider, parser, sounds, util;
  3762. App.Parser = Class.extend({
  3763. init: function() {},
  3764. generateLevel: function(a, b, c) {
  3765. this.game = a, this.parentGroup = b, this.game.add.sprite(0, 0, "background", 0, b), this.paper = new App.Paper(this.game, this.parentGroup);
  3766. var d = c.id + 1,
  3767. e = this.game.add.bitmapText(0, 0, "eras", d.toString(), 50, this.parentGroup);
  3768. e.x = Config.WIDTH / 2 - .5 * e.textWidth, e.y = Config.HEIGHT - 50, this.linksGroup = new Phaser.Group(this.game, this.parentGroup), this.dotsGroup = new Phaser.Group(this.game, this.parentGroup), this.parseLevelData(c.data);
  3769. var f = {
  3770. dotsGroup: this.dotsGroup,
  3771. linksGroup: this.linksGroup,
  3772. dots: this.dots,
  3773. staticLinks: this.staticLinks
  3774. };
  3775. return this.decorObj && this.paper.addDecor(this.decorObj.name, this.decorObj.x, this.decorObj.y), f
  3776. },
  3777. parseLevelData: function(a) {
  3778. this.dots = [], this.staticLinks = [];
  3779. var b, c = a.items,
  3780. d = a.links,
  3781. e = a.decor,
  3782. f = 6,
  3783. g = 1;
  3784. if (c)
  3785. for (b = 0; b < c.length; b++) {
  3786. var h = c[b],
  3787. i = h.id,
  3788. j = c[b].x,
  3789. k = c[b].y,
  3790. l = "dotBase" + g;
  3791. this.addDot(i, j, k, l), g++, g > f && (g = 1)
  3792. }
  3793. if (d)
  3794. for (b = 0; b < d.length; b++) this.addStaticLink(d[b].p1, d[b].p2, d[b].arrow);
  3795. if (this.decorObj = null, e) {
  3796. var m = e.name,
  3797. n = e.x,
  3798. o = e.y;
  3799. this.decorObj = {
  3800. name: m,
  3801. x: n,
  3802. y: o
  3803. }
  3804. }
  3805. },
  3806. addDot: function(a, b, c, d) {
  3807. var e = new App.Dot(this.game, this.dotsGroup, a, b, c, d);
  3808. this.dots.push(e)
  3809. },
  3810. addStaticLink: function(a, b, c) {
  3811. var d = this.getDotById(a),
  3812. e = this.getDotById(b),
  3813. f = new App.StaticLink(this.game, this.linksGroup, d, e, c);
  3814. this.staticLinks.push(f)
  3815. },
  3816. getDotById: function(a) {
  3817. for (var b = 0; b < this.dots.length; b++) {
  3818. var c = this.dots[b];
  3819. if (c.id === a) return c
  3820. }
  3821. return null
  3822. }
  3823. }), App.Sounds = Class.extend({
  3824. init: function() {
  3825. this.musicChannel = void 0
  3826. },
  3827. startMusic: function() {
  3828. Config.SOUNDS_ENABLED && (game.device.desktop ? (this.musicChannel = game.add.audio("music", 1, !0), this.musicChannel.play()) : game.device.webAudio && (this.musicChannel = game.add.audio("music", 1, !0), this.musicChannel.play()))
  3829. },
  3830. stopMusic: function() {
  3831. this.musicChannel && this.musicChannel.pause()
  3832. },
  3833. play: function(a, b) {
  3834. var c = 1;
  3835. void 0 != b && (c = b), Config.SOUNDS_ENABLED && (game.device.desktop ? game.sound.play(a, c) : game.device.webAudio && game.sound.play(a, c))
  3836. },
  3837. startLevel: function() {
  3838. this.pianoMin = 0, this.pianoMax = 23, this.pianoIndex = 2 + Math.floor(8 * Math.random()), this.pianoIncrement = 1
  3839. },
  3840. playPiano: function() {
  3841. Config.SOUNDS_ENABLED && (game.device.desktop ? data.sndPiano.play("note" + this.pianoIndex) : game.device.webAudio && data.sndPiano.play("note" + this.pianoIndex)), this.pianoIndex += this.pianoIncrement, this.pianoIndex == this.pianoMin - 1 ? (this.pianoIndex = this.pianoIndex + 1, this.pianoIncrement = 1) : this.pianoIndex == this.pianoMax + 1 && (this.pianoIndex = this.pianoMax - 1, this.pianoIncrement = -1)
  3842. }
  3843. }), App.Util = Class.extend({
  3844. init: function() {},
  3845. pulse: function(a, b) {
  3846. void 0 == b && (b = 1.2), game.add.tween(a.scale).to({
  3847. x: b,
  3848. y: b
  3849. }, 1e3, Phaser.Easing.Sinusoidal.InOut).to({
  3850. x: 1,
  3851. y: 1
  3852. }, 1e3, Phaser.Easing.Sinusoidal.InOut).loop().start()
  3853. },
  3854. wobble: function(a, b) {
  3855. void 0 == b && (b = 1);
  3856. for (var c = game.add.tween(a.scale), d = 0; b > d; d++) {
  3857. var c = c.to({
  3858. x: 1.2,
  3859. y: .8
  3860. }, 100, Phaser.Easing.Sinusoidal.InOut);
  3861. c.to({
  3862. x: 1,
  3863. y: 1
  3864. }, 100, Phaser.Easing.Sinusoidal.InOut)
  3865. }
  3866. c.start()
  3867. },
  3868. formatTime: function(a) {
  3869. var b = Math.floor(a / 1e3),
  3870. c = Math.floor(b / 3600),
  3871. d = Math.floor((b - 3600 * c) / 60),
  3872. e = b - 3600 * c - 60 * d;
  3873. return 10 > c && (c = "0" + c), 10 > d && (d = "0" + d), 10 > e && (e = "0" + e), d + ":" + e
  3874. },
  3875. randomizeArray: function(a) {
  3876. for (var b = [], c = a.length; c--;) {
  3877. var d = Math.floor(Math.random() * a.length),
  3878. e = a.splice(d, 1)[0];
  3879. b.unshift(e)
  3880. }
  3881. return b
  3882. }
  3883. }), App.BitmapLine = Class.extend({
  3884. init: function(a, b, c, d, e) {
  3885. this.game = a, this.group = b, this.bitmapAsset = c, this.startX = d, this.startY = e, this.bmdGroup = new Phaser.Group(this.game, this.group), this.bmdGroup.x = this.startX, this.bmdGroup.y = this.startY
  3886. },
  3887. createDynamicBitmap: function() {
  3888. this.bmdWidth = 800, this.bmdHeight = 18, this.bmd = this.game.add.bitmapData(this.bmdWidth, this.bmdHeight), this.game.add.sprite(0, -this.bmdHeight / 2, this.bmd, 0, this.bmdGroup)
  3889. },
  3890. createStaticBitmap: function(a, b) {
  3891. var c = a - this.startX,
  3892. d = b - this.startY,
  3893. e = Math.round(Math.sqrt(c * c + d * d)),
  3894. f = Math.atan2(d, c);
  3895. this.bmdWidth = e, this.bmdHeight = 18, this.bmd = this.game.add.bitmapData(this.bmdWidth, this.bmdHeight), this.game.add.sprite(0, -this.bmdHeight / 2, this.bmd, 0, this.bmdGroup), this.bmdGroup.rotation = f, this.render(a, b)
  3896. },
  3897. render: function(a, b) {
  3898. var c = a - this.startX,
  3899. d = b - this.startY,
  3900. e = Math.round(Math.sqrt(c * c + d * d));
  3901. if (e > 2) {
  3902. var f = Math.atan2(d, c);
  3903. this.bmdGroup.rotation = f, this.bmd.clear();
  3904. var g = new Phaser.Rectangle(0, 0, e, this.bmdHeight);
  3905. this.bmd.copyPixels(this.bitmapAsset, g, 0, 0)
  3906. }
  3907. }
  3908. }), App.CreditsView = App.Dialog.extend({
  3909. init: function(a) {
  3910. this._super(a, "creditsBox", {
  3911. x: 147,
  3912. y: 200,
  3913. blockBack: !0
  3914. }), this.closeBt = new App.MyButton(this.game, "closeButton", this.closeClick, this, {
  3915. x: 335,
  3916. y: 25,
  3917. center: !0,
  3918. parentGroup: this.boxHolder
  3919. });
  3920. var b = data.texts[data.lang].credits,
  3921. c = a.add.text(173, 70, b, {
  3922. font: "50px Fredericka the Great",
  3923. fill: "#373572",
  3924. align: "center"
  3925. }, this.boxHolder);
  3926. c.anchor.set(.5, .5), this.logoBt = new App.MyButton(this.game, "postepennoLogo", this.logoClick, this, {
  3927. x: 13,
  3928. y: 160,
  3929. parentGroup: this.boxHolder
  3930. });
  3931. var d = data.texts[data.lang].credits_code;
  3932. this.gameByTxt = new Phaser.Text(this.game, 125, 156, d, {
  3933. font: "bold 18px Arial"
  3934. }), this.boxHolder.add(this.gameByTxt);
  3935. var e = data.texts[data.lang].credits_art;
  3936. this.artTxt = new Phaser.Text(this.game, 125, 200, e, {
  3937. font: "bold 18px Arial"
  3938. }), this.boxHolder.add(this.artTxt)
  3939. },
  3940. closeClick: function() {
  3941. this.destroy()
  3942. },
  3943. logoClick: function() {
  3944. Play68.goHome();
  3945. }
  3946. }), App.DeleteProgressView = App.Dialog.extend({
  3947. init: function() {
  3948. this._super(game, "clearProgressBox", {
  3949. x: 147,
  3950. y: 200,
  3951. blockBack: !0
  3952. });
  3953. var a = data.texts[data.lang].clear_progress,
  3954. b = game.add.text(173, 70, a, {
  3955. font: "50px Fredericka the Great",
  3956. fill: "#373572",
  3957. align: "center"
  3958. }, this.boxHolder);
  3959. b.anchor.set(.5, .5), this.yesBt = new App.MyButton(this.game, "yesButton", this.yesClick, this, {
  3960. x: 85,
  3961. y: 245,
  3962. center: !0,
  3963. parentGroup: this.boxHolder
  3964. }), this.noBt = new App.MyButton(this.game, "noButton", this.noClick, this, {
  3965. x: 270,
  3966. y: 245,
  3967. center: !0,
  3968. parentGroup: this.boxHolder
  3969. })
  3970. },
  3971. yesClick: function() {
  3972. cookies.clear(), this.destroy()
  3973. },
  3974. noClick: function() {
  3975. this.destroy()
  3976. }
  3977. }), App.Dot = Class.extend({
  3978. init: function(a, b, c, d, e, f) {
  3979. this.game = a, this.id = c, this.baseAssetName = f, this.group = new Phaser.Group(this.game, b), this.group.x = d, this.group.y = e, this.lastSprite = void 0, this.setState(App.Dot.BASE)
  3980. },
  3981. getX: function() {
  3982. return this.group.x
  3983. },
  3984. getY: function() {
  3985. return this.group.y
  3986. },
  3987. setState: function(a) {
  3988. this.state = a, this.sprite && this.sprite.destroy(), this.setSprite(this.baseAssetName)
  3989. },
  3990. setSprite: function(a) {
  3991. this.sprite = data.addAtlasSprite(a, {
  3992. parent: this.group
  3993. }), this.sprite.pivot.x = .5 * this.sprite.width, this.sprite.pivot.y = .5 * this.sprite.height, this.group.addAt(this.sprite, 0)
  3994. },
  3995. setLast: function(a) {
  3996. 1 == a ? (this.lastSprite = new Phaser.Sprite(this.game, 0, 0, "dotLast"), this.lastSprite.anchor.set(.5, .5), this.group.add(this.lastSprite)) : 0 == a && this.lastSprite.destroy()
  3997. },
  3998. wobble: function() {
  3999. util.wobble(this.group, 2)
  4000. }
  4001. }), App.Dot.BASE = "AnchorBase", App.Dot.ACTIVE = "AnchorActive", App.Dot.VISITED = "AnchorVisited", App.DrawLine = Class.extend({
  4002. init: function(a, b, c) {
  4003. this.game = a, this.followPointer = !1, this.dot = b, this.ex = this.dot.getX(), this.ey = this.dot.getY(), this.group = new Phaser.Group(this.game, c), Config.BITMAP_LINES ? (this.view = new App.BitmapLine(this.game, this.group, "drawLine", this.ex, this.ey), this.view.createDynamicBitmap()) : this.view = new App.GraphicLine(this.game, this.group, "0xFF0000", this.ex, this.ey), this.endSprite = data.addAtlasSprite("drawLineEnd", {
  4004. parent: this.group
  4005. }), this.endSprite.anchor.set(.5, .5), this.render(), this.startFollow()
  4006. },
  4007. setEndPos: function(a, b) {
  4008. this.ex = a, this.ey = b, this.render()
  4009. },
  4010. render: function() {
  4011. this.view.render(this.ex, this.ey), this.endSprite.x = this.ex, this.endSprite.y = this.ey
  4012. },
  4013. update: function() {
  4014. this.endSprite.rotation += .1
  4015. },
  4016. startFollow: function() {
  4017. this.followPointer = !0
  4018. },
  4019. stopFollow: function() {
  4020. this.followPointer = !1
  4021. },
  4022. isFollowing: function() {
  4023. return this.followPointer
  4024. },
  4025. destroy: function() {
  4026. this.group.destroy()
  4027. }
  4028. }), App.FPS = Class.extend({
  4029. init: function(a, b) {
  4030. this.game = a, this.parentGroup = b, this.game.time.advancedTiming = !0, this.fpsTxt = new Phaser.Text(this.game, 0, 0, "FPS: XXX", {
  4031. font: "bold 20px Arial",
  4032. fill: "#FF0000"
  4033. }), this.parentGroup.add(this.fpsTxt), this.update(), this.game.time.events.loop(Phaser.Timer.SECOND, this.update, this)
  4034. },
  4035. update: function() {
  4036. this.fpsTxt.setText("FPS: " + this.game.time.fps)
  4037. }
  4038. }), App.Fader = Class.extend({
  4039. init: function(a) {
  4040. this.game = a
  4041. },
  4042. fade: function(a, b) {
  4043. this.callback = a, this.scope = b, this.pic = game.add.sprite(0, 0, "fader"), this.pic.alpha = 0, this.pic.inputEnabled = !0;
  4044. var c = game.add.tween(this.pic).to({
  4045. alpha: .8
  4046. }, 300, Phaser.Easing.Linear.None, !0);
  4047. c.onComplete.addOnce(this.fadeInComplete, this)
  4048. },
  4049. fadeInComplete: function() {
  4050. App.Fader.SHOULD_FADE_OUT = !0, this.callback.call(this.scope)
  4051. },
  4052. fadeOut: function() {
  4053. App.Fader.SHOULD_FADE_OUT = !1, this.pic = game.add.sprite(0, 0, "fader"), this.pic.inputEnabled = !0;
  4054. var a = game.add.tween(this.pic).to({
  4055. alpha: 0
  4056. }, 300, Phaser.Easing.Linear.None, !0);
  4057. a.onComplete.addOnce(this.fadeOutComplete, this)
  4058. },
  4059. fadeOutComplete: function() {
  4060. this.pic.destroy()
  4061. }
  4062. }), App.Fader.SHOULD_FADE_OUT = !1, App.GraphicLine = Class.extend({
  4063. init: function(a, b, c, d, e) {
  4064. this.game = a, this.group = b, this.color = c, this.startX = d, this.startY = e, this.g = new Phaser.Graphics(this.game, 0, 0), this.group.add(this.g)
  4065. },
  4066. render: function(a, b) {
  4067. this.g.clear(), this.g.lineStyle(5, this.color), this.g.moveTo(this.startX, this.startY), this.g.lineTo(a, b)
  4068. }
  4069. }), App.LevelItem = Class.extend({
  4070. init: function(a, b, c, d, e) {
  4071. if (this.game = a, this.level = c, this.parentGroup = b, this.group = new Phaser.Group(this.game, this.parentGroup), this.group.x = d, this.group.y = e, c.isOpen) {
  4072. var f, g = 0;
  4073. c.isCompleted ? (f = "levelItemCompleteBack", g = 3757085) : (f = "levelItemBack", g = 16777215), this.bt = new App.MyButton(this.game, f, this.click, this, {
  4074. center: !0,
  4075. parentGroup: this.group
  4076. });
  4077. var h = this.game.add.bitmapText(0, 0, "eras", (this.level.id + 1).toString(), 50, this.group);
  4078. h.x = .5 * -h.textWidth - 6, h.y = .3 * -h.textHeight - 6, h.tint = g
  4079. } else {
  4080. var i = data.addAtlasSprite("levelItemLockedBack", {
  4081. x: 0,
  4082. y: 0,
  4083. parent: this.group
  4084. });
  4085. i.anchor.set(.5, .5)
  4086. }
  4087. },
  4088. click: function() {
  4089. util.wobble(this.group), fader.fade(this.go, this)
  4090. },
  4091. go: function() {
  4092. cmd.levelStart(this.level.id)
  4093. }
  4094. }), App.LevelsGroup = Class.extend({
  4095. init: function(a, b, c) {
  4096. this.game = a, this.id = b, this.parentGroup = c, this.group = new Phaser.Group(this.game, this.parentGroup), this.group.y = this.id * Config.HEIGHT;
  4097. var d = 106,
  4098. e = 106;
  4099. this.rows = 4, this.cols = 4, this.boundsRect = {
  4100. x: 70,
  4101. y: 120,
  4102. width: 500,
  4103. height: 460
  4104. };
  4105. for (var f = this.rows * this.cols, g = (this.boundsRect.width - d) / (this.cols - 1), h = (this.boundsRect.height - e) / (this.rows - 1), i = this.id * f, j = (this.id + 1) * f, k = 0, l = i; j > l; l++) {
  4106. var m = data.levels[l];
  4107. if (m) {
  4108. var n = this.boundsRect.x + d / 2 + k % this.cols * g,
  4109. o = this.boundsRect.y + e / 2 + Math.floor(k / this.cols) * h;
  4110. new App.LevelItem(this.game, this.group, m, n, o)
  4111. }
  4112. k++
  4113. }
  4114. },
  4115. drawBounds: function() {
  4116. this.g = game.add.graphics(0, 0, this.group), this.g.clear(), this.g.lineStyle(5, this.color), this.g.drawRect(this.boundsRect.x, this.boundsRect.y, this.boundsRect.width, this.boundsRect.height)
  4117. }
  4118. }), App.MyButton = Class.extend({
  4119. init: function(a, b, c, d, e) {
  4120. this.game = a;
  4121. var f = 0,
  4122. g = 0;
  4123. this.callback = c, this.callbackContext = d;
  4124. var h = !1,
  4125. i = a.world,
  4126. j = !0;
  4127. if (this.wobble = !1, e && (void 0 != e.x && (f = e.x), void 0 != e.y && (g = e.y), 1 == e.center && (h = !0), void 0 != e.parentGroup && (i = e.parentGroup), e.atlas === !1 && (j = !1), 1 == e.wobble && (this.wobble = !0)), j) {
  4128. var k = data.getAtlasKey(b);
  4129. this.bt = a.add.button(f, g, data.atlasName, this.clickHandler, this, k, k, k, k, i)
  4130. } else this.bt = a.add.button(f, g, b, this.clickHandler, this, null, null, null, null, i);
  4131. this.bt.input.useHandCursor = !0, h && this.bt.anchor.set(.5, .5)
  4132. },
  4133. clickHandler: function() {
  4134. sounds.play("sndClick"), this.wobble && util.wobble(this.bt), this.callback.call(this.callbackContext)
  4135. },
  4136. scaleHide: function() {
  4137. this.game.add.tween(this.bt.scale).to({
  4138. x: 0,
  4139. y: 0
  4140. }, 200, Phaser.Easing.Linear.None, !0)
  4141. },
  4142. scaleShow: function() {
  4143. this.game.add.tween(this.bt.scale).to({
  4144. x: 1,
  4145. y: 1
  4146. }, 200, Phaser.Easing.Linear.None, !0)
  4147. },
  4148. hide: function() {
  4149. this.bt.scale.x = this.bt.scale.y = 0
  4150. },
  4151. show: function() {
  4152. this.bt.scale.x = this.bt.scale.y = 1
  4153. },
  4154. disableClick: function() {
  4155. this.bt.inputEnabled = !1
  4156. },
  4157. enableClick: function() {
  4158. this.bt.inputEnabled = !0
  4159. }
  4160. }), App.Paper = Class.extend({
  4161. init: function(a, b) {
  4162. this.game = a, this.parentGroup = b
  4163. },
  4164. addDecor: function(a, b, c) {
  4165. data.addAtlasSprite(a, {
  4166. x: b,
  4167. y: c,
  4168. parent: this.parentGroup
  4169. })
  4170. }
  4171. }), App.PauseView = App.Dialog.extend({
  4172. init: function(a) {
  4173. this.parentState = a, this._super(game, "pauseBox", {
  4174. x: 147,
  4175. y: 200,
  4176. blockBack: !0
  4177. });
  4178. var b = data.texts[data.lang].pause,
  4179. c = game.add.text(173, 70, b, {
  4180. font: "50px Fredericka the Great",
  4181. fill: "#373572",
  4182. align: "center"
  4183. }, this.boxHolder);
  4184. c.anchor.set(.5, .5), this.exitBt = new App.MyButton(this.game, "levelsButton", this.exitClick, this, {
  4185. x: 96,
  4186. y: 212,
  4187. center: !0,
  4188. parentGroup: this.boxHolder,
  4189. wobble: !0
  4190. }), this.nextBt = new App.MyButton(this.game, "nextButton", this.resumeClick, this, {
  4191. x: 252,
  4192. y: 210,
  4193. center: !0,
  4194. parentGroup: this.boxHolder
  4195. }), this.startTime = game.time.now, data.pausedByUser = !0
  4196. },
  4197. exitClick: function() {
  4198. data.pausedByUser = !1, fader.fade(this.gotoMenu, this)
  4199. },
  4200. gotoMenu: function() {
  4201. game.state.start("LevelSelect")
  4202. },
  4203. resumeClick: function() {
  4204. data.pausedByUser = !1, data.pauseTime += Math.round(game.time.now - this.startTime), this.parentState.resumeGame(), this.destroy()
  4205. }
  4206. }), App.SoundIcon = Class.extend({
  4207. init: function(a, b) {
  4208. var c = 0,
  4209. d = 0,
  4210. e = 1,
  4211. f = a.world;
  4212. void 0 != b && (void 0 != b.x && (c = b.x), void 0 != b.y && (d = b.y), void 0 != b.scale && (e = b.scale), void 0 != b.parentGroup && (f = b.parentGroup)), this.group = a.add.group(f), this.group.x = c, this.group.y = d, this.group.scale.x = this.group.scale.y = e, this.btOn = new App.MyButton(a, "soundIconOn", this.sndClick, this, {
  4213. center: !0,
  4214. parentGroup: this.group
  4215. }), this.btOff = new App.MyButton(a, "soundIconOff", this.sndClick, this, {
  4216. center: !0,
  4217. parentGroup: this.group
  4218. }), this.updateIcon(), a.device.desktop || a.device.webAudio || this.hide()
  4219. },
  4220. updateIcon: function() {
  4221. Config.SOUNDS_ENABLED ? (this.btOn.show(), this.btOff.hide()) : (this.btOn.hide(), this.btOff.show())
  4222. },
  4223. hide: function() {
  4224. this.group.visible = !1
  4225. },
  4226. sndClick: function() {
  4227. Config.SOUNDS_ENABLED = !Config.SOUNDS_ENABLED, Config.SOUNDS_ENABLED ? sounds.startMusic() : sounds.stopMusic(), cookies.saveSound(), this.updateIcon(), util.wobble(this.group)
  4228. },
  4229. disableClick: function() {
  4230. this.btOn.disableClick(), this.btOff.disableClick()
  4231. }
  4232. }), App.StateSlider = Class.extend({
  4233. init: function() {
  4234. this.transitionTime = 1500, this.easingIn = Phaser.Easing.Cubic.In, this.easingOut = Phaser.Easing.Cubic.Out
  4235. },
  4236. levelComplete: function() {
  4237. var a = data.curLevel.id,
  4238. b = data.levels[a + 1];
  4239. b ? this.slideToNextLevel(b) : cmd.gameComplete()
  4240. },
  4241. slideToNextLevel: function(a) {
  4242. var b = game.state.getCurrentState().getCoreGroup();
  4243. this.transitionGroup = new Phaser.Group(game, b), this.transitionGroup.x = Config.WIDTH, parser.generateLevel(game, this.transitionGroup, a);
  4244. var c = new Phaser.Tween(game.camera, game, game.tweens);
  4245. c.to({
  4246. x: Config.WIDTH
  4247. }, this.transitionTime, Phaser.Easing.Cubic.InOut), c.onComplete.addOnce(this.levelSlideComplete, this), c.start()
  4248. },
  4249. levelSlideComplete: function() {
  4250. var a = data.curLevel.id + 1;
  4251. cmd.levelStart(a)
  4252. }
  4253. }), App.StaticLink = Class.extend({
  4254. init: function(a, b, c, d, e) {
  4255. this.game = a, this.a1 = c, this.a2 = d, this.isArrow = e, this.group = new Phaser.Group(this.game, b);
  4256. var f = this.a1.getX(),
  4257. g = this.a1.getY(),
  4258. h = this.a2.getX(),
  4259. i = this.a2.getY();
  4260. if (Config.BITMAP_LINES ? (this.view = new App.BitmapLine(this.game, this.group, "staticLink", f, g), this.view.createStaticBitmap(h, i)) : (this.view = new App.GraphicLine(this.game, this.group, "0x999999", f, g), this.view.render(h, i)), this.isArrow) {
  4261. var j = h - f,
  4262. k = i - g,
  4263. l = Math.atan2(k, j),
  4264. m = data.addAtlasSprite("arrow", {
  4265. x: f + j / 2,
  4266. y: g + k / 2,
  4267. parent: this.group
  4268. });
  4269. m.anchor.set(.5, .5), m.rotation = l
  4270. }
  4271. },
  4272. destroy: function() {
  4273. this.group.destroy()
  4274. }
  4275. }), App.Tutorial = Class.extend({
  4276. init: function(a) {
  4277. this.game = a;
  4278. var b = Config.WIDTH / 2;
  4279. if (0 == data.curLevel.id) this.addText(data.texts[data.lang].tutorial1, {
  4280. x: b,
  4281. y: 130,
  4282. delay: 500
  4283. });
  4284. else if (1 == data.curLevel.id) {
  4285. var c = {
  4286. font: "20px Arial",
  4287. fill: "#000000",
  4288. align: "center"
  4289. };
  4290. this.addText(data.texts[data.lang].tutorial2a, {
  4291. x: 450,
  4292. y: 100,
  4293. delay: 1e3,
  4294. style: c
  4295. }), this.addText(data.texts[data.lang].tutorial2b, {
  4296. x: 570,
  4297. y: 100,
  4298. delay: 2e3,
  4299. style: c
  4300. })
  4301. } else 16 == data.curLevel.id && this.addText(data.texts[data.lang].tutorial3, {
  4302. x: b,
  4303. y: 150,
  4304. delay: 500
  4305. })
  4306. },
  4307. addSprite: function(a, b, c) {
  4308. var d = data.addAtlasSprite(a, {
  4309. x: b,
  4310. y: c - 10
  4311. });
  4312. d.alpha = 0, game.add.tween(d).to({
  4313. alpha: 1,
  4314. y: c
  4315. }, 1e3, Phaser.Easing.Quadratic.Out, !0)
  4316. },
  4317. addText: function(a, b) {
  4318. var c = 0,
  4319. d = 0,
  4320. e = 500,
  4321. f = {
  4322. font: "34px Arial",
  4323. fill: "#000000"
  4324. };
  4325. b && (void 0 != b.x && (c = b.x), void 0 != b.y && (d = b.y), void 0 != b.delay && (e = b.delay), void 0 != b.style && (f = b.style));
  4326. var g = this.game.add.text(c, d, a, f);
  4327. g.align = "center", g.anchor.set(.5, 0), g.alpha = 0, g.y -= 10, this.game.add.tween(g).delay(e).to({
  4328. alpha: 1,
  4329. y: d
  4330. }, 1e3, Phaser.Easing.Quadratic.Out, !0)
  4331. }
  4332. }), App.UserLink = Class.extend({
  4333. init: function(a, b, c, d, e) {
  4334. this.game = a, this.a1 = c, this.a2 = d, this.isArrow = e, this.group = new Phaser.Group(this.game, b);
  4335. var f = this.a1.getX(),
  4336. g = this.a1.getY(),
  4337. h = this.a2.getX(),
  4338. i = this.a2.getY();
  4339. if (Config.BITMAP_LINES ? (this.view = new App.BitmapLine(this.game, this.group, "userLink", this.a1.getX(), this.a1.getY()), this.view.createStaticBitmap(d.getX(), d.getY())) : (this.view = new App.GraphicLine(this.game, this.group, "0x000000", this.a1.getX(), this.a1.getY()), this.view.render(this.a2.getX(), this.a2.getY())), this.isArrow) {
  4340. var j = h - f,
  4341. k = i - g,
  4342. l = Math.atan2(k, j),
  4343. m = data.addAtlasSprite("arrow", {
  4344. x: f + j / 2,
  4345. y: g + k / 2,
  4346. parent: this.group
  4347. });
  4348. m.anchor.set(.5, .5), m.rotation = l
  4349. }
  4350. },
  4351. destroy: function() {
  4352. this.group.destroy()
  4353. }
  4354. }), App.VisualFX = Class.extend({
  4355. init: function(a) {
  4356. this.game = a, this.emitter = this.game.add.emitter(0, 0, 100);
  4357. for (var b = [], c = 1; 4 >= c; c++) b.push("pics/starParticle" + c + "_0000");
  4358. this.emitter.makeParticles("pics", b), this.emitter.gravity = 0, this.emitter.setAlpha(1, 0, 4e3), this.emitter.setScale(.3, 1.5, .3, 1.5, 2e3), this.emitter.forEach(this.tune, this, !1)
  4359. },
  4360. tune: function(a) {
  4361. a.anchor.set(0, 0), a.pivot.x = .5 * a.width, a.pivot.y = .5 * a.height
  4362. },
  4363. explodeStars: function(a, b) {
  4364. this.emitter.x = a, this.emitter.y = b, this.emitter.start(!0, 2e3, null, 5)
  4365. }
  4366. }), App.BootState = function() {}, App.BootState.prototype = {
  4367. preload: function() {
  4368. this.load.image("preloadBar", "assets/images/preloadBar.png"), this.load.image("preloadBarHolder", "assets/images/preloadBarHolder.png"), this.load.image("background", "assets/images/background.jpg"), game.stage.backgroundColor = "#EBE7DA"
  4369. },
  4370. create: function() {
  4371. this.game.input.maxPointers = 1, this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL, this.game.scale.pageAlignHorizontally = !0, this.game.scale.pageAlignVertically = !0, this.game.scale.enterPortrait.add(this.rescale, this), this.game.scale.enterLandscape.add(this.rescale, this), this.game.scale.setScreenSize(!0), SG_Hooks.setOrientationHandler(this.rescale), SG_Hooks.setResizeHandler(this.rescale), Config.TRANSPARENT && (this.game.world.alpha = .5), this.game.device.android && !this.game.device.chrome && (Config.BITMAP_LINES = !1, Config.USE_PARTICLES = !1), this.game.state.start("Preloader")
  4372. },
  4373. rescale: function() {
  4374. var a = this.game;
  4375. setTimeout(function() {
  4376. a.scale.refresh()
  4377. }, 500)
  4378. }
  4379. }, App.GameCompleteState = function() {}, App.GameCompleteState.prototype = {
  4380. create: function() {
  4381. this.add.sprite(0, 0, "gameCompleteBack.jpg"), this.backBt = new App.MyButton(this.game, "homeButton", this.backClick, this, {
  4382. x: 116,
  4383. y: 640,
  4384. center: !0,
  4385. wobble: !0
  4386. }), this.tweenAlphaButton(this.backBt.bt, 2e3), App.Fader.SHOULD_FADE_OUT && fader.fadeOut()
  4387. },
  4388. tweenAlphaButton: function(a, b) {
  4389. a.alpha = 0, this.add.tween(a).to({
  4390. alpha: 1
  4391. }, 500, Phaser.Easing.Linear.None, !0, b)
  4392. },
  4393. backClick: function() {
  4394. fader.fade(this.gotoMenu, this)
  4395. },
  4396. gotoMenu: function() {
  4397. game.state.start("MainMenu")
  4398. }
  4399. }, App.GameplayState = function() {}, App.GameplayState.prototype = {
  4400. create: function() {
  4401. this.coreGroup = new Phaser.Group(this.game, this.game.world);
  4402. var a = parser.generateLevel(this.game, this.coreGroup, data.curLevel);
  4403. this.logic = new App.GameLogic(this.game, this.coreGroup, a.dotsGroup, a.linksGroup, a.dots, a.staticLinks), this.uiGroup = new Phaser.Group(this.game, this.game.world), this.uiGroup.fixedToCamera = !0, this.restartBt = new App.MyButton(this.game, "restartButton", this.restartClick, this, {
  4404. x: 454,
  4405. y: 52,
  4406. center: !0,
  4407. parentGroup: this.uiGroup
  4408. }), this.pauseBt = new App.MyButton(this.game, "pauseButton", this.pauseClick, this, {
  4409. x: 79,
  4410. y: 53,
  4411. center: !0,
  4412. parentGroup: this.uiGroup,
  4413. wobble: !0
  4414. }), this.undoBt = new App.MyButton(this.game, "undoButton", this.undoClick, this, {
  4415. x: 572,
  4416. y: 52,
  4417. center: !0,
  4418. parentGroup: this.uiGroup,
  4419. wobble: !0
  4420. }), this.soundIcon = new App.SoundIcon(this.game, {
  4421. x: 197,
  4422. y: 56,
  4423. parentGroup: this.uiGroup
  4424. }), Config.ENABLE_CHEAT && (this.cheatBt = new App.MyButton(this.game, "cheatButton", this.cheatClick, this, {
  4425. x: 320,
  4426. y: 56,
  4427. center: !0,
  4428. parentGroup: this.uiGroup
  4429. })), Config.SHOW_FPS && (this.fps = new App.FPS(this.game, this.uiGroup)), this.game.onPause.add(this.globalPauseOn, this), this.game.onResume.add(this.globalPauseOff, this), this.tutorial = new App.Tutorial(this.game), App.Fader.SHOULD_FADE_OUT && fader.fadeOut()
  4430. },
  4431. cheatClick: function() {
  4432. cmd.levelComplete()
  4433. },
  4434. undoClick: function() {
  4435. this.logic.undo()
  4436. },
  4437. globalPauseOn: function() {
  4438. this.globalPauseStart = game.time.now
  4439. },
  4440. globalPauseOff: function() {
  4441. data.pausedByUser || (data.pauseTime += Math.round(game.time.now - this.globalPauseStart))
  4442. },
  4443. addTimerEvent: function() {
  4444. this.timerEvent = this.game.time.events.loop(Phaser.Timer.SECOND, this.updateUI, this)
  4445. },
  4446. removeTimerEvent: function() {
  4447. this.game.time.events.remove(this.timerEvent)
  4448. },
  4449. updateUI: function() {
  4450. this.timer.setTime(data.getLevelTime())
  4451. },
  4452. levelComplete: function() {
  4453. this.disableButtons()
  4454. },
  4455. disableButtons: function() {
  4456. this.undoBt.disableClick(), this.soundIcon.disableClick(), this.restartBt.disableClick(), this.pauseBt.disableClick()
  4457. },
  4458. getCoreGroup: function() {
  4459. return this.coreGroup
  4460. },
  4461. update: function() {
  4462. this.logic.update()
  4463. },
  4464. restartClick: function() {
  4465. cmd.levelStart(data.curLevel.id, !1)
  4466. },
  4467. pauseClick: function() {
  4468. this.removeTimerEvent(), this.pauseView = new App.PauseView(this)
  4469. },
  4470. resumeGame: function() {}
  4471. }, App.LevelSelectState = function() {}, App.LevelSelectState.prototype = {
  4472. create: function() {
  4473. this.add.sprite(0, 0, "background"), this.itemsHolder = new Phaser.Group(this.game, this.game.world), this.groupsNum = 2;
  4474. for (var a = 0; a < this.groupsNum; a++) {
  4475. new App.LevelsGroup(this.game, a, this.itemsHolder)
  4476. }
  4477. var b = data.texts[data.lang].select_level,
  4478. c = game.add.text(Config.WIDTH / 2, 70, b, {
  4479. font: "50px Fredericka the Great",
  4480. fill: "#373572"
  4481. });
  4482. c.anchor.set(.5, .5), this.homeBt = new App.MyButton(this.game, "homeButton", this.homeClick, this, {
  4483. x: 113,
  4484. y: 660,
  4485. center: !0,
  4486. wobble: !0
  4487. }), this.scrollUp = new App.MyButton(this.game, "upButton", this.scrollUpClick, this, {
  4488. x: 555,
  4489. y: 650,
  4490. center: !0
  4491. }), this.scrollDown = new App.MyButton(this.game, "downButton", this.scrollDownClick, this, {
  4492. x: 445,
  4493. y: 650,
  4494. center: !0
  4495. }), this.itemsHolder.y = -Config.HEIGHT * App.LevelSelectState.CURRENT_GROUP_ID, 0 == App.LevelSelectState.CURRENT_GROUP_ID ? this.scrollUp.hide() : App.LevelSelectState.CURRENT_GROUP_ID == this.groupsNum - 1 && this.scrollDown.hide(), App.Fader.SHOULD_FADE_OUT && fader.fadeOut()
  4496. },
  4497. scrollUpClick: function() {
  4498. 1 == App.LevelSelectState.CURRENT_GROUP_ID && this.scrollUp.scaleHide(), App.LevelSelectState.CURRENT_GROUP_ID == this.groupsNum - 1 && this.scrollDown.scaleShow(), App.LevelSelectState.CURRENT_GROUP_ID--, this.scrollUp.disableClick(), this.scrollDown.disableClick();
  4499. var a = this.game.add.tween(this.itemsHolder);
  4500. a.to({
  4501. y: -Config.HEIGHT * App.LevelSelectState.CURRENT_GROUP_ID
  4502. }, 500, Phaser.Easing.Quadratic.InOut, !0), a.onComplete.addOnce(this.scrollComplete, this)
  4503. },
  4504. scrollDownClick: function() {
  4505. 0 == App.LevelSelectState.CURRENT_GROUP_ID && this.scrollUp.scaleShow(), App.LevelSelectState.CURRENT_GROUP_ID == this.groupsNum - 2 && this.scrollDown.scaleHide(), App.LevelSelectState.CURRENT_GROUP_ID++, this.scrollUp.disableClick(), this.scrollDown.disableClick();
  4506. var a = this.game.add.tween(this.itemsHolder);
  4507. a.to({
  4508. y: -Config.HEIGHT * App.LevelSelectState.CURRENT_GROUP_ID
  4509. }, 500, Phaser.Easing.Quadratic.InOut, !0), a.onComplete.addOnce(this.scrollComplete, this)
  4510. },
  4511. scrollComplete: function() {
  4512. this.scrollUp.enableClick(), this.scrollDown.enableClick()
  4513. },
  4514. homeClick: function() {
  4515. fader.fade(this.gotoMainMenu, this)
  4516. },
  4517. gotoMainMenu: function() {
  4518. this.game.state.start("MainMenu")
  4519. }
  4520. }, App.LevelSelectState.CURRENT_GROUP_ID = 0, App.MainMenuState = function() {}, App.MainMenuState.prototype = {
  4521. create: function() {
  4522. this.add.sprite(0, 0, "background"), this.title = data.addAtlasSprite("gameTitle", {
  4523. x: 250,
  4524. y: 19
  4525. }), this.playBt = new App.MyButton(this.game, "playButton2", this.playClick, this, {
  4526. x: 490,
  4527. y: 390,
  4528. center: !0
  4529. }), util.pulse(this.playBt.bt, 1.1), this.character = data.addAtlasSprite("menuCharacter", {
  4530. x: 40,
  4531. y: 30
  4532. }), this.soundIcon = new App.SoundIcon(this.game, {
  4533. x: 65,
  4534. y: 660
  4535. }), this.deleteProgressBt = new App.MyButton(this.game, "clearProgressButton", this.deleteProgressClick, this, {
  4536. x: 554,
  4537. y: 638,
  4538. center: !0,
  4539. wobble: !0
  4540. }), this.creditsBt = new App.MyButton(this.game, "creditsButton", this.creditsClick, this, {
  4541. x: 438,
  4542. y: 638,
  4543. center: !0,
  4544. wobble: !0
  4545. }), this.moreGames = new App.MyButton(this.game, "moreGamesButton", this.moreGamesClick, this, {
  4546. x: 320,
  4547. y: 638,
  4548. center: !0,
  4549. wobble: !0
  4550. });
  4551. var a = "v " + Config.VERSION;
  4552. this.add.text(5, Config.HEIGHT - 15, a, {
  4553. font: "12px Arial",
  4554. fill: "#000000"
  4555. }), Config.SHOW_FPS && (this.fps = new App.FPS(this.game, this.game.world)), Config.RELEASE || this.add.text(20, 30, "DEVELOPMENT VERSION", {
  4556. font: "30px Arial",
  4557. fill: "#FF0000"
  4558. });
  4559. var b = game.add.text(300, 250, "SELECT LEVEL", {
  4560. font: "32px Fredericka the Great",
  4561. fill: "#373572"
  4562. });
  4563. b.visible = !1, this.showWithTweens(), App.Fader.SHOULD_FADE_OUT && fader.fadeOut()
  4564. },
  4565. moreGamesClick: function() {
  4566. //window.open("http://m.softgames.de", "_blank")
  4567. // clickMore();
  4568. Play68.goHome();
  4569. },
  4570. showWithTweens: function() {
  4571. this.title.alpha = 0, this.add.tween(this.title).to({
  4572. alpha: 1
  4573. }, 800, Phaser.Easing.Linear.None, !0), this.character.alpha = 0, this.add.tween(this.character).to({
  4574. alpha: 1
  4575. }, 800, Phaser.Easing.Linear.None, !0, 500), this.tweenScaleButton(this.soundIcon.group, 1300), this.tweenScaleButton(this.moreGames.bt, 1500), this.tweenScaleButton(this.creditsBt.bt, 1700), this.tweenScaleButton(this.deleteProgressBt.bt, 1900), this.tweenAlphaButton(this.playBt.bt, 2100)
  4576. },
  4577. tweenScaleButton: function(a, b) {
  4578. a.scale.x = a.scale.y = 0, this.add.tween(a.scale).to({
  4579. x: 1,
  4580. y: 1
  4581. }, 500, Phaser.Easing.Back.Out, !0, b)
  4582. },
  4583. tweenAlphaButton: function(a, b) {
  4584. a.alpha = 0, this.add.tween(a).to({
  4585. alpha: 1
  4586. }, 500, Phaser.Easing.Linear.None, !0, b)
  4587. },
  4588. playClick: function() {
  4589. fader.fade(this.startGame, this)
  4590. },
  4591. startGame: function() {
  4592. cmd.gameStart()
  4593. },
  4594. deleteProgressClick: function() {
  4595. new App.DeleteProgressView(this.game)
  4596. },
  4597. creditsClick: function() {
  4598. new App.CreditsView(this.game)
  4599. }
  4600. }, App.PreloaderState = function() {}, App.PreloaderState.prototype = {
  4601. preload: function() {
  4602. this.add.sprite(0, 0, "background");
  4603. var a, b = ["fader", "blackBack", "creditsBox", "clearProgressBox", "staticLink", "userLink", "drawLine", "pauseBox", "gameCompleteBack.jpg"],
  4604. c = ["sndClick", "sndLevelComplete", "sndPiano", "music"];
  4605. for (a = 0; a < b.length; a++) {
  4606. var d = -1 == b[a].indexOf(".jpg") ? b[a] + ".png" : b[a];
  4607. this.load.image(b[a], "assets/images/" + d)
  4608. }
  4609. for (a = 0; a < c.length; a++) {
  4610. var e = c[a] + ".mp3",
  4611. f = c[a] + ".ogg";
  4612. this.load.audio(c[a], ["assets/sounds/" + e, "assets/sounds/" + f])
  4613. }
  4614. this.load.atlasJSONHash("pics", "assets/images/pics.png", "assets/images/pics.json"), this.load.bitmapFont("eras", "assets/fonts/eras.png", "assets/fonts/eras.fnt"), this.load.text("textData", "release/TextData.json"), this.holder = this.game.add.group(), this.preloadBar = this.add.sprite(60, 269, "preloadBar", null, this.holder), this.add.sprite(60, 264, "preloadBarHolder", null, this.holder), this.progressTxt = this.game.add.text(Config.WIDTH / 2, 210, "0%", {
  4615. font: "bold 50px Arial",
  4616. fill: "#432291"
  4617. }, this.holder), this.progressTxt.anchor.set(.5, 0), this.load.setPreloadSprite(this.preloadBar), this.load.onFileComplete.add(this.fileLoaded, this)
  4618. },
  4619. fileLoaded: function(a) {
  4620. this.progressTxt.setText(a + "%")
  4621. },
  4622. create: function() {
  4623. this.preloaderComplete()
  4624. },
  4625. preloaderComplete: function() {
  4626. var a = SG.lang; //SG_Hooks.getLanguage(["en", "ru"]);
  4627. fader = new App.Fader(this.game), cmd = new App.Commands, data = new App.Data(a), cookies = new App.Cookies, sounds = new App.Sounds, sounds.startMusic(), stateSlider = new App.StateSlider, parser = new App.Parser, util = new App.Util, this.game.state.start("MainMenu")
  4628. }
  4629. };