Advertisement
KpoKec

Graph for Dialogue system

Sep 25th, 2017
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. public class NodeBase {
  2.  private static List<NodeBase> allNodes = new List<NodeBase>();
  3.  public NodeBase() {
  4.   allNodes.Add(this);
  5.  }
  6.  ~NodeBase() {
  7.   allNodes.Remove(this);
  8.  }
  9. }
  10.  
  11. public class NodeLink {
  12.  public string text;
  13.  public NodeDialog next;
  14.  public UnityAction LinkAction;
  15. }
  16.  
  17. public class NodeDialog : NodeBase {
  18.  public string text;
  19.  public NodeLink[] answers;
  20.  public UnityAction DialogAction;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement