Class: Atom
Defined in: adventure/Atom.js, line 5
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
Methods Collapse all |
getInheritance() → {Array}
Defined in: adventure/Atom.js, line 151
Returns:
Array
hasClass(prop) → {Boolean}
Defined in: adventure/Atom.js, line 131
Parameters:
-
prop
String
Name of the class to test for.
Returns:
Boolean
set(props) → {Object}
Defined in: adventure/Atom.js, line 119
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 167
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 110
this.game
.
Name :String
Defined in: adventure/Atom.js, line 97
class :string
Defined in: adventure/Atom.js, line 59
game_name :string
Defined in: adventure/Atom.js, line 47
id :string
Defined in: adventure/Atom.js, line 83
name :string
Defined in: adventure/Atom.js, line 73
UID :string
Defined in: adventure/Atom.js, line 93