Class:Atom
Defined in: adventure/Atom.js, line 4
Private Constructor:
var foo = new adventurejs.Atom(game_name, name, context_id)
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. -
context_id
String
Optional param used by some supporting classes such as Aspects and Vessels to indicate context.
- Index
- Methods
- Properties
Methods Collapse all |
getClassInheritance() → {Array}
Defined in: adventure/Atom.js, line 144
Returns:
Array
hasClass(prop) → {Boolean}
Defined in: adventure/Atom.js, line 124
Parameters:
-
prop
String
Name of the class to test for.
Returns:
Boolean
set(props) → {Object}
Defined in: adventure/Atom.js, line 112
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 103
this.game
.
Name :String
Defined in: adventure/Atom.js, line 90
class :string
Defined in: adventure/Atom.js, line 60
game_name :string
Defined in: adventure/Atom.js, line 48
id :string
Defined in: adventure/Atom.js, line 85
name :string
Defined in: adventure/Atom.js, line 74