Class:Hintcard
Defined in: adventure/Hintcard.js, line 5
Description
Hintcard is a repository for game hint options. Hintcard is created automatically by Game. This is an internal class that authors should not need to construct. However, authors can set hint options from their game file as shown below.
Example:
var MyGame = new adventurejs.Game( "MyGame", "GameDisplay" );
MyGame.Hintcard.set({
});
Private Constructor:
var foo = new adventurejs.Hintcard(game)
Parameters:
-
gameGame
A reference to the game instance.
- Index
- Methods
- Properties
Index
Methods Collapse all |
activateHint
activateHint(key, recurse)
Defined in: adventure/Hintcard.js, line 38
Parameters:
-
keyString
A name or id to search for. -
recurseBoolean
Whether to activate recursively.
Returns:
activateHint
activateHint(key, recurse)
Defined in: adventure/Hintcard.js, line 174
Parameters:
-
keyString
A name or id to search for. -
recurseBoolean
Whether to activate recursively.
Returns:
countHints
countHints()
Defined in: adventure/Hintcard.js, line 49
createHint
createHint() → {String}
deactivateHint
deactivateHint(key, recurse)
Defined in: adventure/Hintcard.js, line 93
Parameters:
-
keyString
A name or id to search for. -
recurseBoolean
Whether to deactivate recursively.
Returns:
findHintByKey
findHintByKey(key, root) → {Object|null}
Defined in: adventure/Hintcard.js, line 104
Parameters:
-
keyString
An object key to search for. -
rootObject
The root object level to begin search.
Returns:
Object
|
null
findHintByName
findHintByName(key, root) → {Object|null}
Defined in: adventure/Hintcard.js, line 128
Parameters:
-
keyString
An object key to search for. -
rootObject
The root object level to begin search.
Returns:
Object
|
null
hideHint
hideHint(key, recurse)
Defined in: adventure/Hintcard.js, line 163
Parameters:
-
keyString
A name or id to search for. -
recurseBoolean
Whether to activate recursively.
Returns:
obfuscateHint
obfuscateHint()
Defined in: adventure/Hintcard.js, line 185
processLonghand
processLonghand()
Defined in: adventure/Hintcard.js, line 197
processShorthand
processShorthand()
Defined in: adventure/Hintcard.js, line 236
set
set(props) → {adventurejs.Hintcard}
Defined in: adventure/Hintcard.js, line 344
Parameters:
-
propsObject
A generic object containing properties to copy to the instance.
Returns:
adventurejs.Hintcard
Returns the instance the method is called on (useful for chaining calls.)
toggleHint
toggleHint(key, property, bool, recurse)
Defined in: adventure/Hintcard.js, line 412
Parameters:
-
keyString
A name or id to search for. -
propertyString
A property to toggle. -
boolBoolean
Activate or deactivate. -
recurseBoolean
Whether to activate recursively.