public void OnListSelectionChange(object sender, EventArgs args) { if (sender is DialogueListItem) { DialogueListItem dialogue = (DialogueListItem)sender; responseArea.Text = dialogue.DialogueOption.Response; if (!dialogue.DialogueOption.IsRepeatable) { chatSupplier.RemoveDialogue(dialogue.DialogueOption); } if (DialogueSelected != null) { DialogueSelected(dialogue.DialogueOption.DialogueInfo, null); } } }
public void Update(GameTime gameTime) { if (chattable != null) { chattable.RemoveDialogue(this); foreach (DialogueInfo info in successorInfo) { DialogueOption option = DialogueService.GetInstance().GetDialogue(info); IChattable npc = EntityService.GetInstance().GetNpcById(info.NpcId); npc.AddDialogue(option); } } if (Selected != null) { Selected(dialogueInfo, null); } if (ProccessAdditionalData != null && additionalData != null) { ProccessAdditionalData(additionalData, null); } }