human.min.js 79 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446
  1. import * as PIXI from './pixi';
  2. import { Howl, Howler } from './howler.min';
  3. import gamen from './gamen';
  4. import { TimelineLite, Sine, TweenMax } from './TweenMax.min'
  5. import { pixelRatioX, pixelRatioY, windowWidth, windowHeight } from './fitConfig';
  6. var GD, DataManager, GamePadManager;
  7. var GAME_IMG_PATH = 'https://pub.dwstatic.com/wxgame/puzzletrip/';
  8. var COMMON_IMG_PATH = 'https://pub.dwstatic.com/wxgame/puzzletrip/human/';
  9. var RES_DIR_SOUND = GAME_IMG_PATH + 'sound/';
  10. // source code version
  11. var CACHE_VER = 0.2;
  12. var IMG_VERSION = CACHE_VER;
  13. var SOUND_VERSION = CACHE_VER;
  14. !function (t) {
  15. function e(n) {
  16. if (i[n])
  17. return i[n].exports;
  18. var o = i[n] = {
  19. i: n,
  20. l: !1,
  21. exports: {}
  22. };
  23. return t[n].call(o.exports, o, o.exports, e),
  24. o.l = !0,
  25. o.exports
  26. }
  27. var i = {};
  28. return e.m = t,
  29. e.c = i,
  30. e.d = function (t, i, n) {
  31. e.o(t, i) || Object.defineProperty(t, i, {
  32. configurable: !1,
  33. enumerable: !0,
  34. get: n
  35. })
  36. }
  37. ,
  38. e.n = function (t) {
  39. var i = t && t.__esModule ? function () {
  40. return t["default"]
  41. }
  42. : function () {
  43. return t
  44. }
  45. ;
  46. return e.d(i, "a", i),
  47. i
  48. }
  49. ,
  50. e.o = function (t, e) {
  51. return Object.prototype.hasOwnProperty.call(t, e)
  52. }
  53. ,
  54. e.p = "",
  55. e(e.s = 0)
  56. }([function (t, e, i) {
  57. i(1),
  58. i(2),
  59. i(3),
  60. i(4),
  61. i(5),
  62. i(6),
  63. i(7),
  64. i(8),
  65. i(9),
  66. i(10),
  67. i(11),
  68. i(12),
  69. i(13),
  70. i(14)
  71. }
  72. , function (t, e) {
  73. GD = {
  74. loader: null,
  75. stats: null,
  76. width: 504,
  77. height: 861,
  78. leng: "ko",
  79. isMobile: !1,
  80. isDebug: !1,
  81. isShowLog: !1,
  82. isLogin: !1,
  83. unique: null,
  84. pk: null,
  85. sKey: null,
  86. oKey: null,
  87. startTime: null,
  88. medal: [],
  89. soundType: 1,
  90. isAllSound: !0,
  91. isBgmSound: !0,
  92. isEffectSound: !0,
  93. isShowPadGuide: !0,
  94. orientationType: null,
  95. orientationGuide: null,
  96. sound: {},
  97. darkBg: null,
  98. stage: null,
  99. commonIntro: null,
  100. commonOption: null,
  101. tutorial: null,
  102. loading: null
  103. },
  104. GD.init = function (t, e, i, n, o, backgroundColor) {
  105. var gWidth = windowWidth * pixelRatioX
  106. var gHeight = windowHeight * pixelRatioY
  107. GD.width = gWidth
  108. GD.height = gHeight
  109. GD.leng = gamen.game_language
  110. var app = GD.app = new PIXI.Application({
  111. width: gWidth,
  112. height: gHeight,
  113. forceCanvas: true,
  114. backgroundColor: backgroundColor,
  115. clearBeforeRender: false,
  116. resolution: 2,
  117. view: canvas
  118. })
  119. app.renderer.plugins.interaction.mapPositionToPoint = (point, x, y) => {
  120. point.x = x * pixelRatioX
  121. point.y = y * pixelRatioY
  122. }
  123. // requestAnimationFrame(this.update)
  124. this.renderer = app.renderer
  125. this.stage = app.stage
  126. // this.resize()
  127. this.setSpriteTexture()
  128. this.resourceLoad()
  129. }
  130. ,
  131. GD.resourceLoad = function () {
  132. var t = COMMON_IMG_PATH + "image/json/";
  133. GD.loader = PIXI.loader,
  134. GD.loader.add(t + "human_common.json"),
  135. GD.loader.add(t + "human_popup_" + this.leng + ".json")
  136. }
  137. ,
  138. GD.showProgress = function () {
  139. GD.progress || (GD.progress = new GD.Progress),
  140. GD.progress.show(),
  141. this.stage.addChild(GD.progress)
  142. }
  143. ,
  144. GD.hideProgress = function () {
  145. GD.progress.hide(),
  146. this.stage.removeChild(GD.progress)
  147. }
  148. ,
  149. GD.resize = function () {
  150. if (GD.renderer) {
  151. var t = GD.width / GD.height
  152. , e = window.innerWidth
  153. , i = window.innerHeight
  154. , n = e / i;
  155. if ($("#gamecontainer")[0]) {
  156. var o = document.getElementById("gamecontainer");
  157. o.style.color = "#FF0000",
  158. n > t ? (e = i * t,
  159. o.style.width = e + "px",
  160. o.style.height = i + "px",
  161. GD.renderer.view.style.width = e + "px",
  162. GD.renderer.view.style.height = i + "px") : (i = e / t,
  163. o.style.width = e + "px",
  164. o.style.height = i + "px",
  165. GD.renderer.view.style.width = e + "px",
  166. GD.renderer.view.style.height = i + "px")
  167. } else
  168. n > t ? e = i * t : i = e / t,
  169. this.renderer.view.style.width = e + "px",
  170. this.renderer.view.style.height = i + "px"
  171. }
  172. gamen.score_view_status || this.setOrientationGuide()
  173. }
  174. ,
  175. GD.render = function () {
  176. GD.renderer.render(GD.root)
  177. }
  178. ,
  179. GD.update = function () {
  180. GD.isDebug && GD.stats.begin(),
  181. requestAnimationFrame(GD.update),
  182. GD.render(),
  183. GD.isDebug && GD.stats.end()
  184. }
  185. ,
  186. GD.buttonAction = function (t, e, i) {
  187. e || (e = 1.2),
  188. i || (i = 1),
  189. t.scale.set(e),
  190. TweenMax.to(t.scale, .2, {
  191. x: i,
  192. y: i
  193. })
  194. }
  195. ,
  196. GD.setSpriteTexture = function () {
  197. PIXI.Container.prototype.setSpriteTexture = function (t, e, i) {
  198. return "sprite" == e ? t ? t.texture = GD.loader.resources[i].texture : t = new PIXI.Sprite(GD.loader.resources[i].texture) : t ? t.texture = PIXI.Texture.fromFrame(i + ".png") : t = new PIXI.Sprite.fromFrame(i + ".png"),
  199. t
  200. }
  201. }
  202. ,
  203. GD.getDarkBg = function () {
  204. return GD.darkBg || (GD.darkBg = new PIXI.Graphics,
  205. GD.darkBg.beginFill(0, .8),
  206. GD.darkBg.drawRect(0, 0, GD.width, GD.height),
  207. GD.darkBg.endFill()),
  208. GD.darkBg
  209. }
  210. ,
  211. GD.log = function (t) {
  212. GD.isShowLog ? (GD.logStr = t + "\n" + GD.logStr,
  213. GD.logText || (GD.logText = new PIXI.Text("", {
  214. font: "14px Arial",
  215. fill: "#F7EDCA",
  216. stroke: "#000",
  217. strokeThickness: 4,
  218. wordWrapWidth: GD.width - 60,
  219. wordWrap: !0
  220. }),
  221. GD.logText.x = 30,
  222. GD.logText.y = 30),
  223. GD.logText.parent || GD.root.addChild(GD.logText),
  224. GD.logText.text = GD.logStr) : console.log(t)
  225. }
  226. ,
  227. GD.fullScreen = function () {
  228. if (GD.isMobile) {
  229. var t = navigator.platform.match(/iPhone|iPod|iPad/);
  230. if (!t) {
  231. var e = GD.renderer.view;
  232. try {
  233. e.requestFullscreen ? e.requestFullscreen() : e.webkitRequestFullScreen ? e.webkitRequestFullScreen() : e.mozRequestFullScreen()
  234. } catch (i) {
  235. console.log("fullscree fail")
  236. }
  237. }
  238. }
  239. }
  240. ,
  241. GD.exitFullScreen = function () {
  242. if (GD.isMobile) {
  243. var t = navigator.platform.match(/iPhone|iPod|iPad/);
  244. if (!t)
  245. try {
  246. document.exitFullscreen ? document.exitFullscreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen && document.webkitCancelFullScreen()
  247. } catch (e) {
  248. console.log("fullscree cancel fail")
  249. }
  250. }
  251. }
  252. ,
  253. GD.setOrientationGuide = function () {
  254. var t = document.getElementById("rank_layout");
  255. if (t && "none" != t.style.display && com)
  256. return GD.renderer.view.style.display = "none",
  257. void GD.showOrientation(!1);
  258. var e = window.innerWidth / window.innerHeight
  259. , i = GD.width / GD.height;
  260. i > 1 ? GD.orientationType = "phone rotate_x" : GD.orientationType = "phone rotate_y",
  261. e > 1 && 1 > i || 1 > e && i > 1 ? GD.showOrientation(!0) : GD.showOrientation(!1)
  262. }
  263. ,
  264. GD.showOrientation = function (t) {
  265. for (var e = ["Z300C", "TF701T", "TF700T", "TF103C", "TF101-1B251A", "TA2506 10BK", "SM-T805", "SM-T800", "SM-T677", "SM-T670", "SM-P900", "SMP-605", "SMP-600", "SMART-TV", "SmartTV", "SM-905", "SHW-M480W", "SHW-M380", "SHV-E230", "SGP771", "SGP311", "QM0101", "Q109", "MZ68", "MZ601", "MX1080", "MID 1065-8", "MID 1042-8", "ME102A", "LGV940", "LGV700N", "GT-P5110", "FZ-A1", "AT105", "A10-70", "10QS", "10ES"], i = e.length; i--;)
  266. if (navigator.userAgent.match(e[i]))
  267. return;
  268. var n, o, s, r, a, h;
  269. if (GD.isMobile) {
  270. var l = document.getElementsByClassName("xy_wrap").length;
  271. if (t) {
  272. if (n = GD.orientationGuide,
  273. null == n) {
  274. if (n = document.createElement("div"),
  275. n.style.backgroundColor = "#ff7e17",
  276. n.style.position = "absolute",
  277. n.style.left = 0,
  278. n.style.top = 0,
  279. n.style.right = 0,
  280. n.style.bottom = 0,
  281. n.style.margin = "auto",
  282. n.setAttribute("class", "xy_wrap"),
  283. GD.orientationGuide = n,
  284. o = document.createElement("div"),
  285. o.setAttribute("class", "xy_info"),
  286. s = document.createElement("div"),
  287. s.setAttribute("class", GD.orientationType),
  288. r = document.createElement("span"),
  289. r.setAttribute("class", "yes"),
  290. a = document.createElement("span"),
  291. a.setAttribute("class", "no"),
  292. n.appendChild(o),
  293. o.appendChild(s),
  294. o.appendChild(r),
  295. o.appendChild(a),
  296. h = document.createElement("p"),
  297. h.style.left = "0px",
  298. h.style.right = "0px",
  299. h.style.padding = "15px",
  300. h.style.lineHeight = "130%",
  301. h.style.color = "#FFFFFF",
  302. h.style.position = "absolute",
  303. "en" == GD.lang)
  304. h.style.fontSize = "18px",
  305. h.innerHTML = "Please rotate your device.";
  306. else {
  307. var u;
  308. switch (GD.lang) {
  309. case "jp":
  310. u = "お使いの 携?電話を 回?させて 下ください。";
  311. break;
  312. case "en":
  313. u = "ROTATE YOUR PHONE";
  314. break;
  315. case "cn":
  316. u = "如果?幕不能旋?,?打?自?旋?功能。";
  317. break;
  318. default:
  319. u = window.innerWidth > 480 ? "화면 전환이 되지 않는다면, 자동회전 기능을 켜 주세요." : "화면 전환이 되지 않는다면,<br>자동회전 기능을 켜 주세요."
  320. }
  321. h.innerHTML = u
  322. }
  323. o.appendChild(h)
  324. }
  325. 0 == l && (document.body.appendChild(n),
  326. GD.orientationChange(!0),
  327. GD.renderer.view.style.visibility = "hidden")
  328. } else
  329. l > 0 && (document.body.removeChild(GD.orientationGuide),
  330. GD.orientationChange(!1),
  331. GD.renderer.view.style.visibility = "visible")
  332. }
  333. }
  334. ,
  335. GD.orientationChange = function (t) {
  336. t ? GD.soundMute() : GD.isAllSound && GD.soundUnMute()
  337. }
  338. ,
  339. GD.loadSound = function (t, e) {
  340. var index = 0,
  341. options = [],
  342. n = t.length;
  343. for (let o = 0, s = n; s--;) {
  344. let i = t[s];
  345. options[s] = {
  346. key: i,
  347. value: {
  348. src: [RES_DIR_SOUND + i + ".mp3?ver=" + SOUND_VERSION, RES_DIR_SOUND + i + ".ogg?ver=" + SOUND_VERSION, RES_DIR_SOUND + i + ".wav?ver=" + SOUND_VERSION],
  349. onload: function () {
  350. o++;
  351. if (index < n) {
  352. index++;
  353. let option = options[index - 1]
  354. GD.sound[option.key] = new Howl(option.value)
  355. index == n && e();
  356. }
  357. },
  358. onloaderror: function (msg) {
  359. console.error("error:", msg);
  360. o++;
  361. if (index < n) {
  362. index++;
  363. let option = options[index - 1]
  364. GD.sound[option.key] = new Howl(option.value)
  365. index == n && e();
  366. }
  367. }
  368. }
  369. }
  370. }
  371. let max = Math.min(options.length - 1, 2)
  372. while (index <= max) {
  373. let option = options[index]
  374. GD.sound[option.key] = new Howl(option.value);
  375. index++;
  376. }
  377. }
  378. ,
  379. GD.bgmPlay = function (t) {
  380. var e = GD.sound.sound_bgm;
  381. e._loop = !0,
  382. t ? e._volume = t : e._volume = .3,
  383. GD.isBgmSound && e.play()
  384. }
  385. ,
  386. GD.bgmStop = function () {
  387. GD.sound.sound_bgm.stop()
  388. }
  389. ,
  390. GD.soundPlay = function (t, e, i) {
  391. var n = GD.sound[t];
  392. e || (e = 1),
  393. e ? n._volume = e : n._volume = 1,
  394. i ? n._loop = i : n._loop = !1,
  395. GD.isEffectSound && n.play()
  396. }
  397. ,
  398. GD.soundStop = function (t) {
  399. GD.isEffectSound && GD.sound[t].stop()
  400. }
  401. ,
  402. GD.soundAllStop = function () {
  403. for (var t in GD.sound)
  404. GD.sound[t].stop()
  405. }
  406. ,
  407. GD.soundMute = function () {
  408. Howler.mute(!0)
  409. }
  410. ,
  411. GD.soundUnMute = function () {
  412. GD.isAllSound && Howler.mute(!1)
  413. }
  414. ,
  415. window.onresize = function (t) {
  416. GD.resize()
  417. }
  418. }
  419. , function (t, e) {
  420. GD.Util = {
  421. zeroStr: function (t, e) {
  422. for (var i = t.toString(), n = e - i.length; n--;)
  423. i = "0" + i;
  424. return i
  425. },
  426. randomNumber: function (t, e) {
  427. var i = 10 * e || 1;
  428. return Math.floor(Math.random() * t * i / i)
  429. },
  430. hitTest: function (t, e) {
  431. return e.x >= t.x && e.x <= t.x + t.width && e.y >= t.y && e.y <= t.y + t.height
  432. },
  433. uniqueArray: function (t) {
  434. for (var e = [], i = 0, n = t.length; n > i; i++)
  435. -1 === e.indexOf(t[i]) && "" !== t[i] && e.push(t[i]);
  436. return e
  437. },
  438. comma: function (t) {
  439. return t = String(t),
  440. t.replace(/(\d)(?=(?:\d{3})+(?!\d))/g, "$1,")
  441. },
  442. shuffle: function (t) {
  443. var e, i, n;
  444. for (n = t.length; n; n--)
  445. e = Math.floor(Math.random() * n),
  446. i = t[n - 1],
  447. t[n - 1] = t[e],
  448. t[e] = i
  449. },
  450. grep: function (t, e) {
  451. return jQuery.grep(t, function (t) {
  452. return t != e
  453. })
  454. },
  455. getParam: function (t) {
  456. var e = window.location.search.match(new RegExp("(?:[?&]" + t + "=)([^&]+)"));
  457. return e ? e[1] : null
  458. },
  459. mobileCheck: function () {
  460. return !!(navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i))
  461. },
  462. radiansToDegrees: function (t) {
  463. return t * Math.PI / 180
  464. },
  465. degreesToradians: function (t) {
  466. return 180 * t / Math.PI
  467. }
  468. }
  469. }
  470. , function (t, e) {
  471. DataManager = {},
  472. DataManager.unique = null,
  473. DataManager.pk = null,
  474. DataManager.Skey = null,
  475. DataManager.Okey = null,
  476. DataManager.callFunc = null,
  477. DataManager.target = null,
  478. DataManager.playInterval = null,
  479. DataManager.start = function (t, e) {
  480. DataManager.callFunc = t,
  481. DataManager.target = e,
  482. gamen.start(DataManager.startDataComplete)
  483. }
  484. ,
  485. DataManager.startDataComplete = function (t, e, i, n, o) {
  486. if (GD.isLogin = t,
  487. GD.isLogin && (GD.sKey = gamen.spkey(n),
  488. GD.oKey = gamen.opkey(o),
  489. GD.unique = XORcipher().xorDecoder(e, GD.sKey),
  490. GD.pk = i,
  491. GD.startTime = Date.now(),
  492. GD.medal = [],
  493. null != gamen.achievement))
  494. for (var s = gamen.achievement.length, r = 0; s > r; ++r) {
  495. var a = XORcipher().xorDecoder(gamen.achievement[r], GD.sKey)
  496. , h = [];
  497. h = a.split("_gamen_"),
  498. GD.medal[r] = [parseInt(h[0]), !1, parseInt(h[1]), h[2], h[3], parseInt(h[5]), h[4]]
  499. }
  500. DataManager.callFunc.call(DataManager.target),
  501. DataManager.playInterval = setInterval(DataManager.promisePlay, .1)
  502. }
  503. ,
  504. DataManager.point = function (t, e) {
  505. if (GD.log(t + " : " + e),
  506. DataManager.otherPoint(t, e),
  507. GD.isLogin) {
  508. t = XORcipher().xorEncoder(t, GD.sKey),
  509. e = XORcipher().xorEncoder(e.toString(), GD.sKey);
  510. var i = Date.now() - GD.startTime
  511. , n = XORcipher().xorEncoder(i.toString(), GD.sKey);
  512. gamen.point(t, e, n)
  513. }
  514. }
  515. ,
  516. DataManager.otherPoint = function (t, e) {
  517. if (GD.isLogin) {
  518. t = XORcipher().xorEncoder(t, GD.oKey),
  519. e = XORcipher().xorEncoder(e.toString(), GD.oKey);
  520. var i = Date.now() - GD.startTime
  521. , n = XORcipher().xorEncoder(i.toString(), GD.oKey);
  522. gamen.otherpoint(t, e, n)
  523. }
  524. }
  525. ,
  526. DataManager.promisePlay = function () {
  527. var t = Date.now() - GD.startTime
  528. , e = XORcipher().xorEncoder(t.toString(), GD.oKey);
  529. gamen.promiseplay(e)
  530. }
  531. ,
  532. DataManager.finish = function (t) {
  533. if (DataManager.playInterval && clearInterval(DataManager.playInterval),
  534. GD.isLogin) {
  535. if (GD.medal.length > 0) {
  536. var e = []
  537. , i = GD.medal.length;
  538. gamen.new_achievement = [];
  539. for (var n = 0; i > n; ++n)
  540. e[n] = GD.medal[n][0] + "_gamen_" + GD.medal[n][2] + "_gamen_" + GD.medal[n][3] + "_gamen_" + GD.medal[n][4] + "_gamen_" + parseInt(GD.medal[n][5]),
  541. gamen.new_achievement[n] = XORcipher().xorEncoder(e[n], GD.sKey)
  542. }
  543. var o = XORcipher().xorEncoder(t.toString(), GD.sKey)
  544. , s = GD.commonOption.gameRestart.bind(GD.commonOption)
  545. , r = XORcipher().xorEncoder(GD.unique, GD.sKey)
  546. , a = XORcipher().xorEncoder(GD.startTime.toString(), GD.sKey)
  547. , h = Date.now()
  548. , l = XORcipher().xorEncoder(h.toString(), this.sKey);
  549. gamen.finish(GD.pk, o, s, r, a, l)
  550. } else
  551. gamen.finish(t, GD.commonOption.gameRestart.bind(GD.commonOption))
  552. }
  553. ,
  554. DataManager.addMedal = function (t, e) {
  555. if (GD.isLogin && GD.medal.length > 0)
  556. for (var i = null, n = 0; n < GD.medal.length; ++n)
  557. if (t == GD.medal[n][0]) {
  558. i = n,
  559. 0 == GD.medal[i][1] && (null == e && (e = 1),
  560. GD.medal[i][5] += e,
  561. GD.medal[i][2] <= GD.medal[i][5] && (GD.medal[i][1] = !0,
  562. GD.commonOption.setAchievement(i + 1)));
  563. break
  564. }
  565. }
  566. }
  567. , function (t, e) {
  568. GamePadManager = {
  569. isConnected: !1,
  570. init: function () {
  571. try {
  572. gamepadSupport.init()
  573. } catch (t) {
  574. console.log("gamepadSupport is not defined -- gamepad.js")
  575. }
  576. },
  577. showNotSupported: function () { },
  578. updateGamePads: function (t) {
  579. if (this.isConnected = !1,
  580. t)
  581. for (var e in t) {
  582. var i = t[e];
  583. i && (this.isConnected = !0)
  584. }
  585. },
  586. updateButton: function (t, e, i) {
  587. t.pressed && $(this).trigger("padButton", i)
  588. },
  589. updateAxis: function (t, e, i, n, o) {
  590. "stick-1" == n && ("stick-1-axis-x" == i ? $(this).trigger("padStickX", t) : "stick-1-axis-y" == i && $(this).trigger("padStickY", t))
  591. }
  592. }
  593. }
  594. , function (t, e) {
  595. GD.ScorePopup = function () {
  596. PIXI.Container.call(this),
  597. this.darkBg = GD.getDarkBg(),
  598. this.bg = this.setSpriteTexture(this.allBtn, "texture", "gameOver_box"),
  599. this.bg.anchor.set(.5),
  600. this.bg.x = GD.width / 2,
  601. this.bg.y = GD.height / 2,
  602. this.pointTxt = new gc.NumberText("gameOver_num_", "center", -12),
  603. this.pointTxt.y = 8,
  604. this.bg.addChild(this.pointTxt),
  605. this.retryBtn = this.setSpriteTexture(this.retryBtn, "texture", "retry_btn"),
  606. this.retryBtn.anchor.set(.5),
  607. this.retryBtn.x = -112,
  608. this.retryBtn.y = 200,
  609. this.setTouchStartAction(this.retryBtn, function () {
  610. this.emit("GAME_REPLAY_EVENT")
  611. }, this),
  612. this.bg.addChild(this.retryBtn),
  613. this.exitBtn = this.setSpriteTexture(this.exitBtn, "texture", "option_exit_btn_s"),
  614. this.exitBtn.anchor.set(.5),
  615. this.exitBtn.x = -this.retryBtn.x,
  616. this.exitBtn.y = this.retryBtn.y,
  617. this.setTouchStartAction(this.exitBtn, function () {
  618. this.emit("EXIT_EVENT")
  619. }, this),
  620. this.bg.addChild(this.exitBtn)
  621. }
  622. ,
  623. GD.ScorePopup.constructor = GD.ScorePopup,
  624. GD.ScorePopup.prototype = Object.create(PIXI.Container.prototype),
  625. GD.ScorePopup.prototype.show = function (t) {
  626. this.removeChild(),
  627. this.retryBtn.scale.set(1),
  628. this.exitBtn.scale.set(1),
  629. this.pointTxt.setValue(t),
  630. this.addChild(this.darkBg),
  631. this.addChild(this.bg),
  632. this.bg.scale.set(.1),
  633. TweenMax.to(this.bg.scale, .15, {
  634. x: 1,
  635. y: 1,
  636. ease: Back.easeOut,
  637. onComplete: this.showComplete.bind(this)
  638. })
  639. }
  640. ,
  641. GD.ScorePopup.prototype.showComplete = function () {
  642. this.setInteractive(!0)
  643. }
  644. ,
  645. GD.ScorePopup.prototype.setInteractive = function (t) {
  646. this.retryBtn.interactive = t,
  647. this.exitBtn.interactive = t
  648. }
  649. ,
  650. GD.ScorePopup.prototype.removeChild = function () {
  651. this.setInteractive(!1),
  652. this.removeChildren()
  653. }
  654. }
  655. , function (t, e) {
  656. GD.OptionPopup = function () {
  657. PIXI.Container.call(this),
  658. this.darkBg = GD.getDarkBg(),
  659. this.bg = null,
  660. this.type = null,
  661. this.allBtn = this.setSpriteTexture(this.allBtn, "texture", "option_on_0"),
  662. this.allBtn.anchor.set(.5),
  663. this.allBtn.x = 110,
  664. this.setTouchEnd(this.allBtn, function () {
  665. GD.isAllSound = !GD.isAllSound,
  666. this.setAllSoundBtn(),
  667. this.setBgmBtn(!1),
  668. this.setEffectBtn()
  669. }, this),
  670. this.bgmBtn = this.setSpriteTexture(this.bgmBtn, "texture", "option_on_0"),
  671. this.bgmBtn.anchor.set(.5),
  672. this.bgmBtn.x = this.allBtn.x,
  673. this.setTouchEnd(this.bgmBtn, function () {
  674. GD.isAllSound && (GD.isBgmSound = !GD.isBgmSound,
  675. this.setBgmBtn(!0))
  676. }, this),
  677. this.effectBtn = this.setSpriteTexture(this.effectBtn, "texture", "option_on_0"),
  678. this.effectBtn.anchor.set(.5),
  679. this.effectBtn.x = this.allBtn.x,
  680. this.setTouchEnd(this.effectBtn, function () {
  681. GD.isAllSound && (GD.isEffectSound = !GD.isEffectSound,
  682. this.setEffectBtn())
  683. }, this),
  684. this.closeBtn = this.setSpriteTexture(this.closeBtn, "texture", "option_close_btn"),
  685. this.closeBtn.anchor.set(.5),
  686. this.closeBtn.x = 200,
  687. this.setTouchStartAction(this.closeBtn, function () {
  688. this.emit("SOUND_POPUP_CLOSE_EVENT")
  689. }, this),
  690. this.tutorialBtn = this.setSpriteTexture(this.tutorialBtn, "texture", "option_help_btn"),
  691. this.tutorialBtn.anchor.set(.5),
  692. this.setTouchStartAction(this.tutorialBtn),
  693. this.setTouchEnd(this.tutorialBtn, function () {
  694. this.setInteractive(!1),
  695. this.emit("TUTORIAL_OPEN_EVENT")
  696. }, this)
  697. }
  698. ,
  699. GD.OptionPopup.constructor = GD.OptionPopup,
  700. GD.OptionPopup.prototype = Object.create(PIXI.Container.prototype),
  701. GD.OptionPopup.prototype.show = function (t) {
  702. this.removeChild(),
  703. this.type = t;
  704. var e = "option_box_0";
  705. 0 == this.type ? (1 == GD.soundType ? (this.closeBtn.y = -185,
  706. this.allBtn.y = -62) : (e = "option_box1_0",
  707. this.closeBtn.y = -92,
  708. this.allBtn.y = 25,
  709. this.allBtn.y = 30),
  710. this.bgmBtn.y = 70,
  711. this.effectBtn.y = 165) : (e = "option_box_1",
  712. 1 == GD.soundType ? (this.closeBtn.y = -247,
  713. this.allBtn.y = -124,
  714. this.tutorialBtn.y = 230) : (e = "option_box1_1",
  715. this.closeBtn.y = -148,
  716. this.allBtn.y = -27,
  717. this.tutorialBtn.y = 130),
  718. this.bgmBtn.y = 20,
  719. this.effectBtn.y = 115),
  720. this.addChild(this.darkBg),
  721. this.bg = this.setSpriteTexture(this.bg, "texture", e),
  722. this.bg.anchor.set(.5),
  723. this.bg.x = GD.width / 2,
  724. this.bg.y = GD.height / 2,
  725. this.addChild(this.bg),
  726. this.bg.addChild(this.closeBtn),
  727. this.bg.addChild(this.allBtn),
  728. 1 == GD.soundType && (this.bg.addChild(this.bgmBtn),
  729. this.bg.addChild(this.effectBtn)),
  730. 1 == this.type && this.bg.addChild(this.tutorialBtn),
  731. this.setAllSoundBtn(),
  732. this.setBgmBtn(!1),
  733. this.setEffectBtn(),
  734. this.bg.scale.set(.1),
  735. TweenMax.to(this.bg.scale, .15, {
  736. x: 1,
  737. y: 1,
  738. ease: Back.easeOut,
  739. onComplete: this.showComplete.bind(this)
  740. })
  741. }
  742. ,
  743. GD.OptionPopup.prototype.showComplete = function () {
  744. this.setInteractive(!0)
  745. }
  746. ,
  747. GD.OptionPopup.prototype.hide = function () {
  748. this.removeChild()
  749. }
  750. ,
  751. GD.OptionPopup.prototype.setAllSoundBtn = function () {
  752. GD.isAllSound ? (this.allBtn = this.setSpriteTexture(this.allBtn, "texture", "option_on_0"),
  753. GD.soundUnMute()) : (this.allBtn = this.setSpriteTexture(this.allBtn, "texture", "option_off_0"),
  754. GD.soundMute())
  755. }
  756. ,
  757. GD.OptionPopup.prototype.setBgmBtn = function (t) {
  758. GD.isAllSound ? (GD.isBgmSound ? this.bgmBtn = this.setSpriteTexture(this.bgmBtn, "texture", "option_on_0") : this.bgmBtn = this.setSpriteTexture(this.bgmBtn, "texture", "option_off_0"),
  759. t && 1 == this.type && (GD.isBgmSound ? GD.bgmPlay() : GD.bgmStop())) : GD.isBgmSound ? this.bgmBtn = this.setSpriteTexture(this.bgmBtn, "texture", "option_on_1") : this.bgmBtn = this.setSpriteTexture(this.bgmBtn, "texture", "option_off_1")
  760. }
  761. ,
  762. GD.OptionPopup.prototype.setEffectBtn = function () {
  763. GD.isAllSound ? GD.isEffectSound ? this.effectBtn = this.setSpriteTexture(this.effectBtn, "texture", "option_on_0") : this.effectBtn = this.setSpriteTexture(this.effectBtn, "texture", "option_off_0") : GD.isEffectSound ? this.effectBtn = this.setSpriteTexture(this.effectBtn, "texture", "option_on_1") : this.effectBtn = this.setSpriteTexture(this.effectBtn, "texture", "option_off_1")
  764. }
  765. ,
  766. GD.OptionPopup.prototype.setInteractive = function (t) {
  767. this.allBtn.interactive = t,
  768. this.bgmBtn.interactive = t,
  769. this.effectBtn.interactive = t,
  770. this.tutorialBtn.interactive = t,
  771. this.closeBtn.interactive = t
  772. }
  773. ,
  774. GD.OptionPopup.prototype.removeChild = function () {
  775. this.removeChildren(),
  776. this.bg && this.bg.removeChildren(),
  777. this.setInteractive(!1)
  778. }
  779. }
  780. , function (t, e) {
  781. GD.Achievement = function () {
  782. PIXI.Container.call(this),
  783. this.bgList = [],
  784. this.tmpBgList = [],
  785. this.icons = [],
  786. this.tmpIcons = [],
  787. this.idx = 0,
  788. this.interval = null
  789. }
  790. ,
  791. GD.Achievement.constructor = GD.Achievement,
  792. GD.Achievement.prototype = Object.create(PIXI.Container.prototype),
  793. GD.Achievement.prototype.init = function () {
  794. this.removeAll()
  795. }
  796. ,
  797. GD.Achievement.prototype.show = function (t, e) {
  798. var i;
  799. this.tmpBgList.length ? (i = this.bgList.shift(),
  800. this.setSpriteTexture(i, "texture", "medal_box")) : i = this.setSpriteTexture(null, "texture", "medal_box"),
  801. i.anchor.set(.5),
  802. i.scale.set(.3),
  803. i.count = 0,
  804. i.idx = this.idx,
  805. i.x = GD.width + 50,
  806. e ? i.y = e : i.y = 140,
  807. this.icons.length > 0 && (i.y += 100 * this.icons.length),
  808. this.bgList.push(i),
  809. GD.log("game_medal_" + t);
  810. var n;
  811. this.tmpIcons.length ? (n = this.tmpIcons.shift(),
  812. this.setSpriteTexture(n, "sprite", "game_medal_" + t)) : n = this.setSpriteTexture(null, "sprite", "game_medal_" + t),
  813. n.anchor.set(.5),
  814. n.y = -30,
  815. i.addChild(n),
  816. this.addChild(i),
  817. this.icons.push(n)
  818. }
  819. ,
  820. GD.Achievement.prototype.removeIcon = function (t) {
  821. for (var e, i = this.icons.length; i--;)
  822. if (e = this.icons[i],
  823. e.idx == t.idx) {
  824. this.icons.splice(i, 1),
  825. this.bg.removeChild(e);
  826. break
  827. }
  828. }
  829. ,
  830. GD.Achievement.prototype.removeAll = function () {
  831. var t, e, i = this.bgList.length;
  832. for (t = 0; i > t; t++)
  833. e = this.bgList.shift(),
  834. this.tmpBgList.push(e),
  835. e.removeChildren();
  836. for (i = this.icons.length,
  837. t = 0; i > t; t++)
  838. e = this.icons.shift(),
  839. this.tmpIcons.push(e);
  840. this.removeChildren()
  841. }
  842. ,
  843. GD.Achievement.prototype.updateTransform = function () {
  844. PIXI.Container.prototype.updateTransform.call(this);
  845. for (var t, e = this.bgList.length; e--;)
  846. t = this.bgList[e],
  847. t.count++ ,
  848. t.count < 80 ? (t.x += .3 * (GD.width - 50 - t.x),
  849. t.sp = .1) : (t.sp = 1.3 * t.sp,
  850. t.x += t.sp,
  851. t.x > GD.width + 50 && (this.removeIcon(t),
  852. this.removeChild(t),
  853. this.bgList.splice(e, 1),
  854. this.tmpBgList.push(t)))
  855. }
  856. }
  857. , function (t, e) {
  858. GD.GamePadGuide = function () {
  859. PIXI.Container.call(this),
  860. this.guide = this.setSpriteTexture(this.guide, "sprite", "gamePadGuide"),
  861. this.setTouchEnd(this.guide, function () {
  862. this.setInteractive(!1),
  863. this.removeChild(this.guide),
  864. this.emit("GAME_PAD_GUIDE_CLOSE_EVENT")
  865. }
  866. .bind(this))
  867. }
  868. ,
  869. GD.GamePadGuide.constructor = GD.GamePadGuide,
  870. GD.GamePadGuide.prototype = Object.create(PIXI.Container.prototype),
  871. GD.GamePadGuide.prototype.init = function () {
  872. this.removeChild(),
  873. this.addChild(this.guide),
  874. this.setInteractive(!0)
  875. }
  876. ,
  877. GD.GamePadGuide.prototype.setInteractive = function (t) {
  878. this.guide.interactive = t
  879. }
  880. ,
  881. GD.GamePadGuide.prototype.removeChild = function () {
  882. this.removeChildren()
  883. }
  884. }
  885. , function (t, e) {
  886. GD.LoadingView = function () {
  887. PIXI.Container.call(this),
  888. this.darkBg = GD.getDarkBg(),
  889. this.img = this.setSpriteTexture(null, "texture", "loadingCircle"),
  890. this.img.scale.set(.8),
  891. this.img.anchor.set(.5),
  892. this.img.x = GD.width / 2,
  893. this.img.y = GD.height / 2,
  894. this.addChild(this.img)
  895. }
  896. ,
  897. GD.LoadingView.constructor = GD.LoadingView,
  898. GD.LoadingView.prototype = Object.create(PIXI.Container.prototype),
  899. GD.LoadingView.prototype.init = function () {
  900. this.removeAll(),
  901. this.addChild(this.darkBg),
  902. this.addChild(this.img)
  903. }
  904. ,
  905. GD.LoadingView.prototype.removeAll = function () {
  906. this.removeChildren()
  907. }
  908. ,
  909. GD.LoadingView.prototype.updateTransform = function () {
  910. PIXI.Container.prototype.updateTransform.call(this),
  911. this.img.rotation += .1
  912. }
  913. ,
  914. GD.LoadingView.getInstance = function () {
  915. return GD.loading || (GD.loading = new GD.LoadingView),
  916. GD.loading
  917. }
  918. }
  919. , function (t, e) {
  920. GD.Progress = function () {
  921. this.bg = null,
  922. this.logo = null,
  923. this.logoTxt = null,
  924. this.tween = null,
  925. PIXI.Container.call(this)
  926. }
  927. ,
  928. GD.Progress.constructor = GD.Progress,
  929. GD.Progress.prototype = Object.create(PIXI.Container.prototype),
  930. GD.Progress.prototype.show = function () {
  931. if (this.bg || (this.bg = new PIXI.Graphics,
  932. this.bg.beginFill(16777215, 1),
  933. this.bg.drawRect(0, 0, GD.width, GD.height),
  934. this.bg.endFill()),
  935. this.addChild(this.bg),
  936. !this.logo) {
  937. var logo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABoCAYAAAAU9xXbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEI5ODVERjI3RjM2MTFFODlFMTM5NTUyODcxNUY3OUMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEI5ODVERjE3RjM2MTFFODlFMTM5NTUyODcxNUY3OUMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0U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HG8+vlgwaGdaF5mZR06NH7Bt4qw2wtdZGsSrbg0H7quC4wkCdC4q5z/HA6klfZ4jgvr4m41qdPySvmwRoHQyaq0FW8ZAoRHi3G7ulTth9BlHFw2KVFRd4/+9GqjMppXE9OLc75IcDw2OhqUlIyLbA7+cPWHkUDo9eSO3oVWXgFixWHBEBoJgrEfZ9fAaPSK/c+5FfUA7gZEen47jaOOwJa+98tMPHCrVz9qiYB+tMoqkpPCJB0FrLdsdOcYhctQGGUOil1jtWR+uMYdBGh44gsvYqK/+kHrR3RWa93oKqWIbBLXBrguGctD5tBwZtDOexOP0WkWazz+I8ZiiXiQohVm2AId3mq9DZ11xjMcUcVvlvpnyv1O105l8R6iV0FUnVCNinvkqeAFqCIoLXR87VKiK27aj8/cz5mwAzJKzZus4WNBGviDgWdUz5Ve7C/XJqxt0EMKSpIriLm41MizNDbEwVvUzDbt4rK3nT1QwYhqHjmNusQMt5H5E7iK6pJHdVO2BImLfCFuHn+7ZQXi+yMde5Xbg7vlU+VTtgrhdHqPdl7sVKREcJxnWS3MO+wNixYEolFY1gqhPdJ2EPQswS432Ux1BH7y8cBxogpj7qfQDsd5DDB2a48eLSV6gM8vIe4e0zv4HS/wUYAJEhl2U0gO8nAAAAAElFTkSuQmCC"
  938. this.logo = new PIXI.Sprite.fromImage(logo)
  939. }
  940. this.logo.x = GD.width / 2,
  941. this.logo.y = GD.height / 2,
  942. this.logo.anchor.set(.5),
  943. this.logo.scale.set(.1),
  944. this.logo.rotation = 20,
  945. this.addChild(this.logo),
  946. this.tween ? this.tween.kill() : this.tween = new TimelineLite,
  947. this.tween.to(this.logo, 1, {
  948. rotation: 0,
  949. ease: Sine.easeOut
  950. }),
  951. this.tween.call(this.showLocoText.bind(this)),
  952. TweenMax.to(this.logo.scale, 1, {
  953. x: 1,
  954. y: 1
  955. })
  956. }
  957. ,
  958. GD.Progress.prototype.showLocoText = function () {
  959. if (!this.logoTxt) {
  960. var logoTxt = "data:image/png;base64,iVBORw0KGgoAA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5N2GpBXnkZYqXnWBsW+Oprzvr3io2jPWtAqLrc9lLu0sDt/f90S1TE4Qc+SpLcm/e2UO39gFBOtj0S2VtwQvsrl6wPEXR1y3zsUm7on59kwri/+Ip0zuUG4n6o93zCpsCTy4zSS11c35elxcJY8yCrvLhaQ0F/DC0/nGMPnfEoHr4rANLbnyHPl7+MCg0OmBVfAb5P5rJP9rAbPURxjk1gV3sPkAqFvUCoylrfdaZFn80Ns2zAsDXBk7dJc4+NWhYi9uHJ+xLbddj6+k9W7nWxuyPZxH24436JsAGU+gHInR/Tn/Krist7APWkLKQ00n1s0dfAcrgNyI4869x7n8zZunAdKaaDGI0rHrLRlVLniVELLOIMO9miqC8pXcEVaY/Gsqdxj6wawP+bCWmz5LSAElgLeZagRbOXW9BayG68OIu8fNWr9cwFkN5mGiusuo9zF275pgWmR8lg4euku7AOYoHzTYWS3KL/UgA/mVDLz7O7nutWP9LOUPuB6O43MJlKsZsJPT2MmqTGsfHTh1qYv21B1ubIhU2eyeoIW6XjKXYB+Dx28WiLIGTWM730ce/92sArzB1ZX/KlxV1P1WDKevcjCuXMtZ3wHSd3ayGr5PFa1t8TMtxGKCqz7bqho8rAUxoNfsngePM/D2cZux43pLu4xXuB8q1QIewFfcyI3zJWKb8C3/WSP+yIym2eNiSbyCqyZFD5VVq0juzm/TDsXPGcwk9n3wG9nzWMJE3FFjDI8met4HylPMS/+Q64jT7Dv53ODe2HutBxR5K+KeRWEUyl35GEqRU8SIuaNX5ffDSOvinoF9LLVNcygfJ+xl2rODoZ1KDhkTm1AoepL5vL03wIMANN/MUNK60tEAAAAAElFTkSuQmCC"
  961. this.logoTxt = new PIXI.Sprite.fromImage(logoTxt),
  962. this.logoTxt.anchor.set(.5),
  963. this.logoTxt.scale.set(1),
  964. this.logoTxt.y = GD.height / 2
  965. }
  966. this.logoTxt.x = GD.width / 2 + 65,
  967. this.logoTxt.alpha = 0,
  968. this.addChild(this.logoTxt),
  969. TweenMax.to(this.logo, .4, {
  970. x: GD.width / 2 - 95,
  971. ease: Sine.easeOut
  972. }),
  973. TweenMax.to(this.logoTxt, .4, {
  974. x: GD.width / 2 + 90,
  975. alpha: 1,
  976. ease: Sine.easeOut
  977. }),
  978. TweenMax.delayedCall(2, this.replay.bind(this))
  979. }
  980. ,
  981. GD.Progress.prototype.replay = function () {
  982. this.hide(),
  983. this.show()
  984. }
  985. ,
  986. GD.Progress.prototype.hide = function () {
  987. TweenMax.killAll(),
  988. this.tween.clear(),
  989. this.removeChildren()
  990. }
  991. ,
  992. GD.Progress.prototype.updateTransform = function () {
  993. PIXI.Container.prototype.updateTransform.call(this)
  994. }
  995. }
  996. , function (t, e) {
  997. GD.Tutorial = function () {
  998. PIXI.Container.call(this),
  999. this.type = 1,
  1000. this.tutorialImg = null,
  1001. this.nowPage = 0,
  1002. this.totalPage = 0,
  1003. this.contents = [],
  1004. this.container = new PIXI.Container,
  1005. this.img = this.setSpriteTexture(this.img, "texture", "temp"),
  1006. this.prevBtn = this.setSpriteTexture(this.prevBtn, "texture", "temp"),
  1007. this.prevBtn.anchor.set(.5),
  1008. this.prevBtn.x = 30,
  1009. this.prevBtn.y = GD.height / 2,
  1010. this.setTouchStartAction(this.prevBtn, function () {
  1011. this.nowPage > 0 && this.initPage(this.nowPage - 1)
  1012. }, this),
  1013. this.addChild(this.prevBtn),
  1014. this.nextBtn = this.setSpriteTexture(this.nextBtn, "texture", "temp"),
  1015. this.nextBtn.anchor.set(.5),
  1016. this.nextBtn.x = GD.width - 30,
  1017. this.nextBtn.y = GD.height / 2,
  1018. this.setTouchStartAction(this.nextBtn, function () {
  1019. this.nowPage + 1 < this.totalPage && this.initPage(this.nowPage + 1)
  1020. }, this),
  1021. this.addChild(this.nextBtn),
  1022. this.closeBtn = this.setSpriteTexture(this.closeBtn, "texture", "temp"),
  1023. this.closeBtn.anchor.set(.5),
  1024. this.closeBtn.x = GD.width / 2,
  1025. this.closeBtn.y = GD.height - 105,
  1026. this.setTouchStartAction(this.closeBtn),
  1027. this.setTouchEnd(this.closeBtn, function () {
  1028. this.emit("TUTORIAL_CLOSE_EVENT")
  1029. }, this),
  1030. this.addChild(this.closeBtn)
  1031. }
  1032. ,
  1033. GD.Tutorial.constructor = GD.Tutorial,
  1034. GD.Tutorial.prototype = Object.create(PIXI.Container.prototype),
  1035. GD.Tutorial.prototype.init = function (t, e) {
  1036. this.removeChild(),
  1037. this.type = 1,
  1038. this.tutorialImg = e,
  1039. this.nowPage = 0,
  1040. this.totalPage = t,
  1041. this.addChild(this.img),
  1042. this.addChild(this.closeBtn),
  1043. this.initPageButton(),
  1044. this.setTutorialImg(),
  1045. this.setInteractive(!0),
  1046. this.setButtons()
  1047. }
  1048. ,
  1049. GD.Tutorial.prototype.initContent = function (t, e) {
  1050. this.removeChild(),
  1051. this.type = 2,
  1052. this.nowPage = 0,
  1053. this.totalPage = t,
  1054. this.contents = e,
  1055. this.addChild(this.container),
  1056. this.addChild(this.closeBtn),
  1057. this.container.addChild(this.contents[0]),
  1058. this.setContent(),
  1059. this.initPageButton(),
  1060. this.setInteractive(!0),
  1061. this.setButtons()
  1062. }
  1063. ,
  1064. GD.Tutorial.prototype.initPage = function (t, e) {
  1065. this.nowPage = t,
  1066. e && (this.closeBtn = this.setSpriteTexture(this.closeBtn, "texture", e)),
  1067. 1 == this.type ? this.setTutorialImg() : this.setContent(),
  1068. this.setButtons()
  1069. }
  1070. ,
  1071. GD.Tutorial.prototype.initPageButton = function () {
  1072. this.totalPage > 1 && (this.prevBtn = this.setSpriteTexture(this.prevBtn, "texture", "help_prev"),
  1073. this.nextBtn = this.setSpriteTexture(this.nextBtn, "texture", "help_next"),
  1074. this.prevBtn.scale.set(1),
  1075. this.nextBtn.scale.set(1),
  1076. this.addChild(this.prevBtn),
  1077. this.addChild(this.nextBtn))
  1078. }
  1079. ,
  1080. GD.Tutorial.prototype.setPrevButtonPos = function (t, e) {
  1081. this.prevBtn.x = t,
  1082. this.prevBtn.y = e
  1083. }
  1084. ,
  1085. GD.Tutorial.prototype.setNextButtonPos = function (t, e) {
  1086. this.nextBtn.x = t,
  1087. this.nextBtn.y = e
  1088. }
  1089. ,
  1090. GD.Tutorial.prototype.setCloseButtonPos = function (t, e) {
  1091. this.closeBtn.x = t,
  1092. this.closeBtn.y = e
  1093. }
  1094. ,
  1095. GD.Tutorial.prototype.setTutorialImg = function () {
  1096. this.img = this.setSpriteTexture(this.img, "texture", this.tutorialImg + (this.nowPage + 1))
  1097. }
  1098. ,
  1099. GD.Tutorial.prototype.setContent = function () {
  1100. this.container.removeChildren();
  1101. var t = this.contents[this.nowPage];
  1102. t.init && t.init(),
  1103. this.container.addChild(t)
  1104. }
  1105. ,
  1106. GD.Tutorial.prototype.setButtons = function () {
  1107. this.totalPage > 0 && (0 == this.nowPage ? (this.prevBtn.alpha = .3,
  1108. this.nextBtn.alpha = 1,
  1109. this.prevBtn.interactive = !1,
  1110. this.nextBtn.interactive = !0) : this.nowPage + 1 == this.totalPage ? (this.prevBtn.alpha = 1,
  1111. this.nextBtn.alpha = .3,
  1112. this.prevBtn.interactive = !0,
  1113. this.nextBtn.interactive = !1) : (this.prevBtn.alpha = 1,
  1114. this.nextBtn.alpha = 1,
  1115. this.prevBtn.interactive = !0,
  1116. this.nextBtn.interactive = !0))
  1117. }
  1118. ,
  1119. GD.Tutorial.prototype.setInteractive = function (t) {
  1120. this.prevBtn.interactive = t,
  1121. this.nextBtn.interactive = t,
  1122. this.closeBtn.interactive = t
  1123. }
  1124. ,
  1125. GD.Tutorial.prototype.removeChild = function () {
  1126. this.setInteractive(!1),
  1127. this.container.removeChildren(),
  1128. this.removeChildren()
  1129. }
  1130. ,
  1131. GD.Tutorial.getInstance = function () {
  1132. return GD.tutorial || (GD.tutorial = new GD.Tutorial),
  1133. GD.tutorial
  1134. }
  1135. }
  1136. , function (t, e) {
  1137. PIXI.Container.prototype.setTouchStartAction = function (t, e, i) {
  1138. t.mousedown = t.touchstart = function (n) {
  1139. n.stopPropagation(),
  1140. GD.fullScreen(),
  1141. GD.buttonAction(t),
  1142. e && e.call(i, n)
  1143. }
  1144. .bind(i)
  1145. }
  1146. ,
  1147. PIXI.Container.prototype.setTouchStart = function (t, e, i) {
  1148. t.mousedown = t.touchstart = function (t) {
  1149. t.stopPropagation(),
  1150. GD.fullScreen(),
  1151. e && e.call(i, t)
  1152. }
  1153. .bind(i)
  1154. }
  1155. ,
  1156. PIXI.Container.prototype.setTouchEnd = function (t, e, i) {
  1157. t.tap = function (t) {
  1158. t.stopPropagation(),
  1159. GD.fullScreen(),
  1160. e && e.call(i, t)
  1161. }
  1162. .bind(i),
  1163. GD.isMobile || (t.click = function (t) {
  1164. t.stopPropagation(),
  1165. e && e.call(i, t)
  1166. }
  1167. .bind(i))
  1168. }
  1169. ,
  1170. PIXI.Container.prototype.setTouchMove = function (t, e, i) {
  1171. t.mousemove = t.touchmove = function (t) {
  1172. t.stopPropagation(),
  1173. e && e.call(i, t)
  1174. }
  1175. .bind(i)
  1176. }
  1177. ,
  1178. PIXI.Container.prototype.addGamePadEvent = function () {
  1179. this.removeGamePadEvent(),
  1180. $(GamePadManager).on("padButton", this.onGamePadEvent.bind(this)),
  1181. $(GamePadManager).on("padStickX", this.onGamePadStickXEvent.bind(this)),
  1182. $(GamePadManager).on("padStickY", this.onGamePadStickYEvent.bind(this))
  1183. }
  1184. ,
  1185. PIXI.Container.prototype.removeGamePadEvent = function () {
  1186. $(GamePadManager).off()
  1187. }
  1188. ,
  1189. PIXI.Container.prototype.onGamePadEvent = function (t, e) { }
  1190. ,
  1191. PIXI.Container.prototype.onGamePadStickXEvent = function (t, e) { }
  1192. ,
  1193. PIXI.Container.prototype.onGamePadStickYEvent = function (t, e) { }
  1194. ,
  1195. PIXI.Container.prototype.showLoading = function () {
  1196. GD.loading = GD.LoadingView.getInstance(),
  1197. GD.loading.init(),
  1198. this.addChild(GD.loading)
  1199. }
  1200. ,
  1201. PIXI.Container.prototype.hideLoading = function () {
  1202. this.removeChild(GD.loading)
  1203. }
  1204. }
  1205. , function (t, e) {
  1206. GD.CommonIntro = function (t, e) {
  1207. PIXI.Container.call(this),
  1208. this.helpBtn = null,
  1209. this.soundpBtn = null,
  1210. this.startBtn = null,
  1211. this.callBackFunc = null,
  1212. this.callBackTarget = null,
  1213. this.bg = this.setSpriteTexture(this.bg, "texture", e),
  1214. this.addChild(this.bg),
  1215. this.copyText = this.setSpriteTexture(this.copyText, "texture", "copybar_" + t),
  1216. this.copyText.anchor.set(.5),
  1217. this.copyText.x = GD.width / 2,
  1218. this.copyText.y = GD.height - 20,
  1219. this.addChild(this.copyText),
  1220. this.gamePadGuide = null,
  1221. this.soundPopup = new GD.OptionPopup,
  1222. this.soundPopup.on("SOUND_POPUP_CLOSE_EVENT", this.closeSoundPopup.bind(this)),
  1223. gamen.loadend()
  1224. }
  1225. ,
  1226. GD.CommonIntro.constructor = GD.CommonIntro,
  1227. GD.CommonIntro.prototype = Object.create(PIXI.Container.prototype),
  1228. GD.CommonIntro.prototype.init = function () {
  1229. return 0 == gamen.intro_view_status || "false" == gamen.intro_view_status ? (this.removeChildren(),
  1230. GD.showProgress(),
  1231. void this.sendStartData()) : (GamePadManager.init(),
  1232. GamePadManager.isConnected && GD.isShowPadGuide && (this.gamePadGuide || (this.gamePadGuide = new GD.GamePadGuide),
  1233. this.showGamePadGuide(),
  1234. this.addGamePadEvent()),
  1235. GD.isShowPadGuide = !1,
  1236. void this.setInteractive(!0))
  1237. }
  1238. ,
  1239. GD.CommonIntro.prototype.showGamePadGuide = function () {
  1240. this.gamePadGuide.init(),
  1241. this.addChild(this.gamePadGuide)
  1242. }
  1243. ,
  1244. GD.CommonIntro.prototype.hideGamePadGuide = function () {
  1245. this.removeChild(this.gamePadGuide)
  1246. }
  1247. ,
  1248. GD.CommonIntro.prototype.initHelp = function (t, e, i) {
  1249. 0 != gamen.intro_view_status && "false" != gamen.intro_view_status && (this.helpBtn = this.setSpriteTexture(this.helpBtn, "texture", t),
  1250. this.helpBtn.anchor.set(.5),
  1251. this.helpBtn.x = e,
  1252. this.helpBtn.y = i,
  1253. this.helpBtn.scale.set(1),
  1254. this.addChild(this.helpBtn),
  1255. this.setTouchStartAction(this.helpBtn),
  1256. this.setTouchEnd(this.helpBtn, this.showHelp, this))
  1257. }
  1258. ,
  1259. GD.CommonIntro.prototype.initSound = function (t, e, i) {
  1260. 0 != gamen.intro_view_status && "false" != gamen.intro_view_status && (this.soundpBtn = this.setSpriteTexture(this.soundpBtn, "texture", t),
  1261. this.soundpBtn.anchor.set(.5),
  1262. this.soundpBtn.x = e,
  1263. this.soundpBtn.y = i,
  1264. this.soundpBtn.scale.set(1),
  1265. this.addChild(this.soundpBtn),
  1266. this.setTouchStartAction(this.soundpBtn),
  1267. this.setTouchEnd(this.soundpBtn, this.showSoundPopup, this))
  1268. }
  1269. ,
  1270. GD.CommonIntro.prototype.initStart = function (t, e, i, n, o) {
  1271. this.callBackFunc = n,
  1272. this.callBackTarget = o,
  1273. 0 != gamen.intro_view_status && "false" != gamen.intro_view_status && (this.startBtn = this.setSpriteTexture(this.startBtn, "texture", t),
  1274. this.startBtn.anchor.set(.5),
  1275. this.startBtn.x = e,
  1276. this.startBtn.y = i,
  1277. this.startBtn.scale.set(1),
  1278. this.addChild(this.startBtn),
  1279. this.setTouchStartAction(this.startBtn),
  1280. this.setTouchEnd(this.startBtn, this.sendStartData, this))
  1281. }
  1282. ,
  1283. GD.CommonIntro.prototype.onGamePadEvent = function (t, e) {
  1284. switch (e) {
  1285. case "button-1":
  1286. this.hideGamePadGuide(),
  1287. this.sendStartData();
  1288. break;
  1289. case "button-2":
  1290. this.hideGamePadGuide(),
  1291. this.showHelp();
  1292. break;
  1293. case "button-3":
  1294. this.hideGamePadGuide(),
  1295. this.showSoundPopup();
  1296. break;
  1297. case "button-4":
  1298. this.hideGamePadGuide()
  1299. }
  1300. }
  1301. ,
  1302. GD.CommonIntro.prototype.showHelp = function () {
  1303. this.setInteractive(!1),
  1304. GD.tutorial.initPage(0, "help_start"),
  1305. GD.tutorial.once("TUTORIAL_CLOSE_EVENT", this.hideHelp.bind(this)),
  1306. this.addChild(GD.tutorial)
  1307. }
  1308. ,
  1309. GD.CommonIntro.prototype.hideHelp = function () {
  1310. this.sendStartData()
  1311. }
  1312. ,
  1313. GD.CommonIntro.prototype.showSoundPopup = function () {
  1314. this.setInteractive(!1),
  1315. this.soundPopup.show(0),
  1316. this.addChild(this.soundPopup)
  1317. }
  1318. ,
  1319. GD.CommonIntro.prototype.closeSoundPopup = function () {
  1320. this.removeChild(this.soundPopup),
  1321. this.setInteractive(!0)
  1322. }
  1323. ,
  1324. GD.CommonIntro.prototype.sendStartData = function () {
  1325. this.showLoading(),
  1326. DataManager.start(this.startDataComplete, this)
  1327. }
  1328. ,
  1329. GD.CommonIntro.prototype.startDataComplete = function () {
  1330. this.hideLoading(),
  1331. GD.hideProgress(),
  1332. GD.tutorial && this.removeChild(GD.tutorial),
  1333. this.callBackFunc.call(this.callBackTarget)
  1334. }
  1335. ,
  1336. GD.CommonIntro.prototype.setInteractive = function (t) {
  1337. this.helpBtn.interactive = t,
  1338. this.soundpBtn.interactive = t,
  1339. this.startBtn.interactive = t,
  1340. GamePadManager.isConnected && (t ? this.addGamePadEvent() : this.removeGamePadEvent())
  1341. }
  1342. ,
  1343. GD.CommonIntro.getInstance = function (t, e) {
  1344. return GD.commonIntro || (GD.commonIntro = new GD.CommonIntro(t, e)),
  1345. GD.commonIntro
  1346. }
  1347. }
  1348. , function (t, e) {
  1349. GD.CommonOption = function (t) {
  1350. PIXI.Container.call(this),
  1351. this.scorePopup = new GD.ScorePopup,
  1352. this.scorePopup.on("GAME_REPLAY_EVENT", this.gameReplay.bind(this)),
  1353. this.scorePopup.on("EXIT_EVENT", this.exit.bind(this)),
  1354. this.optionPopup = new GD.OptionPopup,
  1355. this.optionPopup.on("SOUND_POPUP_CLOSE_EVENT", this.closeOptionPopup.bind(this)),
  1356. this.optionPopup.on("TUTORIAL_OPEN_EVENT", this.showTutorial.bind(this)),
  1357. this.optBtn = this.setSpriteTexture(this.optBtn, "texture", "btn_option_" + t),
  1358. this.optBtn.anchor.set(.5),
  1359. this.optBtn.x = GD.width - 40,
  1360. this.optBtn.y = 40,
  1361. this.setTouchStartAction(this.optBtn),
  1362. this.setTouchEnd(this.optBtn, function () {
  1363. this.setInteractive(!1),
  1364. this.emit("OPTION_OPEN_EVENT"),
  1365. this.optionPopup.show(1),
  1366. this.addChild(this.optionPopup)
  1367. }
  1368. .bind(this)),
  1369. this.achievement = new GD.Achievement
  1370. }
  1371. ,
  1372. GD.CommonOption.constructor = GD.CommonOption,
  1373. GD.CommonOption.prototype = Object.create(PIXI.Container.prototype),
  1374. GD.CommonOption.prototype.init = function () {
  1375. this.removeAll(),
  1376. this.addChild(this.optBtn),
  1377. this.achievement.init(),
  1378. this.addChild(this.achievement),
  1379. this.setInteractive(!0)
  1380. }
  1381. ,
  1382. GD.CommonOption.prototype.setAchievement = function (t) {
  1383. this.achievement.show(t)
  1384. }
  1385. ,
  1386. GD.CommonOption.prototype.setInteractive = function (t) {
  1387. this.optBtn.interactive = t
  1388. }
  1389. ,
  1390. GD.CommonOption.prototype.closeOptionPopup = function () {
  1391. this.removeChild(this.optionPopup),
  1392. this.setInteractive(!0),
  1393. this.emit("OPTION_CLOSE_EVENT")
  1394. }
  1395. ,
  1396. GD.CommonOption.prototype.showTutorial = function () {
  1397. GD.tutorial.initPage(0, "help_close"),
  1398. GD.tutorial.on("TUTORIAL_CLOSE_EVENT", this.hideHelp.bind(this)),
  1399. this.addChild(GD.tutorial)
  1400. }
  1401. ,
  1402. GD.CommonOption.prototype.hideHelp = function () {
  1403. this.removeChild(GD.tutorial),
  1404. this.optionPopup.setInteractive(!0)
  1405. }
  1406. ,
  1407. GD.CommonOption.prototype.gameReplay = function () {
  1408. this.gameRestart()
  1409. }
  1410. ,
  1411. GD.CommonOption.prototype.exit = function () {
  1412. gamen.gameout()
  1413. }
  1414. ,
  1415. GD.CommonOption.prototype.finish = function (t) {
  1416. gamen.score_view_status ? (this.scorePopup.show(t),
  1417. this.addChild(this.scorePopup)) : (GD.exitFullScreen(),
  1418. DataManager.finish(t))
  1419. }
  1420. ,
  1421. GD.CommonOption.prototype.gameRestart = function () {
  1422. GD.renderer.view.style.display = "inline",
  1423. this.emit("GAME_RESTART")
  1424. }
  1425. ,
  1426. GD.CommonOption.prototype.removeAll = function () {
  1427. this.removeChildren()
  1428. }
  1429. ,
  1430. GD.CommonOption.getInstance = function (t) {
  1431. return GD.commonOption || (GD.commonOption = new GD.CommonOption(t)),
  1432. GD.commonOption
  1433. }
  1434. }
  1435. ]);
  1436. export default GD