/// <summary> /// Adds a list of colors to the Dictionary /// </summary> /// <param name="Count"></param> public void Add(int Count) { for (int i = 0; i < Count; i++) { Add(i.ToString(), ColorAssist.ToColor((float)i)); } }
/// <summary> /// Adds a color to the Dictionary where key will be color number /// </summary> /// <param name="color"></param> public void Add(Color color) { try { Collection.Add(ColorAssist.ToInt32(color).ToString(), color); } catch (System.ArgumentException) { Debug.LogErrorFormat("Add: An element with Key = {0} already exists.", ColorAssist.ToInt32(color).ToString()); } }