예제 #1
0
 /// <summary>
 /// Get choice dispenser linked with convo
 /// </summary>
 /// <param name="convo"></param>
 /// <returns></returns>
 public static ChoiceDispenserCode GetChoices(ConversationCode convo)
 {
     if (_cDict.ContainsKey(convo))
     {
         return(_cDict[convo]);
     }
     return(ChoiceDispenserCode.None);
 }
예제 #2
0
 /// <summary>
 /// Create conversation with conditions
 /// </summary>
 /// <param name="code"></param>
 /// <param name="lines"></param>
 /// <param name="toGet"></param>
 /// <param name="toChoose"></param>
 /// <param name="choiceDispenser"></param>
 public Conversation(
     ConversationCode code,
     List <IConversationLine> lines,
     List <IProvideCondition> toGet,
     List <IProvideCondition> toChoose,
     MilestoneCode mile = MilestoneCode.None) : this(code, lines, mile)
 {
     SetCondition(toGet, toChoose);
 }
예제 #3
0
 /// <summary>
 /// Get bool if a conversation is finished (using code)
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 public bool HasConversation(ConversationCode code)
 {
     foreach (ConversationCode conversation in _finishedConversations)
     {
         if (conversation == code)
         {
             return(true);
         }
     }
     return(false);
 }
예제 #4
0
 /// <summary>
 /// Get a conversation object from code
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 public static IConversation GetConversation(ConversationCode code)
 {
     foreach (IConversation convo in _storyList)
     {
         if (convo.IsCalled(code))
         {
             return(convo);
         }
     }
     return(null);
 }
예제 #5
0
 /// <summary>
 /// Get name (string) linked with convo
 /// </summary>
 /// <param name="convo"></param>
 /// <returns></returns>
 public static string GetName(ConversationCode convo)
 {
     if (_nameDict.ContainsKey(convo))
     {
         return(_nameDict[convo]);
     }
     else
     {
         return("Just another conversation");
     }
 }
예제 #6
0
 /// <summary>
 /// Create conversation with no conditions
 /// </summary>
 /// <param name="code"></param>
 /// <param name="lines"></param>
 /// <param name="choiceDispenser"></param>
 public Conversation(
     ConversationCode code,
     List <IConversationLine> lines,
     MilestoneCode mile = MilestoneCode.None)
 {
     _code               = code;
     _lines              = lines;
     _isfinished         = false;
     _count              = 0;
     _conditionsToGet    = new List <IProvideCondition>();
     _conditionsToChoose = new List <IProvideCondition>();
     _milestone          = mile;
 }
예제 #7
0
 public ConversationCondition(ConversationCode code)
 {
     _code = code;
 }