Epigene.UI.UIChartPie.SetColor C# (CSharp) Метод

SetColor() публичный Метод

public SetColor ( int index, Color32 color1, Color32 color2 ) : void
index int
color1 UnityEngine.Color32
color2 UnityEngine.Color32
Результат void
		public void SetColor(int index, Color32 color1, Color32 color2)
		{
			//TODO Assert
			if (index < datas.Count)
			{
				Dictionary<string, object> data = datas[index];
				data["color1"] = color1;
				data["color2"] = color2;
				datas[index] = data;
			}
		}

Usage Example

        void Awake()
        {
            Debug.Log("PieExample Awake");
            ChartPie c = gameObject.GetComponent<ChartPie>();
            chart = c.UIChartPie;
            c.sortingOrder = 103;

            // set default values
            chart.AddValues(new float[] { 110, 100, 10, 200, 200, 700, 70 } );
            chart.SetColor(0, Color.white, Color.black);
            chart.SetColor(1, Color.red, Color.yellow);
            chart.SetColor(2, new Color32(0, 40, 0, 255), new Color32(0, 255, 0, 255));
            chart.Create();

            time = System.Environment.TickCount;
        }