C# Class SpilGames.Unity.Helpers.PlayerDataHelper

This is the business object that the developer can use to work with Player Data (Wallet and Inventory). Much easier to work with than the raw data!
Afficher le fichier Open project: spilgames/spil_event_unity_plugin

Méthodes publiques

Свойство Type Description
Inventory Inventory
Wallet Wallet

Méthodes publiques

Méthode Description
BuyBundle ( int bundleId, string reason ) : void

Helper method that consumes the bundle given a bundleId and a reason

ConsumeBundle ( int bundleId, string reason ) : void

Helper method that consumes the bundle given a bundleId and a reason

GetCurrencyBalance ( int currencyId ) : int

Helper method that returns the Currency Balance given a currencyId Returns -1 if no currency was found

GetItemAmount ( int itemId ) : int

Helper method that returns the Item Amount given a itemId Returns -1 if no item was found

InventoryHasItem ( int itemId ) : System.Boolean

Helper method that returns true if an item is in the inventory

PlayerDataHelper ( SpilUnityImplementationBase Instance ) : System
PlayerDataUpdatedHandler ( ) : void

Private Methods

Méthode Description
AddDataToHelper ( List walletCurrencies, List inventoryItems ) : void
UpdatePlayerData ( ) : void

Method Details

BuyBundle() public méthode

Helper method that consumes the bundle given a bundleId and a reason
public BuyBundle ( int bundleId, string reason ) : void
bundleId int
reason string
Résultat void

ConsumeBundle() public méthode

Helper method that consumes the bundle given a bundleId and a reason
public ConsumeBundle ( int bundleId, string reason ) : void
bundleId int
reason string
Résultat void

GetCurrencyBalance() public méthode

Helper method that returns the Currency Balance given a currencyId Returns -1 if no currency was found
public GetCurrencyBalance ( int currencyId ) : int
currencyId int
Résultat int

GetItemAmount() public méthode

Helper method that returns the Item Amount given a itemId Returns -1 if no item was found
public GetItemAmount ( int itemId ) : int
itemId int
Résultat int

InventoryHasItem() public méthode

Helper method that returns true if an item is in the inventory
public InventoryHasItem ( int itemId ) : System.Boolean
itemId int
Résultat System.Boolean

PlayerDataHelper() public méthode

public PlayerDataHelper ( SpilUnityImplementationBase Instance ) : System
Instance SpilUnityImplementationBase
Résultat System

PlayerDataUpdatedHandler() public méthode

public PlayerDataUpdatedHandler ( ) : void
Résultat void

Property Details

Inventory public_oe property

public Inventory,SpilGames.Unity.Helpers Inventory
Résultat Inventory

Wallet public_oe property

public Wallet,SpilGames.Unity.Helpers Wallet
Résultat Wallet