void CreateNode(Vector2 mousePos, int type) { Node n = null; if (lst_node.Count == 0) { n = new StartNode(this, new Vector2(120, 150)); } else { switch (type) { case 0: n = new StartNode(this, mousePos - coordinate); plotNodeCount++; break; case 1: n = new DialogueNode(this, mousePos - coordinate); break; case 2: n = new QuestionNode(this, mousePos - coordinate); break; case 3: n = new DivergeNode(this, mousePos - coordinate); break; } } if (n != null) { lst_node.Add(n); rightPanel.SetQNodeList(); } }