Conforms to NSObject
Declared in NPCurrencyDelegate.h

Overview

Warning: This delegate should only be implemented by games that have UNIFIED virtual currency with Nextpeer. This means that the game is the one that stores the amount of currency a player and Nextpeer manipulates this number using this delegate.

Tasks

  • – nextpeerGetCurrency

    Nextpeer will call this function to retrieve the current amount of currency the player has.

    required method
  • – nextpeerAddAmountToCurrency:

    Nextpeer will use this function to add a certain amount of currency to the total a player has. This may be a result of currency consumption (negative amount, for example when entering a tournament) or a currency gain (positive amount, when winning a tournament).

    required method
  • – nextpeerSupportsUnifiedCurrency

    Nextpeer will query this method to find out if the game supports the unified currency model. Note that this will only be called once per Nextpeer initialization.

    required method

Instance Methods

nextpeerAddAmountToCurrency:

Nextpeer will use this function to add a certain amount of currency to the total a player has. This may be a result of currency consumption (negative amount, for example when entering a tournament) or a currency gain (positive amount, when winning a tournament).

- (void)nextpeerAddAmountToCurrency:(int32_t)amount

Discussion

Warning: This method may be called on any thread, including the main thread! Take precaution when receiving this callback

      and be sure to return quickly (i.e. do I/O in another thread) in order to have everything run smoothly.

Declared In

NPCurrencyDelegate.h

nextpeerGetCurrency

Nextpeer will call this function to retrieve the current amount of currency the player has.

- (uint32_t)nextpeerGetCurrency

Declared In

NPCurrencyDelegate.h

nextpeerSupportsUnifiedCurrency

Nextpeer will query this method to find out if the game supports the unified currency model. Note that this will only be called once per Nextpeer initialization.

- (BOOL)nextpeerSupportsUnifiedCurrency

Declared In

NPCurrencyDelegate.h