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.
- package/Apps/30dollarwebsite.html +403 -0
- package/Apps/emulatorjs.html +258 -0
- package/Apps/ruffle.html +93 -0
- package/Apps/soundboard.html +4 -0
- package/Games/WAflash/connect4.html +87 -0
- package/Games/WAflash/dealornodeal.html +89 -0
- package/Games/WAflash/escapingtheprison.html +87 -0
- package/Games/WAflash/fancypants2.html +86 -0
- package/Games/WAflash/freegear.html +87 -0
- package/Games/WAflash/learntoflyidle.html +87 -0
- package/Games/WAflash/papascoop.html +88 -0
- package/Games/WAflash/papashotdog.html +88 -0
- package/Games/WAflash/papaspancake.html +89 -0
- package/Games/WAflash/papaswingeria.html +87 -0
- package/Games/WAflash/pottyracers3.html +86 -0
- package/Games/WAflash/run.html +88 -0
- package/Games/WAflash/run2.html +88 -0
- package/Games/WAflash/shoppingcarthero2.html +88 -0
- package/Games/WAflash/sonicultimate.html +87 -0
- package/Games/WAflash/sugarsugar.html +91 -0
- package/Games/WAflash/vex.html +91 -0
- package/Games/WAflash/worldshardestgame3.html +89 -0
- package/Games/emulated/GBA/emeraldversion.html +30 -0
- package/Games/emulated/GBA/fireredversion.html +30 -0
- package/Games/emulated/GBA/leafgreenversion.html +30 -0
- package/Games/emulated/GBA/rubyversion.html +30 -0
- package/Games/emulated/GBA/sapphireversion.html +30 -0
- package/Games/emulated/N64/mariokart64.html +27 -0
- package/Games/emulated/N64/supermario64.html +30 -0
- package/Games/emulated/SNES/earthbound.html +31 -0
- package/Games/ruffle/MahjongTower.html +40 -0
- package/Games/ruffle/QWOP.html +41 -0
- package/Games/ruffle/achievementunlocked.html +41 -0
- package/Games/ruffle/achievementunlocked2.html +41 -0
- package/Games/ruffle/achievementunlocked3.html +41 -0
- package/Games/ruffle/ageofdefense.html +41 -0
- package/Games/ruffle/ageofwar.html +41 -0
- package/Games/ruffle/ageofwar2.html +41 -0
- package/Games/ruffle/airship.html +41 -0
- package/Games/ruffle/alien.html +41 -0
- package/Games/ruffle/angrybirdshalloween.html +40 -0
- package/Games/ruffle/appleshooter.html +41 -0
- package/Games/ruffle/axisfootballleague.html +40 -0
- package/Games/ruffle/badpiggies.html +41 -0
- package/Games/ruffle/bejeweledtwist.html +41 -0
- package/Games/ruffle/blinding.html +40 -0
- package/Games/ruffle/bloons.html +41 -0
- package/Games/ruffle/bloonsupermonkey.html +40 -0
- package/Games/ruffle/bloxorz.html +40 -0
- package/Games/ruffle/bobtherobber.html +41 -0
- package/Games/ruffle/bowling.html +40 -0
- package/Games/ruffle/breakingthebank.html +40 -0
- package/Games/ruffle/btd.html +40 -0
- package/Games/ruffle/btd2.html +40 -0
- package/Games/ruffle/btd3.html +41 -0
- package/Games/ruffle/btd4.html +41 -0
- package/Games/ruffle/btd4expansion.html +41 -0
- package/Games/ruffle/btd5.html +41 -0
- package/Games/ruffle/bubbleshooter.html +41 -0
- package/Games/ruffle/burgerrun.html +41 -0
- package/Games/ruffle/burritobisonrevenge.html +41 -0
- package/Games/ruffle/crimsonroom.html +41 -0
- package/Games/ruffle/cubefield.html +40 -0
- package/Games/ruffle/curveball.html +41 -0
- package/Games/ruffle/deadzed2.html +40 -0
- package/Games/ruffle/dinerdash.html +41 -0
- package/Games/ruffle/donkeykong.html +40 -0
- package/Games/ruffle/douchebagworkout.html +40 -0
- package/Games/ruffle/douchebagworkout2.html +40 -0
- package/Games/ruffle/ducklife.html +40 -0
- package/Games/ruffle/ducklife2.html +40 -0
- package/Games/ruffle/ducklife3.html +40 -0
- package/Games/ruffle/ducklife4.html +40 -0
- package/Games/ruffle/electricman.html +41 -0
- package/Games/ruffle/electricman2.html +41 -0
- package/Games/ruffle/factoryballs.html +42 -0
- package/Games/ruffle/factoryballs2.html +42 -0
- package/Games/ruffle/factoryballs3.html +41 -0
- package/Games/ruffle/factoryballs4.html +41 -0
- package/Games/ruffle/fancypants.html +41 -0
- package/Games/ruffle/fancypants3.html +41 -0
- package/Games/ruffle/fleeingthecomplex.html +41 -0
- package/Games/ruffle/fltron.html +40 -0
- package/Games/ruffle/foresttemple.html +40 -0
- package/Games/ruffle/frogger.html +40 -0
- package/Games/ruffle/frontlinedefense.html +40 -0
- package/Games/ruffle/galagaflash.html +41 -0
- package/Games/ruffle/gravitee.html +41 -0
- package/Games/ruffle/gravitee2.html +41 -0
- package/Games/ruffle/growcube.html +41 -0
- package/Games/ruffle/growisland.html +41 -0
- package/Games/ruffle/growvalley.html +41 -0
- package/Games/ruffle/impossiblequiz.html +41 -0
- package/Games/ruffle/impossiblequiz2.html +41 -0
- package/Games/ruffle/injustice.html +41 -0
- package/Games/ruffle/isoball.html +41 -0
- package/Games/ruffle/johnnyupgrade.html +41 -0
- package/Games/ruffle/jumpingfinn.html +40 -0
- package/Games/ruffle/kaboomz.html +40 -0
- package/Games/ruffle/leaguebowling.html +41 -0
- package/Games/ruffle/learntofly.html +40 -0
- package/Games/ruffle/learntofly2.html +40 -0
- package/Games/ruffle/learntofly3.html +40 -0
- package/Games/ruffle/lemonade.html +40 -0
- package/Games/ruffle/madness.html +40 -0
- package/Games/ruffle/madnessa.html +40 -0
- package/Games/ruffle/mahjonggardens.html +40 -0
- package/Games/ruffle/mahjongtitans.html +40 -0
- package/Games/ruffle/mariocombat.html +40 -0
- package/Games/ruffle/minecrafttowerdefense.html +41 -0
- package/Games/ruffle/minecrafttowerdefense2.html +41 -0
- package/Games/ruffle/motherload.html +40 -0
- package/Games/ruffle/murder.html +41 -0
- package/Games/ruffle/myfriendpedro.html +40 -0
- package/Games/ruffle/neonrider.html +41 -0
- package/Games/ruffle/nyancatlostinspace.html +40 -0
- package/Games/ruffle/pacman.html +40 -0
- package/Games/ruffle/pacxon.html +41 -0
- package/Games/ruffle/pacxondeluxe.html +41 -0
- package/Games/ruffle/pandemic2.html +41 -0
- package/Games/ruffle/papas sushi.html +40 -0
- package/Games/ruffle/papasbake.html +40 -0
- package/Games/ruffle/papasburgeria.html +41 -0
- package/Games/ruffle/papascheese.html +40 -0
- package/Games/ruffle/papascupcake.html +40 -0
- package/Games/ruffle/papasdonut.html +40 -0
- package/Games/ruffle/papaspasta.html +42 -0
- package/Games/ruffle/papaspizza.html +41 -0
- package/Games/ruffle/papastaco.html +42 -0
- package/Games/ruffle/plantsvszombies.html +41 -0
- package/Games/ruffle/poppit.html +42 -0
- package/Games/ruffle/portaltheflashversion.html +42 -0
- package/Games/ruffle/pottyracers.html +40 -0
- package/Games/ruffle/pottyracers2.html +40 -0
- package/Games/ruffle/raftwars.html +40 -0
- package/Games/ruffle/redball.html +42 -0
- package/Games/ruffle/redball2.html +41 -0
- package/Games/ruffle/redball3.html +41 -0
- package/Games/ruffle/riddleschool.html +41 -0
- package/Games/ruffle/riddleschool2.html +41 -0
- package/Games/ruffle/riddleschool3.html +41 -0
- package/Games/ruffle/riddleschool4.html +41 -0
- package/Games/ruffle/riddleschool5.html +41 -0
- package/Games/ruffle/riddletransfer.html +41 -0
- package/Games/ruffle/riddletransfer2.html +41 -0
- package/Games/ruffle/rollercoaster.html +41 -0
- package/Games/ruffle/shoppingcarthero.html +41 -0
- package/Games/ruffle/spaceiskey.html +41 -0
- package/Games/ruffle/spaceiskey2.html +41 -0
- package/Games/ruffle/sprinter.html +41 -0
- package/Games/ruffle/stealingthediamond.html +41 -0
- package/Games/ruffle/stickwar.html +41 -0
- package/Games/ruffle/strikeforceheros.html +40 -0
- package/Games/ruffle/strikeforceheros2.html +40 -0
- package/Games/ruffle/strikeforcekitty.html +41 -0
- package/Games/ruffle/sugarsugar2.html +41 -0
- package/Games/ruffle/superfighters.html +41 -0
- package/Games/ruffle/supermarioflash.html +41 -0
- package/Games/ruffle/supermarioflash2.html +41 -0
- package/Games/ruffle/supermarioflash3.html +41 -0
- package/Games/ruffle/supersmashflash.html +41 -0
- package/Games/ruffle/tactical.html +41 -0
- package/Games/ruffle/tactical2.html +41 -0
- package/Games/ruffle/tacticaloriginal.html +41 -0
- package/Games/ruffle/territorywar.html +41 -0
- package/Games/ruffle/tetrix2.html +41 -0
- package/Games/ruffle/thefightforglorton.html +41 -0
- package/Games/ruffle/thinice.html +41 -0
- package/Games/ruffle/treasurehunt.html +40 -0
- package/Games/ruffle/unfairmario.html +40 -0
- package/Games/ruffle/vex2.html +41 -0
- package/Games/ruffle/whenpizzaattacks.html +41 -0
- package/Games/ruffle/whg.html +40 -0
- package/Games/ruffle/whg2.html +40 -0
- package/Games/ruffle/whg4.html +40 -0
- package/Games/ruffle/yahootennis.html +40 -0
- package/Games/ruffle/zombocalypse.html +41 -0
- package/Games/singlefile.html +67 -0
- package/Games/sonic-games/sonicthehedgehog.html +29 -0
- package/Games/sonic-games/sonicthehedgehog2.html +31 -0
- package/Games/sonic-games/sonicthehedgehog3.html +23 -0
- package/Games/standalone/10minutestilldawn.html +85 -0
- package/Games/standalone/1v1lol.html +299 -0
- package/Games/standalone/2048.html +129 -0
- package/Games/standalone/2048cupcakes.html +135 -0
- package/Games/standalone/Angry Birds.html +20 -0
- package/Games/standalone/BlockPost.html +36 -0
- package/Games/standalone/BuildNow.gg.html +136 -0
- package/Games/standalone/Flappy Dunk.html +169 -0
- package/Games/standalone/Granny 2.html +202 -0
- package/Games/standalone/Time Shooter 2.html +94 -0
- package/Games/standalone/adventure.html +128 -0
- package/Games/standalone/angrybirdsshowdown.html +24 -0
- package/Games/standalone/badicecream.html +163 -0
- package/Games/standalone/badicecream2.html +165 -0
- package/Games/standalone/badicecream3.html +165 -0
- package/Games/standalone/badtime.html +145 -0
- package/Games/standalone/baldi.html +26 -0
- package/Games/standalone/basketrandom.html +46 -0
- package/Games/standalone/bigtower.html +65 -0
- package/Games/standalone/bigtower2.html +20 -0
- package/Games/standalone/bitlife.html +22 -0
- package/Games/standalone/blockblast.html +94 -0
- package/Games/standalone/blockthepig.html +142 -0
- package/Games/standalone/bowmasters.html +27 -0
- package/Games/standalone/boxingrandom.html +0 -0
- package/Games/standalone/candycrush.html +67 -0
- package/Games/standalone/carssimulator.html +40 -0
- package/Games/standalone/caseclicker.html +310 -0
- package/Games/standalone/cellmachine.html +24 -0
- package/Games/standalone/choppyorc.html +210 -0
- package/Games/standalone/circleo.html +99 -0
- package/Games/standalone/clusterrush.html +47 -0
- package/Games/standalone/colorswitch.html +224 -0
- package/Games/standalone/colortunnel.html +24 -0
- package/Games/standalone/cookieclicker.html +150 -0
- package/Games/standalone/crazycattle3d.html +246 -0
- package/Games/standalone/crossyroad.html +23 -0
- package/Games/standalone/cyberpunkracing.html +37 -0
- package/Games/standalone/dadish.html +46 -0
- package/Games/standalone/dadish2.html +72 -0
- package/Games/standalone/deathrun3d.html +69 -0
- package/Games/standalone/dogeminer.html +996 -0
- package/Games/standalone/dragonvsbricks.html +48 -0
- package/Games/standalone/driftboss.html +146 -0
- package/Games/standalone/drifthunters.html +123 -0
- package/Games/standalone/drivemad.html +41 -0
- package/Games/standalone/ducklifebattle.html +131 -0
- package/Games/standalone/ducklifespace.html +93 -0
- package/Games/standalone/earntodie.html +117 -0
- package/Games/standalone/economical.html +77 -0
- package/Games/standalone/fireandice.html +22 -0
- package/Games/standalone/flappybird.html +137 -0
- package/Games/standalone/fnaf.html +115 -0
- package/Games/standalone/fnaf2.html +34 -0
- package/Games/standalone/fnaf3.html +337 -0
- package/Games/standalone/fnaf4.html +338 -0
- package/Games/standalone/fnaf4halloween.html +34 -0
- package/Games/standalone/fridaynightfunkin.html +76 -0
- package/Games/standalone/fruitninja.html +99 -0
- package/Games/standalone/galaga.html +216 -0
- package/Games/standalone/gdlite.html +255 -0
- package/Games/standalone/gladihoppers.html +36 -0
- package/Games/standalone/googlefeud.html +1163 -0
- package/Games/standalone/granny.html +233 -0
- package/Games/standalone/grindcraft.html +44 -0
- package/Games/standalone/happywheels.html +19 -0
- package/Games/standalone/helixjump.html +30 -0
- package/Games/standalone/holeio.html +53 -0
- package/Games/standalone/idlebreakout.html +95 -0
- package/Games/standalone/jetpack.html +21 -0
- package/Games/standalone/magictiles3.html +111 -0
- package/Games/standalone/monkeymart.html +365 -0
- package/Games/standalone/motox3m.html +1 -0
- package/Games/standalone/motox3mpoolparty.html +18 -0
- package/Games/standalone/motox3mspookyland.html +68 -0
- package/Games/standalone/ngon.html +577 -0
- package/Games/standalone/omnombounce.html +82 -0
- package/Games/standalone/pacmanoriginal.html +30 -0
- package/Games/standalone/papasfreezeria.html +348 -0
- package/Games/standalone/paperio2.html +54 -0
- package/Games/standalone/parkingfury.html +45 -0
- package/Games/standalone/polytrack.html +40 -0
- package/Games/standalone/pou.html +73 -0
- package/Games/standalone/retrobowl.html +119 -0
- package/Games/standalone/retrobowlcollege.html +179 -0
- package/Games/standalone/rocketsoccer.html +39 -0
- package/Games/standalone/run3.html +64 -0
- package/Games/standalone/slender.html +40 -0
- package/Games/standalone/slope.html +59 -0
- package/Games/standalone/snowrider3d.html +27 -0
- package/Games/standalone/soccerrandom.html +0 -0
- package/Games/standalone/solitaire.html +32 -0
- package/Games/standalone/sonicroboblast2.html +2169 -0
- package/Games/standalone/spacewaves.html +239 -0
- package/Games/standalone/stack.html +639 -0
- package/Games/standalone/station141.html +27 -0
- package/Games/standalone/stickmangolf.html +22 -0
- package/Games/standalone/stickmanhook.html +39 -0
- package/Games/standalone/stuntcars3.html +26 -0
- package/Games/standalone/subwaysurfers.html +55 -0
- package/Games/standalone/superhot.html +35 -0
- package/Games/standalone/superliquidsoccer.html +311 -0
- package/Games/standalone/templerun2.html +38 -0
- package/Games/standalone/timeshooter.html +99 -0
- package/Games/standalone/tinyfishing.html +139 -0
- package/Games/standalone/tombofthemask.html +14 -0
- package/Games/standalone/triviacrack.html +24 -0
- package/Games/standalone/tubejumpers.html +20 -0
- package/Games/standalone/ultimatecustomnight.html +34 -0
- package/Games/standalone/undertheredsky.html +46 -0
- package/Games/standalone/vex3.html +42 -0
- package/Games/standalone/vex4.html +38 -0
- package/Games/standalone/vex5.html +43 -0
- package/Games/standalone/vex6.html +56 -0
- package/Games/standalone/vex7.html +53 -0
- package/Games/standalone/vex8.html +46 -0
- package/Games/standalone/wordle.html +27 -0
- package/Games/standalone/worldtour.html +95 -0
- package/backup.html +2016 -0
- package/games.json +2373 -0
- package/index.html +2302 -0
- package/new logo.png +0 -0
- package/package.json +21 -0
- package/port.html +0 -0
- package/readme.md +1 -0
- package/singlefilegames.json +2266 -0
- package/sounds/ambience.mp3 +0 -0
- package/sounds/click.mp3 +0 -0
- package/sounds/close.mp3 +0 -0
- package/sounds/hover.mp3 +0 -0
- 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>
|