public DialogNodeData(DialogNode _dNode) { name = _dNode.windowTitle; pos = _dNode.windowRect.position; text = _dNode.text; nbAnswers = _dNode.nbOfAnswers; answers = _dNode.answers.ToArray(); connections = new string[_dNode.nbOfAnswers]; for (int i = 0; i < _dNode.nbOfAnswers; i++) { if (_dNode.connections.ContainsKey(i)) { if (_dNode.connections[i] is EndDialogTagNode) { connections[i] = "EndNode"; } else if (_dNode.connections[i] is SubDialogNode) { connections[i] = "SUB " + (_dNode.connections[i] as SubDialogNode).dialog.dialogName; } else { connections[i] = _dNode.connections[i].windowTitle; } } } }
public DialogNode(Vector2 _pos, DialogNode _dNode) : base(_pos, new Vector2(200, 200)) { text = _dNode.text; nbOfAnswers = _dNode.nbOfAnswers; foreach (string _answer in _dNode.answers) { answers.Add(_answer); } foreach (int _key in _dNode.connections.Keys) { connections.Add(_key, _dNode.connections[_key]); } }
public DialogNode(DialogNode _dNode) : base(_dNode.windowRect.position, new Vector2(200, 200)) { text = _dNode.text; nbOfAnswers = _dNode.nbOfAnswers; windowTitle = _dNode.windowTitle; foreach (string _answer in _dNode.answers) { answers.Add(_answer); } foreach (int _key in _dNode.connections.Keys) { connections.Add(_key, _dNode.connections[_key]); } }
public override void ApplyReverse(DialogEditorCtrlZ _dialogEditorCtrlZ) { if (targetNode is DialogNode) { DialogNode target = targetNode as DialogNode; if (nb == -2) { target.windowTitle = oldText; } else if (nb == -1) { target.text = oldText; } else { target.answers[nb] = oldText; } } else if (targetNode is SubDialogNode) { (targetNode as SubDialogNode).dialog.dialogName = oldText; } }
public RenameNode(DialogNode _dNode) : base(_dNode.windowRect.position, new Vector2(200, 60), _dNode) { windowTitle = "ChangeNodeTitle"; }
public AnswerText(DialogNode _dNode, int _answerNb) : base(_dNode.windowRect.position, new Vector2(200, 150), _dNode) { windowTitle = "Answer" + (_answerNb + 1) + " from:" + _dNode.windowTitle; targetAnswer = _answerNb; }
public DialogText(DialogNode _dNode) : base(_dNode.windowRect.position, new Vector2(200, 150), _dNode) { windowTitle = "DialogText from:" + _dNode.windowTitle; }
public ActionNode(Vector2 _pos, Vector2 _size, DialogNode _dNode) : base(_pos, _size) { targetNode = _dNode; }