Methods
# show(config) → {undefined}
Shows the default inventory system based the supplied config.
Parameters:
Name | Type | Description |
---|---|---|
config |
Object |
undefined
Example
if (inventory.visible) {
// Close the inventory if it is visible
inventory.close();
rpgcode.endProgram();
} else {
// Configure and show the inventory.
let config = {
"backgroundImage": "startscreen.png",
"inventoryMusic": "intro.ogg"
};
await inventory.show(config);
rpgcode.endProgram();
}