public override void UpdateEvent() { if (currentEvent == null) { while (index < children.Count && !children[index].IsEventAvailable()) { index++; } if (index < children.Count) { currentEvent = children[index]; } } if (currentEvent != null) { if (!currentEvent.IsEventComplete()) { currentEvent.UpdateEvent(); } else { currentEvent = null; index++; } } }
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; } } }
public override void UpdateEvent() { if (selectedEvent != null && !selectedEvent.IsEventComplete()) { selectedEvent.UpdateEvent(); return; } if (chatMessage == null) { if (target != null) { Talker talker = target.GetComponent <Talker>(); if (talker != null) { Topic[] talkerTopics = NeverdawnDatabase.GetTopics(talker.topicIds, true); Topic[] talkTopics = PlayerJournal.GetCommonTopics(talkerTopics); TopicQuestion[] questions = new TopicQuestion[talkTopics.Length + 1]; for (int i = 0; i < talkTopics.Length; i++) { questions[i] = TopicQuestion.Create(talker, talkTopics[i]); } questions[questions.Length - 1] = new TopicQuestion() { message = "That'll be all.", trigger = null }; chatMessage = new QuestionMessage(getTargetSelf(0).identity.icon, string.Empty, questions); UIChatMenu.SendQuestionMessage(chatMessage, questionSelected); } } } }
public override void UpdateEvent() { if (currentEvent == null) { currentEvent = children.FirstOrDefault(e => e.IsEventAvailable()); } if (currentEvent != null) { if (currentEvent.IsEventComplete()) { index = -1; } else { currentEvent.UpdateEvent(); } } else { index = -1; } }
public override void UpdateEvent() { if (mode == EventExecutionType.Sequence) { if (currentEvent == null) { while (index < events.Count && !events[index].IsEventAvailable()) { index++; } if (index < events.Count) { currentEvent = events[index]; } } if (currentEvent != null) { if (!currentEvent.IsEventComplete()) { currentEvent.UpdateEvent(); } else { currentEvent = null; index++; } } } else if (mode == EventExecutionType.Parallel) { foreach (NeverdawnEventBase e in events) { if (e.IsEventAvailable() && !e.IsEventComplete()) { e.UpdateEvent(); } } } else if (mode == EventExecutionType.FirstMatch) { if (currentEvent == null) { currentEvent = events.FirstOrDefault(e => e.IsEventAvailable()); } if (currentEvent != null) { if (currentEvent.IsEventComplete()) { index = -1; } else { currentEvent.UpdateEvent(); } } else { index = -1; } } }