本帖最后由 play337 于 2023-9-9 20:33 编辑
如何让[广告]跟[游戏]不同图层....?
https://gamedistribution.com/sdk
我在游戏里面用脚本调用 : gdsdk.showAd();
他会调用到全版面广告之后被我的游戏盖住....有时候会被游戏盖住....有时候又会正常跑到游戏的前面....每次F5刷新过后.....都会不一样....
所以我在想说很可能 gdsdk.showAd(); 调用的广告 使用的图层会跟我的 RPG MAKER MV 做的游戏使用的图层是同一层
才会造成 有时候广告正常在前面. 有时候广告会跑到后面被游戏盖住....
我查找搜寻引擎都找不到这该怎麽办....
gdsdk.showAd();
这是广告商给的代码...
window["GD_OPTIONS"] = { "gameId": "132465789", "onEvent": function(event) { switch (event.name) { case "SDK_GAME_START": // advertisement done, resume game logic and unmute audio break; case "SDK_GAME_PAUSE": // pause game logic / mute audio break; case "SDK_GDPR_TRACKING": // this event is triggered when your user doesn't want to be tracked break; case "SDK_GDPR_TARGETING": // this event is triggered when your user doesn't want personalised targeting of ads and such break; case "SDK_REWARDED_WATCH_COMPLETE": // this event is triggered when your user completely watched rewarded ad break; } }, }; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://html5.api.gamedistribution.com/main.min.js'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'gamedistribution-jssdk'));
window["GD_OPTIONS"] = {
"gameId": "132465789",
"onEvent": function(event) {
switch (event.name) {
case "SDK_GAME_START":
// advertisement done, resume game logic and unmute audio
break;
case "SDK_GAME_PAUSE":
// pause game logic / mute audio
break;
case "SDK_GDPR_TRACKING":
// this event is triggered when your user doesn't want to be tracked
break;
case "SDK_GDPR_TARGETING":
// this event is triggered when your user doesn't want personalised targeting of ads and such
break;
case "SDK_REWARDED_WATCH_COMPLETE":
// this event is triggered when your user completely watched rewarded ad
break;
}
},
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = 'https://html5.api.gamedistribution.com/main.min.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'gamedistribution-jssdk'));
我现在把他的代码 用成一个 .js 放在 PLUGIN 然后 游戏开始 才调用 gdsdk.showAd(); 显示广告....
又被盖住了....又正常了.... 好几天了 一直在这个恶梦里面.... 改甚麽都没有用....
救救我吧... 有办法改哪边可以解决这个问题吗?
|