public static Dictionary <string, Trigger> CreateTriggersDict() { // Create our triggers menu Dictionary <string, Trigger> triggersDict = new Dictionary <string, Trigger>(); triggersDict.Add("Filler/First", new Trigger { type = Trigger.Type.FIRST }); triggersDict.Add("Filler/Random", new Trigger { type = Trigger.Type.RANDOM }); triggersDict.Add("Events/Special/Cute Sneeze", new CuteSneezeTrigger()); triggersDict.Add("Events/Overdose/Any", new Trigger { type = Trigger.Type.OVERDOSE }); foreach (string drug in DrugManager.GetDrugs()) { triggersDict.Add("Events/Low Dose/" + drug, new DrugTrigger(drug)); triggersDict.Add("Events/Medium Dose/" + drug, new DrugTrigger(drug, 5)); triggersDict.Add("Events/High Dose/" + drug, new DrugTrigger(drug, 10)); triggersDict.Add("Events/Overnight Change/" + drug, new OvernightChangeTrigger(drug)); triggersDict.Add("Events/Overdose/" + drug, new OverdoseTrigger(drug)); } return(triggersDict); }
void CreateDrugsMenu() { // Create our triggers menu drugsMenu = new GenericMenu(); foreach (string drug in DrugManager.GetDrugs()) { drugsMenu.AddItem(new GUIContent(drug), false, clickHandler, drug); } }