Combu  3.2.2
Unity API Documentation
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
Combu.Inventory Class Reference

Public Member Functions

 Inventory ()
 Initializes a new instance of the Inventory class. More...
 
 Inventory (string jsonString)
 Initializes a new instance of the Inventory class from a JSON formatted string. More...
 
 Inventory (Hashtable hash)
 Initializes a new instance of the Inventory class from a Hashtable. More...
 
virtual void FromJson (string jsonString)
 Initialize the object from a JSON formatted string. More...
 
virtual void FromHashtable (Hashtable hash)
 Initialize the object from a hashtable. More...
 
virtual void Update (System.Action< bool, string > callback)
 Update this inventory item to server. More...
 
virtual void Delete (System.Action< bool, string > callback)
 Delete this inventory item from server. More...
 

Static Public Member Functions

static void Load (string userId, System.Action< Inventory[], string > callback)
 Load the inventory items of a User. More...
 
static void Load< T > (string userId, System.Action< T[], string > callback)
 Load the inventory of a User. More...
 
static void Delete (long idInventory, System.Action< bool, string > callback)
 Delete the specified inventory item from server. More...
 

Public Attributes

string name = ""
 
int quantity = 0
 
Hashtable customData = new Hashtable()
 

Properties

long id [get]
 

Constructor & Destructor Documentation

◆ Inventory() [1/3]

Combu.Inventory.Inventory ( )

Initializes a new instance of the Inventory class.

◆ Inventory() [2/3]

Combu.Inventory.Inventory ( string  jsonString)

Initializes a new instance of the Inventory class from a JSON formatted string.

Parameters
jsonStringJSON formatted string.

◆ Inventory() [3/3]

Combu.Inventory.Inventory ( Hashtable  hash)

Initializes a new instance of the Inventory class from a Hashtable.

Parameters
hashHash.

Member Function Documentation

◆ Delete() [1/2]

static void Combu.Inventory.Delete ( long  idInventory,
System.Action< bool, string >  callback 
)
static

Delete the specified inventory item from server.

Parameters
idInventoryIdentifier inventory.
callbackCallback.

◆ Delete() [2/2]

virtual void Combu.Inventory.Delete ( System.Action< bool, string >  callback)
virtual

Delete this inventory item from server.

Parameters
callbackCallback.

◆ FromHashtable()

virtual void Combu.Inventory.FromHashtable ( Hashtable  hash)
virtual

Initialize the object from a hashtable.

Parameters
hashHash.

◆ FromJson()

virtual void Combu.Inventory.FromJson ( string  jsonString)
virtual

Initialize the object from a JSON formatted string.

Parameters
jsonStringJson string.

◆ Load()

static void Combu.Inventory.Load ( string  userId,
System.Action< Inventory[], string >  callback 
)
static

Load the inventory items of a User.

Parameters
userIdUser identifier.
callbackCallback.

◆ Load< T >()

static void Combu.Inventory.Load< T > ( string  userId,
System.Action< T[], string >  callback 
)
static

Load the inventory of a User.

Parameters
userIdUser identifier.
callbackCallback.
Template Parameters
TThe 1st type parameter.
Type Constraints
T :Inventory 
T :new() 

◆ Update()

virtual void Combu.Inventory.Update ( System.Action< bool, string >  callback)
virtual

Update this inventory item to server.

Parameters
callbackCallback.