Beispiel #1
0
        /// <summary>
        /// Removes a monologue
        /// </summary>
        public bool RemoveMonologue(Monologue monologue)
        {
            var key = LoadedMonologues.GetKeyForValue(monologue);

            if (!string.IsNullOrEmpty(key))
            {
                return(LoadedMonologues.Remove(key));
            }
            return(false);
        }
Beispiel #2
0
 /// <summary>
 /// Adds a monologue, optionally overwriting
 /// </summary>
 public void AddMonologue(string name, Monologue monologue, bool overwrite = true)
 {
     if (overwrite || !LoadedMonologues.ContainsKey(name))
     {
         LoadedMonologues[name] = monologue;
     }
     else
     {
         throw new InvalidOperationException("A monologue by that name already exists");
     }
 }
Beispiel #3
0
        static void TestMonologue(string monologue)
        {
            Monologue m = DialogueModule.GetMonologue(monologue);

            ConsoleModule.WriteLine(m.GetLineRandom());
        }