The Game Client Interface (GCI) is a two-way events communication between the game client and the operator page.
Here is a list of events supported by Fireball to send from the game client to the operator page:
Event Name | Value | Need to trigger when |
---|---|---|
game_loading_started |
- | game loading process start |
game_loading_progress |
float | game loading progress changed. Value indicates current loading progress |
game_loading_complete |
- | game loading progress has been completed |
game_ready_play |
- | game ready to play - all intro videos, splash screens, promo complete and player can start spin/new round/buy game |
game_audio_volume |
float | current audio volume has changed. 0 - means mute, from 0 to 1 - current volume level |
game_bet_turbo |
bool | bet turbo (turbo spin, fast play) feature enabled/disabled in game |
game_bet_placed |
long | player place a bet (start spin, new game round e.t.c.). Value indicated bet in cents |
game_bet_result |
long | bet result received (spin stoped, game round ended e.t.c). Value indicates win amount in cents |
game_bet_update |
long | player changed bet value. Value indicated current bet in cents |
game_balance_updated |
long | balance have been updated after all animations and counting complete. Used to sync in-game balance with operator's page balance |
game_jackpot_updated |
long | jackpot have been updated after all animations, conting complete. Used to sync in-game jackpot value with operator's page balance |
game_autoplay_started |
- | autoplay feature enabled |
game_autoplay_complete |
- | autoplay feature stoped or ended |
game_bonus_feature_started |
string | bonus feature started |
game_bonus_feature_complete |
string | bonus feature completed |
game_open_url |
string | needs that operator's page navigate to some url target |
game_splash_screen_visible |
bool | startup splash screen containing game description/mechanics or promo screen is displayed or closed |
game_confirm_visible |
bool | screen/popup displayed or closed that need players confirmation. |
game_buy_feature_visible |
bool | game menu opened/hided where player can directly buy some game bonus or feature |
game_open_deposit_menu |
- | sends to operator's page for open deposit menu/page |
game_error_message |
string | occurs any ingame error |
game_lock_interaction |
bool | long in-game win animations or game feature mechanics that blocks player interaction with game |
game_closed |
- | game fully closed |
For send any game event to operator page from table above just use appropriate method:
public void SetAudioVolume(float volume)
{
_fireball.GameClientInterface.SendAudioVolume(volume);
}
public void SetLoadingProgress(float progress)
{
_fireball.GameClientInterface.SendLoadingProgress(progress);
}
public void SetLoadingComplete()
{
_fireball.GameClientInterface.SendLoadingComplete();
}
...
Here is a list of events supported by Fireball to get from the operator's page into the game client:
Event Name | Value | Triggered from operator's page when |
---|---|---|
operator_audio_volume |
float | current audio volume has changed. 0 - means mute, from 0 to 1 - current volume level |
operator_bet_turbo |
bool | ask game enable/disable bet turbo (turbo spin/ fast play) feature |
operator_bet_place |
long | ask game start spin/round/buy a game with specific bet value. Bet value sends in cents |
operator_bet_update |
long | ask game to update current bet value. New bet value sends in cents |
operator_update_balance |
- | balance have been changed outside the game. Game need to ask remote server for new updated balance and after notify operator with game event: SendBalanceUpdated(balance) |
operator_stop_autoplay |
- | auto play mode must be stopped |
operator_visible_help |
enum | ask game to show/hide/toggle in game Help screen |
operator_visible_paytable |
enum | ask game to show/hide/toggle in game Paytable screen |
operator_confirmed_action |
- | ask game to confirm and close previosly opened popup/screen. Used with event sent by game client |
operator_pause_game |
bool | ask to pause/resume the game. Pausing means prevent further gameplay, and block user interaction |
operator_close_game |
- | ask to close the game. Go to home page method can be used |
For receive event from operator page just subscribe to appropriate event in Fireball Game Client Interface:
public void Start()
{
fireball = Fireball.Game.Client.Fireball.Instance;
fireball.GameClientInterface.OnAudioVolume += OnAudioVolume;
fireball.GameClientInterface.OnBalanceUpdated += OnBalanceUpdated;
fireball.GameClientInterface.OnStopAutoplay += OnStopAutospins;
...
}
private void OnStopAutospins()
{
Debug.Log("Event Received: OnStopAutospins!");
}
private void OnBalanceUpdated(long balance)
{
Debug.Log($"Event Received: OnBalanceUpdated = {balance}!");
}
private void OnAudioVolume(float percent)
{
Debug.Log($"Event Received: OnAudioVolume = {percent}!");
}