Example #1
0
    /// Handler for the player logging in. Refreshes the recipe and
    /// character list from ChilliConnect
    ///
    /// @param chilliConnectId
    ///     The ChilliConnectId of the player logged in
    ///
    private void OnPlayerLoggedIn(string chilliConnectId)
    {
        EconomySystem.Get().GetPlayerCoinBalance();
        EconomySystem.Get().GetRecipeMetaData(AccountSystem.Get().TestGroup);
        EconomySystem.Get().GetPlayersCharacterList();

        m_loginLabel.text = "Logged in as " + chilliConnectId;
    }
Example #2
0
    /// Registers handlers for economy and account system
    ///
    private void Start()
    {
        AccountSystem.Get().OnPlayerLoggedIn += OnPlayerLoggedIn;

        EconomySystem.Get().CurrencyBalanceRetrieved += CurrencyBalanceRetrieved;
        EconomySystem.Get().OnRecipeListPopulate     += (recipes) => m_recipeListUIController.populateRecipeList(recipes);
        EconomySystem.Get().OnCharacterListPopulate  += (characters) => m_characterListUIController.populateCharacterList(characters);
    }
Example #3
0
 /// When the Create button is clicked, use the EconomySystem to
 /// to call a script on server that will generate a new character
 /// and add it to the users inventory
 ///
 private void OnCreateButtonClicked()
 {
     EconomySystem.Get().CookRecipe(m_recipe);
 }