public void AddDictionaryKey(string key, bool foldout, List <GenericReaction> reactions, List <string> triggerList, List <int> triggerIndexSelection /*, List<int> reactionIndexSelection*/) { ReactorEditorInfo currentValue = new ReactorEditorInfo() { foldoutOpenStatus = foldout, reactionList = reactions, reactionTriggerMethodList = triggerList, reactionTriggerIndexSelectionList = triggerIndexSelection }; if (reactionsPerEventDictionary.ContainsKey(key)) { reactionsPerEventDictionary[key] = currentValue; } else { reactionsPerEventDictionary.Add(key, currentValue); } }
public List <ReactorEditorInfo> GetDictionaryItems() { List <ReactorEditorInfo> builtEditorList = new List <ReactorEditorInfo>(); foreach (string key in reactionsPerEventDictionary.Keys) { ReactorEditorInfo currentEditorInfo = new ReactorEditorInfo { foldoutOpenStatus = reactionsPerEventDictionary[key].foldoutOpenStatus, reactionList = reactionsPerEventDictionary[key].reactionList, reactionTriggerMethodList = reactionsPerEventDictionary[key].reactionTriggerMethodList, reactionTriggerIndexSelectionList = reactionsPerEventDictionary[key].reactionTriggerIndexSelectionList }; builtEditorList.Add(currentEditorInfo); } return(builtEditorList); }