Class: Atom
Defined in: adventure/Atom.js, line 5
Public Constructor:
MyGame.createAsset({ "class":"Atom", "name":"foo" })
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.
Index
Methods:
Properties:
Methods Collapse all |
Defined in: adventure/Atom.js, line 238
Returns:
Array
Defined in: adventure/Atom.js, line 184
Parameters:
-
prop
String
Name of the property to test for. Can include dot notation.
if(false === foo.bar.baz)
comparisons.
Returns:
Boolean
Defined in: adventure/Atom.js, line 216
Parameters:
-
prop
String
Name of the classe to test for.
Returns:
Boolean
Defined in: adventure/Atom.js, line 148
Parameters:
-
prop
String
Name of the property to test for. Can include dot notation.
Returns:
Boolean
Defined in: adventure/Atom.js, line 134
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 Collapse all |
Defined in: adventure/Atom.js, line 74
Defined in: adventure/Atom.js, line 123
this.game
.
Defined in: adventure/Atom.js, line 100
Defined in: adventure/Atom.js, line 86
Defined in: adventure/Atom.js, line 54
Defined in: adventure/Atom.js, line 93