DialogueChoice.ts 356 B

12345678910111213
  1. /// <reference path="DialogueText.ts" />
  2. class DialogueChoice extends DialogueText {
  3. public type = NodeType.Choice;
  4. private conditions : () => boolean = () => { return true; };
  5. public isAvailable () {
  6. return this.conditions();
  7. }
  8. public setConditions (conditions : () => boolean) {
  9. this.conditions = conditions;
  10. }
  11. }