1
1

DialogueSet.ts 338 B

12345678910111213
  1. /// <reference path="DialogueNode.ts" />
  2. class DialogueSet extends DialogueNode {
  3. public type = NodeType.Set;
  4. private code : () => (void | Promise<void>);
  5. public setFunction (code : () => (void | Promise<void>)) {
  6. this.code = code;
  7. }
  8. public run () : void | Promise<void> {
  9. return this.code();
  10. }
  11. }