Hi,
Sorry for the newbie question. The question is in the title: how can I integrate Coil web monetization solution?
You can have more information about Coil here: Writing a Web Monetized Game — sharafian
To setup, the first step is to embed payment pointer in the header of the index.html file. I think we can easily do that in the exported HTML5 version of the game. Correct me if I’m wrong.
But how can we trigger specific events like below:
if (document.monetization) {
document.monetization.addEventListener(‘monetizationprogress’, ev => {
globalGameState.cash += Number(ev.detail.amount)
})
}
Thank you in advance for your answers