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 55
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 191
Parameters:
-
keyString
A name or id to search for. -
recurseBoolean
Whether to activate recursively.
Returns:
countHints
countHints()
Defined in: Adventure/Hintcard.js, line 66
createHint
createHint() → {String}
deactivateHint
deactivateHint(key, recurse)
Defined in: Adventure/Hintcard.js, line 110
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 121
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 145
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 180
Parameters:
-
keyString
A name or id to search for. -
recurseBoolean
Whether to activate recursively.
Returns:
obfuscateHint
obfuscateHint()
Defined in: Adventure/Hintcard.js, line 202
processLonghand
processLonghand()
Defined in: Adventure/Hintcard.js, line 214
processShorthand
processShorthand()
Defined in: Adventure/Hintcard.js, line 253
set
set(props) → {AdventureJS.Hintcard}
Defined in: Adventure/Hintcard.js, line 361
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 429
Parameters:
-
keyString
A name or id to search for. -
propertyString
A property to toggle. -
boolBoolean
Activate or deactivate. -
recurseBoolean
Whether to activate recursively.
Returns:
Properties |
active
active :Boolean
hints
hints :Object
introduction
introduction :String
Defined in: Adventure/Hintcard.js, line 33
Default value: ""