/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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"); } }
/// <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; }
public ConversationCondition(ConversationCode code) { _code = code; }