import { QuestEngine } from "./questEngine";

export class QuestItem {
    id:number;
    label:string;
    questions:any[] = [];
    engine:QuestEngine;
    onInventory:Function;
    onShow:Function;

    fromJSON(json){
        Object.keys(json).forEach(key=>{
            this[key] = json[key];
        });
    }


    resolveAction(question) {
        question.action(this.engine);
    }

}