arrow_back
logo
search
SupportlaunchAPI
menulaunchSign In
close
OverviewConceptsAdmin PanelCloudAPICompliance
Overview
Get StartedAuthorizationMessagingJackpotsMultiplayerGame Client InterfaceErrors Handle
Get StartedAuthorizationGame SessionMessagingBettings and WinningsRandom Numbers GeneratorJackpotsMultiplayerTesting
Overview
Overview
Using the client libraryImplementing an integrationDeploying an integration
Replying to a gamePending Winnings
.NET CoreGoJavaNodeJsPHPPythonRuby
OverviewOverwriting jackpots
launchAPISupport
launchSign In

Jackpots

Before you begin

Before you can send a messages from Client Game to Server Game function, you need to:

  1. Create a Game inside the Fireball Admin panel
  2. Setup Jackpots for your game
  3. Deploy your first simple server game function
  4. Add Fireball SDK into the Unity project

Jackpots Details

Firstly, you need to make sure you add a list of Jackpots Templates Ids into your session messsage on server side (more info). You will get jackpots Details on Fireball succesfully authorise:

AuthRequest request = new AuthRequest(fireball.CurrentSession);
fireball.Authorize(request,
    (response) =>
    {
        // success authorization
        Debug.Log($"Balance: {response.Currency} {response.Balance}");

        // check jackpots details
        if (response.Jackpots != null && response.Jackpots.Count > 0)
        {
            foreach (var jackpotDetails in response.Jackpots)
            {
                Debug.Log($"Jackpot {jackpotDetails.TemplateId}: {jackpotDetails.Value}");
            }
        }
    });

Jackpots Updates

If any player makes a contribution to some jackpot that you have been subscribed to, the game client will receive an update event:

// subscribe to jackpots updates
fireball.OnJackpotUpdate += OnJackpotUpdate;

...

private void OnJackpotUpdate(JackpotUpdateMessage jackpotMessage)
{
    // check jackpots details
    if (jackpotMessage != null)
    {
        Debug.Log($"Jackpot {jackpotMessage.templateId}: {jackpotMessage.amount}");
    }
}

See also

  • Send Messages
  • Sample Project
  • API Reference
Copyright © 2020-. All rights reserved.v1.0.8