C# Класс 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!
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Inventory Inventory
Wallet Wallet

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
AddDataToHelper ( List walletCurrencies, List inventoryItems ) : void
UpdatePlayerData ( ) : void

Описание методов

BuyBundle() публичный Метод

Helper method that consumes the bundle given a bundleId and a reason
public BuyBundle ( int bundleId, string reason ) : void
bundleId int
reason string
Результат void

ConsumeBundle() публичный Метод

Helper method that consumes the bundle given a bundleId and a reason
public ConsumeBundle ( int bundleId, string reason ) : void
bundleId int
reason string
Результат void

GetCurrencyBalance() публичный Метод

Helper method that returns the Currency Balance given a currencyId Returns -1 if no currency was found
public GetCurrencyBalance ( int currencyId ) : int
currencyId int
Результат int

GetItemAmount() публичный Метод

Helper method that returns the Item Amount given a itemId Returns -1 if no item was found
public GetItemAmount ( int itemId ) : int
itemId int
Результат int

InventoryHasItem() публичный Метод

Helper method that returns true if an item is in the inventory
public InventoryHasItem ( int itemId ) : System.Boolean
itemId int
Результат System.Boolean

PlayerDataHelper() публичный Метод

public PlayerDataHelper ( SpilUnityImplementationBase Instance ) : System
Instance SpilUnityImplementationBase
Результат System

PlayerDataUpdatedHandler() публичный Метод

public PlayerDataUpdatedHandler ( ) : void
Результат void

Описание свойств

Inventory публичное свойство

public Inventory,SpilGames.Unity.Helpers Inventory
Результат Inventory

Wallet публичное свойство

public Wallet,SpilGames.Unity.Helpers Wallet
Результат Wallet