munch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
331 B

  1. "use strict";
  2. function DialogNode {
  3. this.text = "Foo bar baz.";
  4. this.hooks = [];
  5. this.visit = function() {
  6. for (let i=0; i<this.hooks.length; i++)
  7. this.hooks[i]();
  8. return this.text;
  9. }
  10. this.choices = [];
  11. this.addChoice = function(text,node) {
  12. this.choices.push({"text": text, "node": node});
  13. }
  14. }