Class

Inventory

Inventory() → {Inventory}

Constructor

# new Inventory() → {Inventory}

The builtin inventory system.

View Source inventory.js, line 12

Inventory

Methods

# show(config) → {undefined}

Shows the default inventory system based the supplied config.
Parameters:
Name Type Description
config Object

View Source inventory.js, line 39

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();
}