private void CleanReplies() { foreach (GUIDialogueReply reply in repliesToRemove) { replies.Remove(reply); reply.Destroy(); } for (int i = 0; i < replies.Count; i++) { GUIDialogueReply reply = (GUIDialogueReply)replies[i]; reply.UpdateVerticalPos(i); } rect.height -= (textHeight + padding) * repliesToRemove.Count; repliesToRemove.Clear(); }
// TODO splint into two classses public ConnectionPoint( GUIDialogueNode parent, ConnectionPointType type, GUIDialogueReply replyParent = null, int verticalPos = 0 ) { this.parent = parent; this.replyParent = replyParent; this.type = type; connections = new HashSet <Connection>(); if (type == ConnectionPointType.In) { style = inPointStyle; } else { style = outPointStyle; } rect = new Rect(0, 0, 10f, 20f); this.verticalPos = verticalPos; }