/
crypt
/
NumbersPlay
Обзор
Документация
Войти
/
crypt
/
NumbersPlay
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Assets/PluginYourGames/Modules/InterstitialAdv/Scripts/Editor/CopyCode/InterAdv_js.js
48 строк
2 KB
Crypt
start
16 ноя 2025, 14:28
16 ноя 2025, 14:28
1482007
Код
Авторство
О чём код?
let nowFullAdOpen = false; function InterAdvShow() { try { if (ysdk == null){ LogStyledMessage('Cancel InterAdvShow: SDK is not initialized'); return; } if (nowFullAdOpen == true){ LogStyledMessage('Cancel InterAdvShow: The advertisement is already open'); return; } ysdk.adv.showFullscreenAdv({ callbacks: { onOpen: () => { LogStyledMessage('Open Interstitial Adv'); nowFullAdOpen = true; if (initGame === true) { YG2Instance('OpenInterAdv'); } }, onClose: (wasShown) => { LogStyledMessage('Close Interstitial Adv'); nowFullAdOpen = false; if (initGame === true) { if (wasShown) { YG2Instance('CloseInterAdv', 'true'); } else { YG2Instance('CloseInterAdv', 'false'); } } FocusGame(); }, onError: (error) => { console.error('Error Interstitial Adv', error); nowFullAdOpen = false; YG2Instance('ErrorInterAdv'); FocusGame(); } } }); } catch (e) { console.error('CRASH Interstitial Adv Show: ', e.message); } }