Skip to content

Timofffee/instant-games-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instant Games Bridge

One SDK for cross-platform publishing HTML5 games.

Supported platforms:

  1. VK.COM
  2. Yandex Games

Plugins for game engines:

Join community: https://t.me/instant_games_bridge.

Usage

<script src="https://cdn.jsdelivr.net/gh/mewtongames/[email protected]/dist/instant-games-bridge.js"></script>
<script>
    instantGamesBridge
        .initialize()
        .then(() => {
            // Initialized. You can use other methods.
            console.log('Platform ID:', instantGamesBridge.platform.id)
        })
    
    instantGamesBridge.advertisement.on('interstitial_state_changed', state => console.log('Interstitial state:', state))
    instantGamesBridge.advertisement.on('rewarded_state_changed', state => console.log('Rewarded state:', state))

    instantGamesBridge.advertisement.showInterstitial()
    instantGamesBridge.advertisement.showRewarded()

    instantGamesBridge
        .game
        .getData(key)
        .then(data => {
            console.log('Data:', data)
        })

    instantGamesBridge
        .game
        .setData(key, value)
        .then(() => {
            console.log('SetData success')
        })
</script>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published