Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0

Defined in: adventure/Hintcard.js, line 5

Framework class

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:

  • game Game
    A reference to the game instance.
Inherited Overrides

Methods Collapse all  |  Expand all

activateHint
activateHint(key, recurse)

Defined in: adventure/Hintcard.js, line 38

Parameters:

  • key String
    A name or id to search for.
  • recurse Boolean
    Whether to activate recursively.
Activate a hint, with optional recurse.

Returns:

activateHint
activateHint(key, recurse)

Defined in: adventure/Hintcard.js, line 174

Parameters:

  • key String
    A name or id to search for.
  • recurse Boolean
    Whether to activate recursively.
Reveal a hint, with optional recurse.

Returns:

countHints
countHints()

Defined in: adventure/Hintcard.js, line 49

Get a count of the number of hints in each group.
createHint
createHint() → {String}

Defined in: adventure/Hintcard.js, line 73

Create a new hint.

Returns:

String
deactivateHint
deactivateHint(key, recurse)

Defined in: adventure/Hintcard.js, line 93

Parameters:

  • key String
    A name or id to search for.
  • recurse Boolean
    Whether to deactivate recursively.
Deactivate a hint, with optional recurse.

Returns:

findHintByKey
findHintByKey(key, root) → {Object|null}

Defined in: adventure/Hintcard.js, line 104

Parameters:

  • key String
    An object key to search for.
  • root Object
    The root object level to begin search.
Find hint by key. Looks recursively.

Returns:

Object | null
findHintByName
findHintByName(key, root) → {Object|null}

Defined in: adventure/Hintcard.js, line 128

Parameters:

  • key String
    An object key to search for.
  • root Object
    The root object level to begin search.
Find hint by name. Looks recursively.

Returns:

Object | null
hideHint
hideHint(key, recurse)

Defined in: adventure/Hintcard.js, line 163

Parameters:

  • key String
    A name or id to search for.
  • recurse Boolean
    Whether to activate recursively.
Hide a hint, with optional recurse.

Returns:

obfuscateHint
obfuscateHint()

Defined in: adventure/Hintcard.js, line 185

Obfuscate hint data.
processLonghand
processLonghand()

Defined in: adventure/Hintcard.js, line 197

Process hint data in longhand format.
processShorthand
processShorthand()

Defined in: adventure/Hintcard.js, line 236

Process hint data in shorthand format.
set
set(props) → {adventurejs.Hintcard}

Defined in: adventure/Hintcard.js, line 344

Parameters:

  • props Object
    A generic object containing properties to copy to the instance.
Provides a chainable shortcut method for setting a number of properties on 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:

  • key String
    A name or id to search for.
  • property String
    A property to toggle.
  • bool Boolean
    Activate or deactivate.
  • recurse Boolean
    Whether to activate recursively.
Toggle a hint property, with optional recurse.

Returns:

Properties  |