Skip to content

Commit

Permalink
fghfgh
Browse files Browse the repository at this point in the history
  • Loading branch information
codergautam committed Oct 21, 2024
1 parent 8ced40d commit 3809b9a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -849,15 +849,17 @@ setShowCountryButtons(false)

useEffect(() => {

if(inCrazyGames) {
if(inCrazyGames || window.poki) {
if(screen === "home") {
console.log("gameplay stop")
try {
window.CrazyGames.SDK.game.gameplayStop();
} catch(e) {}
try {
if(window.poki) window.PokiSDK.gameplayStop();
} catch(e) {}
} else {
console.log("gameplay start")
try {
window.CrazyGames.SDK.game.gameplayStart();
} catch(e) {}
Expand Down Expand Up @@ -1971,6 +1973,10 @@ setShowCountryButtons(false)
window.poki = true;
// fire your function to continue to game
window.PokiSDK.gameLoadingFinished();
setTimeout(()=>{
console.log("Gameplay start")
window.PokiSDK.gameplayStart();
}, 5000);
}).catch(() => {
console.log("Initialized, something went wrong, load you game anyway");
// fire your function to continue to game
Expand Down

0 comments on commit 3809b9a

Please sign in to comment.