enum NodeType { Node, Tree, Text, Set, Choice, Branch } class DialogueNode { public type : NodeType = NodeType.Node; // End nodes are not necessary. If next is undefined, then that's the end. //public static END_NODE = "End"; public id : string; public name : string; protected next : string; public choices : Array; public constructor (id : string) { this.id = id; } public setName (name : string) { this.name = name; } public setNext (next : string) { this.next = next; } public getNext () : string { return this.next; } public setChoices (choices : Array) { this.choices = choices; } public hasChoices () { return this.choices != undefined && this.choices.length > 0; } }