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", "GameContainer" );
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 56
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 192
Parameters:
-
keyString
A name or id to search for. -
recurseBoolean
Whether to activate recursively.
Returns:
countHints
countHints()
Defined in: Adventure/Hintcard.js, line 67
createHint
createHint() → {String}
deactivateHint
deactivateHint(key, recurse)
Defined in: Adventure/Hintcard.js, line 111
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 122
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 146
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 181
Parameters:
-
keyString
A name or id to search for. -
recurseBoolean
Whether to activate recursively.
Returns:
obfuscateHint
obfuscateHint()
Defined in: Adventure/Hintcard.js, line 203
processLonghand
processLonghand()
Defined in: Adventure/Hintcard.js, line 215
processShorthand
processShorthand()
Defined in: Adventure/Hintcard.js, line 254
set
set(props) → {Object}
Defined in: Adventure/Hintcard.js, line 362
Parameters:
-
propsObject
A generic object containing properties to copy to the instance.
Returns:
Object
Returns the instance the method is called on (useful for chaining calls.)
toggleHint
toggleHint(key, property, bool, recurse)
Defined in: Adventure/Hintcard.js, line 430
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 34
Default value: ""