IPlayerInventory

@objc public protocol IPlayerInventory: class

Interface to be implemented by a class that handles the user’s inventory. Used to determine if a user can afford a product purchased with game currency.

  • Used to determine if a user can afford a product purchased with game currency.

    Declaration

    Swift

    func hasEnoughCurrency(costName: String, costAmount: Int) -> Bool

    Parameters

    costName

    The name of the game currency.

    costAmount

    The cost amount of the game currency.

    Return Value

    true if the user can afford the product, false otherwise.