using UnityEngine;
using System.Collections;

public class ColourChanger : MonoBehaviour {

	public Texture[] tex;
		
	public void SelectTexture(LightColour col){
		
		name = col.GetColourAsString();
		
		switch(name){
			case "blue":
				renderer.material.SetTexture("_MainTex", tex[0]);
			break;
			case "cobalt":
				renderer.material.SetTexture("_MainTex", tex[1]);
			break;
			case "crimson":
				renderer.material.SetTexture("_MainTex", tex[2]);
			break;
			case "cyan":
				renderer.material.SetTexture("_MainTex", tex[3]);
			break;
			case "green":
				renderer.material.SetTexture("_MainTex", tex[4]);
			break;
			case "lime":
				renderer.material.SetTexture("_MainTex", tex[5]);
			break;
			case "magenta":
				renderer.material.SetTexture("_MainTex", tex[6]);
			break;
			case "orange":
				renderer.material.SetTexture("_MainTex", tex[7]);
			break;
			case "red":
				renderer.material.SetTexture("_MainTex", tex[8]);
			break;
			case "turquoise":
				renderer.material.SetTexture("_MainTex", tex[9]);
			break;
			case "violet":
				renderer.material.SetTexture("_MainTex", tex[10]);
			break;
			case "white":
				renderer.material.SetTexture("_MainTex", tex[11]);
			break;
			case "yellow":
				renderer.material.SetTexture("_MainTex", tex[12]);
			break;
			
			default:
				renderer.material.SetTexture("_MainTex", tex[11]);
			break;
		}
	}
	
	
}
