human.min.js 87 KB

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