public void StartDialog(string id) { _currentElement = DialogElements.Find(e => e.ID == id); //obacht _currentElement.CommandsAtEnter.ForEach(CommandManager.Instance.EvalCommand); DialogStarted(_currentElement); }
public bool NextDialog(int index) { var last = _currentElement; _currentElement.Answers[index]?.CommandsOnExit.ForEach(CommandManager.Instance.EvalCommand); //obacht _currentElement = DialogElements.Find(e => e.ID == _currentElement.Answers[index].LinkedID); //obacht if (_currentElement.IsNull()) { DialogFinished(last); return(false); } else { NextDialogStarted(_currentElement); return(true); } }