notifications
sidebar_position: 5
Notifications
Game flow
/** Notify that the game is ready to start playing.
* ❗Needed for the connector plugins to work properly
*/
ETHEREAL.notifyGameReady();
/** Notify that the game has been paused. */
ETHEREAL.notifyPauseGame();
/** Notify that the game has been resumed. */
ETHEREAL.notifyResumeGame();
/** (Optional) Notify that autoplay has started, including the number of spins. */
ETHEREAL.notifyStartAutoplay(spins: number);
/** (Optional) Notify that there is an update to autoplay, including the number of spins and optional total win and total bet values. */
ETHEREAL.notifyUpdateAutoplay(spins: number, totalWin?: number, totalBet?: number);
/** (Optional) Notify that autoplay has stopped, including an optional reason, total win, and total bet values. */
ETHEREAL.notifyStopAutoplay(reason?: string, totalWin?: number, totalBet?: number);
/** (Optional) Notify that a bonus feature has started, with an optional bonus name. */
ETHEREAL.notifyStartBonus(bonusName?: string);
/** (Optional) Notify that a bonus feature has ended, with an optional bonus name. */
ETHEREAL.notifyEndBonus(bonusName?: string);
There is an extra notification parameter to notify the end of the round manually. This is normally done by the connector automatically, so the game doesn't need to do it, but sometimes, the game wants to notify the end of the round after all the animations and wins. If that's the case, when doing a play, set the autonotify parameter to false (true by default):
let playResponse: PlayResponse = await ETHEREAL.rgs.play(<playRequest>, <totalBet>, false);
After all the animations, check if the round is finished:
let finished: boolean = ETHEREAL.rgs.data.isRoundEnd();
And then do the notification:
ETHEREAL.notifyRoundEnd();
Functionality
/** Notify that the bet amount has changed, with the new bet value.
* ❗ Needed for the jackpot plugin.
*/
ETHEREAL.notifyBetChange(value: number);
/** Notify that the audio (or a specific type of audio) has been muted or unmuted. */
ETHEREAL.notifyAudioChange(value: boolean, audioType?: string);
/** Notify that the language has changed */
ETHEREAL.notifyLanguageChange(value: string);
/** Notify that the username has changed */
ETHEREAL.notifyUsernameChange(value: string);
/** Notify that the balance has changed, with the new balance value. */
ETHEREAL.notifyBalanceChange(value: number);
UI
/** Notify that the paytable has been shown or hidden, with the boolean value indicating the current state. */
ETHEREAL.notifyShowPaytable(value: boolean);
/** Notify that the game information has been shown or hidden, with the boolean value indicating the current state. */
ETHEREAL.notifyShowGameInfo(value: boolean);
/** Notify that the settings have been shown or hidden, with the boolean value indicating the current state. */
ETHEREAL.notifyShowSettings(value: boolean);