Class: BaseMoves

Pets~ BaseMoves


new BaseMoves()

Manages base information for all possible moves.
Source:

Members


<private> _baseFile :string

The filename of the file to read move information from.
Type:
  • string
Default Value:
  • ./save/petMoves.json
Source:

<private> _moves :object

Parsed data from file.
Type:
  • object
Default Value:
  • {}
Source:

Methods


<private> _fileUpdate(curr, prev)

File has been modified, re-read and parse data.
Parameters:
Name Type Description
curr fs.Stats Current file stats.
prev fs.Stats Previous file stats.
Source:

<private> _readFile()

Read and parse data from the file.
Source:

get(name)

Fetch base object for a single move.
Parameters:
Name Type Description
name string Name of move to fetch.
Source:
Returns:
Object reference of pet information for the move, or null if could not be found.
Type
object

initialize()

Start watching file system changes and read pet information from file.
Source:

shutdown()

Stop watching for file system changes, and remove all event listeners.
Source: