Ejemplo n.º 1
0
        public static QuestPart_QuestEnd MakeAndAddEndNodeWithLetter(Quest quest, string inSignalActivate, QuestEndOutcome outcome, Letter letter)
        {
            QuestPart_Letter questPart_Letter = new QuestPart_Letter();

            questPart_Letter.letter   = letter;
            questPart_Letter.inSignal = inSignalActivate;
            quest.AddPart(questPart_Letter);
            QuestPart_QuestEnd questPart_QuestEnd = new QuestPart_QuestEnd();

            questPart_QuestEnd.inSignal = inSignalActivate;
            questPart_QuestEnd.outcome  = outcome;
            quest.AddPart(questPart_QuestEnd);
            return(questPart_QuestEnd);
        }
Ejemplo n.º 2
0
        public static T MakeAndAddEndCondition <T>(Quest quest, string inSignalActivate, QuestEndOutcome outcome, Letter letter = null) where T : QuestPartActivable, new()
        {
            T val = new T();

            val.inSignalEnable = inSignalActivate;
            quest.AddPart(val);
            if (letter != null)
            {
                QuestPart_Letter questPart_Letter = new QuestPart_Letter();
                questPart_Letter.letter   = letter;
                questPart_Letter.inSignal = val.OutSignalCompleted;
                quest.AddPart(questPart_Letter);
            }
            QuestPart_QuestEnd questPart_QuestEnd = new QuestPart_QuestEnd();

            questPart_QuestEnd.inSignal = val.OutSignalCompleted;
            questPart_QuestEnd.outcome  = outcome;
            quest.AddPart(questPart_QuestEnd);
            return(val);
        }