Пример #1
0
    public void SubmitEntry(EntryType entryType, string input, User user)
    {
        if (activeList == null)
        {
            Debug.LogError("No list selected!");
            return;
        }

        if (entryType == EntryType.Question)
        {
            activeList.AddQuestion(new Question(input, user));
        }

        if (entryType == EntryType.Answer)
        {
            activeQuestion.AddAnswer(new Answer(input));
        }

        activeList.Save();
    }