alexrsworld 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/Apps/30dollarwebsite.html +403 -0
  2. package/Apps/emulatorjs.html +258 -0
  3. package/Apps/ruffle.html +93 -0
  4. package/Apps/soundboard.html +4 -0
  5. package/Games/WAflash/connect4.html +87 -0
  6. package/Games/WAflash/dealornodeal.html +89 -0
  7. package/Games/WAflash/escapingtheprison.html +87 -0
  8. package/Games/WAflash/fancypants2.html +86 -0
  9. package/Games/WAflash/freegear.html +87 -0
  10. package/Games/WAflash/learntoflyidle.html +87 -0
  11. package/Games/WAflash/papascoop.html +88 -0
  12. package/Games/WAflash/papashotdog.html +88 -0
  13. package/Games/WAflash/papaspancake.html +89 -0
  14. package/Games/WAflash/papaswingeria.html +87 -0
  15. package/Games/WAflash/pottyracers3.html +86 -0
  16. package/Games/WAflash/run.html +88 -0
  17. package/Games/WAflash/run2.html +88 -0
  18. package/Games/WAflash/shoppingcarthero2.html +88 -0
  19. package/Games/WAflash/sonicultimate.html +87 -0
  20. package/Games/WAflash/sugarsugar.html +91 -0
  21. package/Games/WAflash/vex.html +91 -0
  22. package/Games/WAflash/worldshardestgame3.html +89 -0
  23. package/Games/emulated/GBA/emeraldversion.html +30 -0
  24. package/Games/emulated/GBA/fireredversion.html +30 -0
  25. package/Games/emulated/GBA/leafgreenversion.html +30 -0
  26. package/Games/emulated/GBA/rubyversion.html +30 -0
  27. package/Games/emulated/GBA/sapphireversion.html +30 -0
  28. package/Games/emulated/N64/mariokart64.html +27 -0
  29. package/Games/emulated/N64/supermario64.html +30 -0
  30. package/Games/emulated/SNES/earthbound.html +31 -0
  31. package/Games/ruffle/MahjongTower.html +40 -0
  32. package/Games/ruffle/QWOP.html +41 -0
  33. package/Games/ruffle/achievementunlocked.html +41 -0
  34. package/Games/ruffle/achievementunlocked2.html +41 -0
  35. package/Games/ruffle/achievementunlocked3.html +41 -0
  36. package/Games/ruffle/ageofdefense.html +41 -0
  37. package/Games/ruffle/ageofwar.html +41 -0
  38. package/Games/ruffle/ageofwar2.html +41 -0
  39. package/Games/ruffle/airship.html +41 -0
  40. package/Games/ruffle/alien.html +41 -0
  41. package/Games/ruffle/angrybirdshalloween.html +40 -0
  42. package/Games/ruffle/appleshooter.html +41 -0
  43. package/Games/ruffle/axisfootballleague.html +40 -0
  44. package/Games/ruffle/badpiggies.html +41 -0
  45. package/Games/ruffle/bejeweledtwist.html +41 -0
  46. package/Games/ruffle/blinding.html +40 -0
  47. package/Games/ruffle/bloons.html +41 -0
  48. package/Games/ruffle/bloonsupermonkey.html +40 -0
  49. package/Games/ruffle/bloxorz.html +40 -0
  50. package/Games/ruffle/bobtherobber.html +41 -0
  51. package/Games/ruffle/bowling.html +40 -0
  52. package/Games/ruffle/breakingthebank.html +40 -0
  53. package/Games/ruffle/btd.html +40 -0
  54. package/Games/ruffle/btd2.html +40 -0
  55. package/Games/ruffle/btd3.html +41 -0
  56. package/Games/ruffle/btd4.html +41 -0
  57. package/Games/ruffle/btd4expansion.html +41 -0
  58. package/Games/ruffle/btd5.html +41 -0
  59. package/Games/ruffle/bubbleshooter.html +41 -0
  60. package/Games/ruffle/burgerrun.html +41 -0
  61. package/Games/ruffle/burritobisonrevenge.html +41 -0
  62. package/Games/ruffle/crimsonroom.html +41 -0
  63. package/Games/ruffle/cubefield.html +40 -0
  64. package/Games/ruffle/curveball.html +41 -0
  65. package/Games/ruffle/deadzed2.html +40 -0
  66. package/Games/ruffle/dinerdash.html +41 -0
  67. package/Games/ruffle/donkeykong.html +40 -0
  68. package/Games/ruffle/douchebagworkout.html +40 -0
  69. package/Games/ruffle/douchebagworkout2.html +40 -0
  70. package/Games/ruffle/ducklife.html +40 -0
  71. package/Games/ruffle/ducklife2.html +40 -0
  72. package/Games/ruffle/ducklife3.html +40 -0
  73. package/Games/ruffle/ducklife4.html +40 -0
  74. package/Games/ruffle/electricman.html +41 -0
  75. package/Games/ruffle/electricman2.html +41 -0
  76. package/Games/ruffle/factoryballs.html +42 -0
  77. package/Games/ruffle/factoryballs2.html +42 -0
  78. package/Games/ruffle/factoryballs3.html +41 -0
  79. package/Games/ruffle/factoryballs4.html +41 -0
  80. package/Games/ruffle/fancypants.html +41 -0
  81. package/Games/ruffle/fancypants3.html +41 -0
  82. package/Games/ruffle/fleeingthecomplex.html +41 -0
  83. package/Games/ruffle/fltron.html +40 -0
  84. package/Games/ruffle/foresttemple.html +40 -0
  85. package/Games/ruffle/frogger.html +40 -0
  86. package/Games/ruffle/frontlinedefense.html +40 -0
  87. package/Games/ruffle/galagaflash.html +41 -0
  88. package/Games/ruffle/gravitee.html +41 -0
  89. package/Games/ruffle/gravitee2.html +41 -0
  90. package/Games/ruffle/growcube.html +41 -0
  91. package/Games/ruffle/growisland.html +41 -0
  92. package/Games/ruffle/growvalley.html +41 -0
  93. package/Games/ruffle/impossiblequiz.html +41 -0
  94. package/Games/ruffle/impossiblequiz2.html +41 -0
  95. package/Games/ruffle/injustice.html +41 -0
  96. package/Games/ruffle/isoball.html +41 -0
  97. package/Games/ruffle/johnnyupgrade.html +41 -0
  98. package/Games/ruffle/jumpingfinn.html +40 -0
  99. package/Games/ruffle/kaboomz.html +40 -0
  100. package/Games/ruffle/leaguebowling.html +41 -0
  101. package/Games/ruffle/learntofly.html +40 -0
  102. package/Games/ruffle/learntofly2.html +40 -0
  103. package/Games/ruffle/learntofly3.html +40 -0
  104. package/Games/ruffle/lemonade.html +40 -0
  105. package/Games/ruffle/madness.html +40 -0
  106. package/Games/ruffle/madnessa.html +40 -0
  107. package/Games/ruffle/mahjonggardens.html +40 -0
  108. package/Games/ruffle/mahjongtitans.html +40 -0
  109. package/Games/ruffle/mariocombat.html +40 -0
  110. package/Games/ruffle/minecrafttowerdefense.html +41 -0
  111. package/Games/ruffle/minecrafttowerdefense2.html +41 -0
  112. package/Games/ruffle/motherload.html +40 -0
  113. package/Games/ruffle/murder.html +41 -0
  114. package/Games/ruffle/myfriendpedro.html +40 -0
  115. package/Games/ruffle/neonrider.html +41 -0
  116. package/Games/ruffle/nyancatlostinspace.html +40 -0
  117. package/Games/ruffle/pacman.html +40 -0
  118. package/Games/ruffle/pacxon.html +41 -0
  119. package/Games/ruffle/pacxondeluxe.html +41 -0
  120. package/Games/ruffle/pandemic2.html +41 -0
  121. package/Games/ruffle/papas sushi.html +40 -0
  122. package/Games/ruffle/papasbake.html +40 -0
  123. package/Games/ruffle/papasburgeria.html +41 -0
  124. package/Games/ruffle/papascheese.html +40 -0
  125. package/Games/ruffle/papascupcake.html +40 -0
  126. package/Games/ruffle/papasdonut.html +40 -0
  127. package/Games/ruffle/papaspasta.html +42 -0
  128. package/Games/ruffle/papaspizza.html +41 -0
  129. package/Games/ruffle/papastaco.html +42 -0
  130. package/Games/ruffle/plantsvszombies.html +41 -0
  131. package/Games/ruffle/poppit.html +42 -0
  132. package/Games/ruffle/portaltheflashversion.html +42 -0
  133. package/Games/ruffle/pottyracers.html +40 -0
  134. package/Games/ruffle/pottyracers2.html +40 -0
  135. package/Games/ruffle/raftwars.html +40 -0
  136. package/Games/ruffle/redball.html +42 -0
  137. package/Games/ruffle/redball2.html +41 -0
  138. package/Games/ruffle/redball3.html +41 -0
  139. package/Games/ruffle/riddleschool.html +41 -0
  140. package/Games/ruffle/riddleschool2.html +41 -0
  141. package/Games/ruffle/riddleschool3.html +41 -0
  142. package/Games/ruffle/riddleschool4.html +41 -0
  143. package/Games/ruffle/riddleschool5.html +41 -0
  144. package/Games/ruffle/riddletransfer.html +41 -0
  145. package/Games/ruffle/riddletransfer2.html +41 -0
  146. package/Games/ruffle/rollercoaster.html +41 -0
  147. package/Games/ruffle/shoppingcarthero.html +41 -0
  148. package/Games/ruffle/spaceiskey.html +41 -0
  149. package/Games/ruffle/spaceiskey2.html +41 -0
  150. package/Games/ruffle/sprinter.html +41 -0
  151. package/Games/ruffle/stealingthediamond.html +41 -0
  152. package/Games/ruffle/stickwar.html +41 -0
  153. package/Games/ruffle/strikeforceheros.html +40 -0
  154. package/Games/ruffle/strikeforceheros2.html +40 -0
  155. package/Games/ruffle/strikeforcekitty.html +41 -0
  156. package/Games/ruffle/sugarsugar2.html +41 -0
  157. package/Games/ruffle/superfighters.html +41 -0
  158. package/Games/ruffle/supermarioflash.html +41 -0
  159. package/Games/ruffle/supermarioflash2.html +41 -0
  160. package/Games/ruffle/supermarioflash3.html +41 -0
  161. package/Games/ruffle/supersmashflash.html +41 -0
  162. package/Games/ruffle/tactical.html +41 -0
  163. package/Games/ruffle/tactical2.html +41 -0
  164. package/Games/ruffle/tacticaloriginal.html +41 -0
  165. package/Games/ruffle/territorywar.html +41 -0
  166. package/Games/ruffle/tetrix2.html +41 -0
  167. package/Games/ruffle/thefightforglorton.html +41 -0
  168. package/Games/ruffle/thinice.html +41 -0
  169. package/Games/ruffle/treasurehunt.html +40 -0
  170. package/Games/ruffle/unfairmario.html +40 -0
  171. package/Games/ruffle/vex2.html +41 -0
  172. package/Games/ruffle/whenpizzaattacks.html +41 -0
  173. package/Games/ruffle/whg.html +40 -0
  174. package/Games/ruffle/whg2.html +40 -0
  175. package/Games/ruffle/whg4.html +40 -0
  176. package/Games/ruffle/yahootennis.html +40 -0
  177. package/Games/ruffle/zombocalypse.html +41 -0
  178. package/Games/singlefile.html +67 -0
  179. package/Games/sonic-games/sonicthehedgehog.html +29 -0
  180. package/Games/sonic-games/sonicthehedgehog2.html +31 -0
  181. package/Games/sonic-games/sonicthehedgehog3.html +23 -0
  182. package/Games/standalone/10minutestilldawn.html +85 -0
  183. package/Games/standalone/1v1lol.html +299 -0
  184. package/Games/standalone/2048.html +129 -0
  185. package/Games/standalone/2048cupcakes.html +135 -0
  186. package/Games/standalone/Angry Birds.html +20 -0
  187. package/Games/standalone/BlockPost.html +36 -0
  188. package/Games/standalone/BuildNow.gg.html +136 -0
  189. package/Games/standalone/Flappy Dunk.html +169 -0
  190. package/Games/standalone/Granny 2.html +202 -0
  191. package/Games/standalone/Time Shooter 2.html +94 -0
  192. package/Games/standalone/adventure.html +128 -0
  193. package/Games/standalone/angrybirdsshowdown.html +24 -0
  194. package/Games/standalone/badicecream.html +163 -0
  195. package/Games/standalone/badicecream2.html +165 -0
  196. package/Games/standalone/badicecream3.html +165 -0
  197. package/Games/standalone/badtime.html +145 -0
  198. package/Games/standalone/baldi.html +26 -0
  199. package/Games/standalone/basketrandom.html +46 -0
  200. package/Games/standalone/bigtower.html +65 -0
  201. package/Games/standalone/bigtower2.html +20 -0
  202. package/Games/standalone/bitlife.html +22 -0
  203. package/Games/standalone/blockblast.html +94 -0
  204. package/Games/standalone/blockthepig.html +142 -0
  205. package/Games/standalone/bowmasters.html +27 -0
  206. package/Games/standalone/boxingrandom.html +0 -0
  207. package/Games/standalone/candycrush.html +67 -0
  208. package/Games/standalone/carssimulator.html +40 -0
  209. package/Games/standalone/caseclicker.html +310 -0
  210. package/Games/standalone/cellmachine.html +24 -0
  211. package/Games/standalone/choppyorc.html +210 -0
  212. package/Games/standalone/circleo.html +99 -0
  213. package/Games/standalone/clusterrush.html +47 -0
  214. package/Games/standalone/colorswitch.html +224 -0
  215. package/Games/standalone/colortunnel.html +24 -0
  216. package/Games/standalone/cookieclicker.html +150 -0
  217. package/Games/standalone/crazycattle3d.html +246 -0
  218. package/Games/standalone/crossyroad.html +23 -0
  219. package/Games/standalone/cyberpunkracing.html +37 -0
  220. package/Games/standalone/dadish.html +46 -0
  221. package/Games/standalone/dadish2.html +72 -0
  222. package/Games/standalone/deathrun3d.html +69 -0
  223. package/Games/standalone/dogeminer.html +996 -0
  224. package/Games/standalone/dragonvsbricks.html +48 -0
  225. package/Games/standalone/driftboss.html +146 -0
  226. package/Games/standalone/drifthunters.html +123 -0
  227. package/Games/standalone/drivemad.html +41 -0
  228. package/Games/standalone/ducklifebattle.html +131 -0
  229. package/Games/standalone/ducklifespace.html +93 -0
  230. package/Games/standalone/earntodie.html +117 -0
  231. package/Games/standalone/economical.html +77 -0
  232. package/Games/standalone/fireandice.html +22 -0
  233. package/Games/standalone/flappybird.html +137 -0
  234. package/Games/standalone/fnaf.html +115 -0
  235. package/Games/standalone/fnaf2.html +34 -0
  236. package/Games/standalone/fnaf3.html +337 -0
  237. package/Games/standalone/fnaf4.html +338 -0
  238. package/Games/standalone/fnaf4halloween.html +34 -0
  239. package/Games/standalone/fridaynightfunkin.html +76 -0
  240. package/Games/standalone/fruitninja.html +99 -0
  241. package/Games/standalone/galaga.html +216 -0
  242. package/Games/standalone/gdlite.html +255 -0
  243. package/Games/standalone/gladihoppers.html +36 -0
  244. package/Games/standalone/googlefeud.html +1163 -0
  245. package/Games/standalone/granny.html +233 -0
  246. package/Games/standalone/grindcraft.html +44 -0
  247. package/Games/standalone/happywheels.html +19 -0
  248. package/Games/standalone/helixjump.html +30 -0
  249. package/Games/standalone/holeio.html +53 -0
  250. package/Games/standalone/idlebreakout.html +95 -0
  251. package/Games/standalone/jetpack.html +21 -0
  252. package/Games/standalone/magictiles3.html +111 -0
  253. package/Games/standalone/monkeymart.html +365 -0
  254. package/Games/standalone/motox3m.html +1 -0
  255. package/Games/standalone/motox3mpoolparty.html +18 -0
  256. package/Games/standalone/motox3mspookyland.html +68 -0
  257. package/Games/standalone/ngon.html +577 -0
  258. package/Games/standalone/omnombounce.html +82 -0
  259. package/Games/standalone/pacmanoriginal.html +30 -0
  260. package/Games/standalone/papasfreezeria.html +348 -0
  261. package/Games/standalone/paperio2.html +54 -0
  262. package/Games/standalone/parkingfury.html +45 -0
  263. package/Games/standalone/polytrack.html +40 -0
  264. package/Games/standalone/pou.html +73 -0
  265. package/Games/standalone/retrobowl.html +119 -0
  266. package/Games/standalone/retrobowlcollege.html +179 -0
  267. package/Games/standalone/rocketsoccer.html +39 -0
  268. package/Games/standalone/run3.html +64 -0
  269. package/Games/standalone/slender.html +40 -0
  270. package/Games/standalone/slope.html +59 -0
  271. package/Games/standalone/snowrider3d.html +27 -0
  272. package/Games/standalone/soccerrandom.html +0 -0
  273. package/Games/standalone/solitaire.html +32 -0
  274. package/Games/standalone/sonicroboblast2.html +2169 -0
  275. package/Games/standalone/spacewaves.html +239 -0
  276. package/Games/standalone/stack.html +639 -0
  277. package/Games/standalone/station141.html +27 -0
  278. package/Games/standalone/stickmangolf.html +22 -0
  279. package/Games/standalone/stickmanhook.html +39 -0
  280. package/Games/standalone/stuntcars3.html +26 -0
  281. package/Games/standalone/subwaysurfers.html +55 -0
  282. package/Games/standalone/superhot.html +35 -0
  283. package/Games/standalone/superliquidsoccer.html +311 -0
  284. package/Games/standalone/templerun2.html +38 -0
  285. package/Games/standalone/timeshooter.html +99 -0
  286. package/Games/standalone/tinyfishing.html +139 -0
  287. package/Games/standalone/tombofthemask.html +14 -0
  288. package/Games/standalone/triviacrack.html +24 -0
  289. package/Games/standalone/tubejumpers.html +20 -0
  290. package/Games/standalone/ultimatecustomnight.html +34 -0
  291. package/Games/standalone/undertheredsky.html +46 -0
  292. package/Games/standalone/vex3.html +42 -0
  293. package/Games/standalone/vex4.html +38 -0
  294. package/Games/standalone/vex5.html +43 -0
  295. package/Games/standalone/vex6.html +56 -0
  296. package/Games/standalone/vex7.html +53 -0
  297. package/Games/standalone/vex8.html +46 -0
  298. package/Games/standalone/wordle.html +27 -0
  299. package/Games/standalone/worldtour.html +95 -0
  300. package/backup.html +2016 -0
  301. package/games.json +2373 -0
  302. package/index.html +2302 -0
  303. package/new logo.png +0 -0
  304. package/package.json +21 -0
  305. package/port.html +0 -0
  306. package/readme.md +1 -0
  307. package/singlefilegames.json +2266 -0
  308. package/sounds/ambience.mp3 +0 -0
  309. package/sounds/click.mp3 +0 -0
  310. package/sounds/close.mp3 +0 -0
  311. package/sounds/hover.mp3 +0 -0
  312. package/sounds/select.mp3 +0 -0
@@ -0,0 +1,239 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-us">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
7
+ <title>Space Waves</title>
8
+ <base href="https://cdn.jsdelivr.net/gh/dskjfoisjfsjio/Standalone-games@main/Space%20Waves/">
9
+ <link rel="icon" href="/new logo.png">
10
+ <link rel="stylesheet" href="TemplateData/style.css">
11
+ <link rel="manifest" href="manifest.json">
12
+ </head>
13
+ <body class="noselect">
14
+ <div id="unity-container">
15
+ <canvas id="unity-canvas"></canvas>
16
+ </div>
17
+ <div id="loading-cover" style="display:none;">
18
+ <div id="unity-loading-bar">
19
+ <div id="unity-logo"><img src="logo.png"></div>
20
+ </br></br></br>
21
+ <div id="unity-progress-bar-empty" style="display: none;">
22
+ <div id="unity-progress-bar-full"></div>
23
+ </div>
24
+ <div class="spinner"></div>
25
+ </div>
26
+ </div>
27
+
28
+ <script src="./microsoftDataMigrationDO.js"></script>
29
+ <script>
30
+ document.addEventListener("DOMContentLoaded", () => {
31
+ microsoftMigration();
32
+ });
33
+
34
+ window.addEventListener("PlayerPrefsReady", () => {
35
+ migratePlayerPrefs();
36
+ });
37
+ </script>
38
+
39
+ <script>
40
+ window.addEventListener("load", function () {
41
+ if ("serviceWorker" in navigator) {
42
+ navigator.serviceWorker.register("ServiceWorker.js");
43
+ }
44
+ });
45
+
46
+ const container = document.querySelector("#unity-container");
47
+ const canvas = document.querySelector("#unity-canvas");
48
+ const loadingCover = document.querySelector("#loading-cover");
49
+ const progressBarEmpty = document.querySelector("#unity-progress-bar-empty");
50
+ const progressBarFull = document.querySelector("#unity-progress-bar-full");
51
+ const spinner = document.querySelector('.spinner');
52
+
53
+ const buildUrl = "Build";
54
+ const loaderUrl = buildUrl + "/dae5c7bd2b15915f51ae4e56b8f5367d.loader.js";
55
+ const config = {
56
+ dataUrl: buildUrl + "/2c9bc0098489d5e75341d59019263bfa.data.unityweb",
57
+ frameworkUrl: buildUrl + "/e00c2c9270a426875b72c5a93857f1df.framework.js.unityweb",
58
+ codeUrl: buildUrl + "/08df7b704ea55604fb660e8664abbbb4.wasm.unityweb",
59
+ streamingAssetsUrl: "StreamingAssets",
60
+ companyName: "do.Games",
61
+ productName: "Space Waves",
62
+ productVersion: "1.1.2-ms",
63
+ matchWebGLToCanvasSize: "false"
64
+ };
65
+
66
+ loadingCover.style.display = "";
67
+
68
+ var needMigrate = false;
69
+ var gameInstance;
70
+ var script = document.createElement("script");
71
+ script.src = loaderUrl;
72
+ script.onload = () => {
73
+ createUnityInstance(canvas, config, (progress) => {
74
+ spinner.style.display = "none";
75
+ progressBarEmpty.style.display = "";
76
+ progressBarFull.style.width = 100 * progress + "%";
77
+ }).then((unityInstance) => {
78
+ console.log("<do.G> Unity inited");
79
+ gameInstance = unityInstance;
80
+ loadingCover.style.display = "none";
81
+ resizeCanvas();
82
+ loadAds();
83
+
84
+ if (needMigrate) {
85
+ needMigrate = false;
86
+ gameInstance.SendMessage('MSStartSDK', 'OnMigratePlayerPrefs', window["fetchPlayerPrefs"]);
87
+ }
88
+
89
+ }).catch((message) => {
90
+ alert(message);
91
+ });
92
+ };
93
+ document.body.appendChild(script);
94
+
95
+ // Focus
96
+ function setFocus() {
97
+ container.focus();
98
+ window.focus();
99
+ canvas.focus();
100
+ }
101
+
102
+ window.addEventListener("touchstart", () => {
103
+ setFocus();
104
+ });
105
+ window.addEventListener("pointerdown", () => {
106
+ setFocus();
107
+ });
108
+ window.addEventListener("resize", () => {
109
+ setFocus();
110
+ resizeCanvas();
111
+ });
112
+
113
+ function resizeCanvas() {
114
+ var pixelRatio = window.devicePixelRatio || 1;
115
+ var width = canvas.clientWidth * pixelRatio;
116
+ var height = canvas.clientHeight * pixelRatio;
117
+
118
+ if (canvas.width != width || canvas.height != height) {
119
+ if (height > 1080) {
120
+ canvas.width = Math.floor(width / height * 1080);
121
+ canvas.height = 1080;
122
+ }
123
+ else
124
+ {
125
+ canvas.width = width;
126
+ canvas.height = height;
127
+ }
128
+ }
129
+ }
130
+
131
+ function migratePlayerPrefs() {
132
+ if (typeof gameInstance !== 'undefined') {
133
+ gameInstance.SendMessage('MSStartSDK', 'OnMigratePlayerPrefs', window["fetchPlayerPrefs"]);
134
+ } else {
135
+ needMigrate = true;
136
+ }
137
+ }
138
+ </script>
139
+
140
+ <script src="https://assets.msn.com/staticsb/statics/latest/msstart-games-sdk/msstart-v1.0.0-rc.19.min.js"></script>
141
+
142
+ <script>
143
+
144
+ var _interstitialAdInstance = null;
145
+ var _rewardedAdInstance = null;
146
+
147
+ function loadAds() {
148
+ loadInterstitialAd();
149
+ loadRewardedAd();
150
+ }
151
+
152
+ function loadInterstitialAd() {
153
+ _interstitialAdInstance = null;
154
+
155
+ $msstart.loadAdsAsync().then(adInstance => {
156
+ // Use the adInstance.instanceId to make a call to showAdsAsync
157
+ _interstitialAdInstance = adInstance;
158
+ console.log("Interstitial ad successfully loaded!");
159
+ }).catch(e => {
160
+ console.error('<do.G> Error loading interstitial ad. Will retry in 20 seconds...', e);
161
+ setTimeout(loadInterstitialAd, 20000);
162
+ });
163
+ }
164
+
165
+ function loadRewardedAd() {
166
+ _rewardedAdInstance = null;
167
+
168
+ $msstart.loadAdsAsync(true).then(adInstance => {
169
+ // Pass in boolean true for the optional parameter isRewardedAd, to fetch Rewarded ads
170
+ _rewardedAdInstance = adInstance;
171
+ console.log("Rewarded ad successfully loaded!");
172
+ }).catch(e => {
173
+ console.error('<do.G> Error loading rewarded ad. Will retry in 20 seconds...', e);
174
+ setTimeout(loadRewardedAd, 20000);
175
+ });
176
+ }
177
+
178
+ async function showInterstitialAd() {
179
+ if (_interstitialAdInstance == null) {
180
+ gameInstance.SendMessage('MSStartSDK', 'OnInterstitialAdShowError');
181
+ return;
182
+ }
183
+
184
+ let t;
185
+
186
+ try {
187
+ t = await $msstart.showAdsAsync(_interstitialAdInstance.instanceId);
188
+ } catch (e) {
189
+ console.error('<do.G> Error show interstitial ad: ', e);
190
+ gameInstance.SendMessage('MSStartSDK', 'OnInterstitialAdShowError');
191
+ loadInterstitialAd();
192
+ }
193
+
194
+ if (t) {
195
+ try {
196
+ await t.showAdsCompletedAsync;
197
+ gameInstance.SendMessage('MSStartSDK', 'OnInterstitialAdClose');
198
+ loadInterstitialAd();
199
+ } catch (e) {
200
+ console.error('<do.G> Error interstitial showAdsCompletedAsync: ', e);
201
+ gameInstance.SendMessage('MSStartSDK', 'OnInterstitialAdShowError');
202
+ loadInterstitialAd();
203
+ }
204
+ }
205
+ }
206
+
207
+ async function showRewardedAd() {
208
+ if (_rewardedAdInstance == null) {
209
+ gameInstance.SendMessage('MSStartSDK', 'OnRewardedAdShowError');
210
+ return;
211
+ }
212
+
213
+ let t;
214
+
215
+ try {
216
+ t = await $msstart.showAdsAsync(_rewardedAdInstance.instanceId);
217
+ } catch (e) {
218
+ console.error('<do.G> Error show rewarded ad: ', e);
219
+ gameInstance.SendMessage('MSStartSDK', 'OnRewardedAdShowError');
220
+ loadRewardedAd();
221
+ }
222
+
223
+ if (t) {
224
+ try {
225
+ await t.showAdsCompletedAsync;
226
+ gameInstance.SendMessage('MSStartSDK', 'OnReward');
227
+ loadRewardedAd();
228
+ } catch (e) {
229
+ console.error('<do.G> Error rewarded showAdsCompletedAsync: ', e);
230
+ gameInstance.SendMessage('MSStartSDK', 'OnRewardedAdShowError');
231
+ loadRewardedAd();
232
+ }
233
+ }
234
+ }
235
+
236
+ </script>
237
+
238
+ </body>
239
+ </html>