Class: Adam
Defined in: adventure/Adam.js, line 5
The Asset class is used to create all Assets in the game world. It defines several important base properties including name, class, id, and the set method. Authors should not need to instantiate or subclass Adam. Start with the Tangible class to create new physical Assets, or the Intangible class to create new abstract Assets.
Private Constructor:
var foo = new adventurejs.Adam(game_name, name)
Parameters:
-
game_name
String
A reference back to the top level game object, by way of window[game_name]. Done this way rather than using an object reference in order to avoid circular references, because they're difficult to parse into JSON, the method that's used for saving/restoring game data. -
name
String
The name of the object in the game world, ie "brass lantern". The name is also used to create the object's id.
Methods Collapse all |
Defined in: adventure/Adam.js, line 234
Returns:
Array
Defined in: adventure/Adam.js, line 212
Parameters:
-
prop
String
Name of the classe to test for.
Returns:
Boolean
Properties Collapse all |
Defined in: adventure/Adam.js, line 81
Defined in: adventure/Adam.js, line 122
this.game
.
Defined in: adventure/Adam.js, line 107
Defined in: adventure/Adam.js, line 93
Defined in: adventure/Adam.js, line 57
Defined in: adventure/Adam.js, line 67
Defined in: adventure/Adam.js, line 100