This package has been deprecated

Author message:

This is an old project...

properjs-gamequest

0.2.0 • Public • Published

GameQuest

Keep a log of a games quests and their statuses.

Installation

npm install properjs-gamequest --save-dev

Usage

GameQuest will utilize localStorage. So, quest state is persisted and it will try to load from storage on initialization.

var GameQuest = require( "properjs-gamequest" );
var gameQuest = new GameQuest();

// Add a new quest
if ( !gameQuest.isQuestComplete( "my-quest" ) ) {
    // You now have an un-fulfilled quest in the log
    gameQuest.addQuest( "my-quest" );
}

// Fulfill a quest
if ( /* some player action */ ) {
    gameQuest.completeQuest( "my-quest" );
}

// Also
gameQuest.getQuest( id );
gameQuest.removeQuest( id );
gameQuest.getQuest( id );

// See all
gameQuest.getQuests();

// Save to localStorage manually
// GameQuest automatically does this for you though
gameQuest.setQuests();

Package Sidebar

Install

npm i properjs-gamequest

Weekly Downloads

1

Version

0.2.0

License

none

Last publish

Collaborators

  • kitajchuk