コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
        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);
            }
        }