Adventure.js Docs Downloads
Score: 0 Moves: 0

Class: Outlet

Extends: adventurejs.Electronics

Defined in: adventure/assets/tangibles/things/electronics/Outlet.js, line 6

How to: CreateAssets

Public Constructor:

MyGame.createAsset({ "class":"Outlet", "name":"foo", [...] })

Outlet is a subclass of Electronics, with no special properties, but meant to build upon. Can be fixed, like a wall outlet, or mobile like a power strip.

Private Constructor:

var foo = new adventurejs.Outlet(game_name, name)

Though all in-game glasses use a standard constructor method under the hood, it's unlikely that you'd need to call it directly. To create an instance of the Outlet class, it must be defined in a game file as a generic object. That object will be used at runtime to construct a new game class instance, which will be validated and initialized before adding it to the Game. See above for the public constructor, or see Game#createAsset to learn more.


  • game_name String
    The name of the top level game object.
  • name String
    A name for the object, to be serialized and used as ID.
Inherited Overrides




Methods Collapse all  |  Expand all

Properties Collapse all  |  Expand all

Documentation generated by JSDoc 3.6.11 on Mon Nov 20 2023 18:02:13 GMT-0800 (Pacific Standard Time)
Found a problem or error in the docs? Report it to