コード例 #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
ファイル: GameState.cs プロジェクト: dannamachi/blue-heaven
 /// <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;
 }