Class:Atom
Defined in: adventure/Atom.js, line 4
Private Constructor:
var foo = new adventurejs.Atom(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 by means of removing periods and spaces and converting to lowercase.
- Index
- Methods
- Properties
Index
Methods Collapse all |
getClassInheritance() → {Array}
Defined in: adventure/Atom.js, line 150
Returns:
Array
hasClass(prop) → {Boolean}
Defined in: adventure/Atom.js, line 130
Parameters:
-
prop
String
Name of the class to test for.
Returns:
Boolean
set(props) → {Object}
Defined in: adventure/Atom.js, line 118
Parameters:
-
props
Object
A generic object containing properties to copy to the Object instance.
Returns:
Object
Returns the instance the method is called on (useful for chaining calls.)
set(props) → {Object}
Defined in: adventure/ParsedNoun.js, line 168
Parameters:
-
props
Object
A generic object containing properties to copy to the Object instance.
Returns:
Object
Returns the instance the method is called on (useful for chaining calls.)
Properties |
game :Getter
Defined in: adventure/Atom.js, line 109
this.game
.
Name :String
Defined in: adventure/Atom.js, line 96
class :string
Defined in: adventure/Atom.js, line 58
game_name :string
Defined in: adventure/Atom.js, line 46
id :string
Defined in: adventure/Atom.js, line 82
name :string
Defined in: adventure/Atom.js, line 72
UID :string
Defined in: adventure/Atom.js, line 92