public static DialoguePackage Package() { if (package == null) { package = new DialoguePackage(); } return(package); }
public static string PickModule(DialoguePackage pack, List <string> mod) { package = pack; modules = mod; //check if dialogue package is null //check status of dialogue package //check if there is a next module and if is exists in the modules list var chosenModule = CheckDialoguePackage(); //if package points to value then return it if (chosenModule == null && mod.Count >= 1) { //change to consult history here var temp = new Random(); var rand = new Random(temp.Next(100000)); chosenModule = mod[rand.Next(mod.Count)]; } //else return random value from return(chosenModule); }
public static void Destroy() { package = null; }