Skip to content

Commit

Permalink
Add a way to stop dialogue from Unity. [closes #16]
Browse files Browse the repository at this point in the history
  • Loading branch information
desplesda committed Feb 19, 2016
1 parent 267c38d commit aaeb77a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Unity/Assets/Yarn Spinner/Code/DialogueRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ public void Clear() {
dialogue.UnloadAll();
}

public void Stop() {
dialogue.Stop();
}

public bool NodeExists(string nodeName) {
return dialogue.NodeExists(nodeName);
}
Expand Down
4 changes: 4 additions & 0 deletions YarnSpinner/Dialogue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ public int LoadString(string text, bool showTokens=false, bool showParseTree=fal

}

public void Stop() {
stopExecuting = true;
}

public IEnumerable<string> visitedNodes {
get {
return visitedNodeNames;
Expand Down

0 comments on commit aaeb77a

Please # to comment.