コード例 #1
0
    public void UpdateEvent()
    {
        if (currentEvent == null)
        {
            if (eventQueue.Count > 0)
            {
                currentEvent = eventQueue.Dequeue();
                currentEvent.ResetEvent();
            }
            else
            {
                Goodbye();
            }
        }

        if (currentEvent != null)
        {
            if (!currentEvent.IsEventComplete())
            {
                currentEvent.UpdateEvent();
            }
            else
            {
                currentEvent = null;
            }
        }
    }
コード例 #2
0
    private void questionSelected(TopicQuestion question)
    {
        if (question.trigger == null)
        {
            chatMessage.Discard();
        }
        else
        {
            chatMessage = null;

            if (question.trigger.Equals(string.Empty))
            {
                Topic topic = NeverdawnDatabase.GetTopic(question.topicId);
                selectedEvent = topic.defaultEvent;
            }
            else
            {
                selectedEvent = EventController.FindEvent(question.trigger);
            }

            selectedEvent.ResetEvent();
        }
    }