0.1.2 • Published 2 years ago

@lazyfi-learning/gamesdk v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@lazyfi-learning/gamesdk

Library used to integrate lazyfi games with the website

npm version npm downloads

Setup

npm install @lazyfi-learning/gamesdk

Website setup

import { WebSDK } from '@lazyfi-learning/gamesdk'

const websdk = new WebSDK({
    baseURL: 'https://lazyfi.gg' // http://localhost:8080 for dev environment
})

Game setup

import { GameSDK } from '@lazyfi-learning/gamesdk'

const websdk = new GameSDK({
    baseURL: 'https://lazyfi.gg' // http://localhost:8080 for dev environment
})

Events

Subsribe to events using

${websdk|gamesdk}.events.on(event, callbackFn, context)

Event names

  • start - dispatched on game session start
  • stop - dispatched on game session stop
  • question - dispached after receiving question requested by the game
  • answer - dispatched after sending answer to any question
0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago