UnityEngine.Color.this C# (CSharp) Method

this() public method

public this ( int index ) : float
index int
return float
		public float this[int index] 
		{
			get
			{
				switch (index)
				{
					case 0:
						return r;
					case 1:
						return g;
					case 2:
						return b;
					case 3:
						return a;
					default:
						throw new IndexOutOfRangeException("Invalid Color index!");
				}
			}
			set
			{
				switch (index)
				{
					case 0:
						r = value;
						break;
					case 1:
						g = value;
						break;
					case 2:
						b = value;
						break;
					case 3:
						a = value;
						break;
					default:
						throw new IndexOutOfRangeException("Invalid Color index!");
				}
			}
		}