Options
All
  • Public
  • Public/Protected
  • All
Menu

interface shell StartParameters

This object is given to the startGame function

You need to provide 3 fields to deal with each potential result of starting a game:

  • one for when the game is about to start

  • one for when the game is over

  • and one for error handling

Note that if onError is called, the other won't be called (and vice versa)

Summary

Properties

Properties

onError

onError: function

Called when the game cannot start

This could be due to player refusing to pay if it is a paid competition

This could also be due to other type of error

the error given has a type. (TODO add more ErrorType)

Type declaration

    • Parameters

      Returns void

onFinish

onFinish: function

Called when the game is over

The shell will now be visible again

param

contained the score, data and duration of the game

Type declaration

onStart

onStart: function

Called just before the game start

Note that the shell will be hidden until the game is over

Type declaration

    • (): void
    • Returns void