示例#1
0
        /// <summary>
        /// Adds UI content to the return node.
        /// </summary>
        protected virtual void AddReturnNodeText(QuestBuilder questBuilder, QuestNode returnNode, QuestGiver questGiver, string mainTargetEntity, string mainTargetDescriptor, string domainName, PlanStep goal, string hudText)
        {
            var stateInfo = returnNode.stateInfoList[(int)QuestNodeState.Active];

            QuestStateInfo.ValidateCategorizedContentListCount(stateInfo.categorizedContentList);
            var successText  = ReplaceStepTags(StringField.GetStringValue(goal.action.actionText.successText), mainTargetEntity, mainTargetDescriptor, domainName, string.Empty, 0);
            var bodyText     = questBuilder.CreateBodyContent(successText);
            var dialogueList = returnNode.stateInfoList[(int)QuestNodeState.Active].categorizedContentList[(int)QuestContentCategory.Dialogue];

            dialogueList.contentList.Add(bodyText);

            var jrlText     = "{Return to} " + questGiver.displayName;
            var jrlBodyText = questBuilder.CreateBodyContent(jrlText);
            var journalList = returnNode.stateInfoList[(int)QuestNodeState.Active].categorizedContentList[(int)QuestContentCategory.Journal];

            journalList.contentList.Add(jrlBodyText);

            var hudBodyText = questBuilder.CreateBodyContent(hudText);
            var hudList     = returnNode.stateInfoList[(int)QuestNodeState.Active].categorizedContentList[(int)QuestContentCategory.HUD];

            hudList.contentList.Add(hudBodyText);
        }
示例#2
0
 public static string GetDisplayName(QuestGiver questGiver)
 {
     return((questGiver != null) ? StringField.GetStringValue(questGiver.displayName) : string.Empty);
 }