Property | Type | Description | |
---|---|---|---|
NUM_TYPE_ITEMS | int |
Method | Description | |
---|---|---|
GetEnumerator ( ) : IEnumerator | ||
Inventory ( ) : System |
Default constructor
|
|
addItem ( System.Item type ) : void |
Adds one item of a given type to this Inventory
|
|
addItem ( System.Item type, int quantity ) : void |
Adds a given number of the given Item type to this Inventory
|
|
getSaveStructure ( ) : |
Used for saving purposes only
|
|
hasItem ( ) : bool |
Checks if this Inventory has at least one item
|
|
hasItem ( System.Item item ) : bool |
Checks if this Inventory has the given Item type
|
|
loadSaveStructure ( |
Used for loading in the hero's inventory when restoring a saved game
|
|
numItem ( System.Item item ) : int |
Gets the amount of a specific Item type in this Inventory
|
|
numTotalItems ( ) : int |
Sum total of all the items in this Inventory
|
|
removeAll ( ) : void |
Clears this Inventory of all items
|
|
removeItem ( System.Item type ) : void |
Removes one item of a given type from this Inventory
|
|
removeItem ( System.Item type, int quantity ) : void |
Removes a given number of the given item type from this Inventory
|
|
removeRandomItem ( ) : System.Item |
Removes and returns a random item from this Inventory; each Item type is weighted equally (i.e. quantity does not matter); use this for pickpocketing
|
Method | Description | |
---|---|---|
pushEvent ( |
public addItem ( System.Item type ) : void | ||
type | System.Item | The Item type to add |
return | void |
public addItem ( System.Item type, int quantity ) : void | ||
type | System.Item | The Item type to add |
quantity | int | The number of items to add |
return | void |
public hasItem ( System.Item item ) : bool | ||
item | System.Item | The Item type to check for |
return | bool |
public loadSaveStructure ( |
||
saveStruct | An int[] representation of inventory to load | |
return | void |
public numItem ( System.Item item ) : int | ||
item | System.Item | The Item type to check for |
return | int |
public removeItem ( System.Item type ) : void | ||
type | System.Item | The Item type to remove |
return | void |
public removeItem ( System.Item type, int quantity ) : void | ||
type | System.Item | The Item type to remove |
quantity | int | The number of items to remove |
return | void |