|
bool | Toggle () |
| Toggles storage on or off.
|
|
bool | SetInventory (bool state) |
| Sets storage on or off.
|
|
void | AddMoney (int amount) |
| Add or subtract money from this storage.
|
|
void | UpdateMoney (int newMoneyAmount) |
| Set a specific amount of money for this storage.
|
|
void | UpdateInventory () |
| Reloads all items based on list of itemIds.
|
|
void | ClearInventory () |
| Removes all inventory items.
|
|
void | PlayInteractionSound (float pitchOffset=0.0f) |
| Play interaction sound from this inventory, with fixed random pitch variation.
|
|
|
bool | InventoryOn [get, set] |
| Define if the storage is showing or not.
|
|
◆ AddMoney()
void RPGlite.Storage.AddMoney |
( |
int | amount | ) |
|
|
inline |
Add or subtract money from this storage.
- Parameters
-
amount | How much money to add. Negative values deduct money |
◆ ClearInventory()
void RPGlite.Storage.ClearInventory |
( |
| ) |
|
|
inline |
Removes all inventory items.
◆ PlayInteractionSound()
void RPGlite.Storage.PlayInteractionSound |
( |
float | pitchOffset = 0::0f | ) |
|
|
inline |
Play interaction sound from this inventory, with fixed random pitch variation.
- Parameters
-
pitchOffset | Add an offset to the pitch. |
◆ SetInventory()
bool RPGlite.Storage.SetInventory |
( |
bool | state | ) |
|
|
inline |
Sets storage on or off.
- Parameters
-
state | Storage on (true) or off (false). |
- Returns
◆ Start()
void RPGlite.Storage.Start |
( |
| ) |
|
|
inlineprotected |
◆ Toggle()
bool RPGlite.Storage.Toggle |
( |
| ) |
|
|
inline |
Toggles storage on or off.
- Returns
- Whether storage is now on (true) or off (false)
◆ UpdateInventory()
void RPGlite.Storage.UpdateInventory |
( |
| ) |
|
|
inline |
Reloads all items based on list of itemIds.
◆ UpdateMoney()
void RPGlite.Storage.UpdateMoney |
( |
int | newMoneyAmount | ) |
|
|
inline |
Set a specific amount of money for this storage.
- Parameters
-
newMoneyAmount | How much money this storage will have from now on. |
◆ inventoryList
GameObject RPGlite.Storage.inventoryList |
◆ inventoryOn
bool RPGlite.Storage.inventoryOn = true |
|
protected |
◆ itemIds
List<int> RPGlite.Storage.itemIds |
◆ itemUIPrefab
GameObject RPGlite.Storage.itemUIPrefab |
◆ money
int RPGlite.Storage.money = 0 |
◆ money_text
TMP_Text RPGlite.Storage.money_text |
◆ InventoryOn
bool RPGlite.Storage.InventoryOn |
|
getset |
Define if the storage is showing or not.
The documentation for this class was generated from the following file:
- C:/Users/vini/repos/tinyrpg/Assets/RPGliteStarterKit/Scripts/Storage.cs