using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
enum COLOR{RED,YELLOW,BLACK,WHITE,GREEN,BLUE};
COLOR a=COLOR.RED;
void Start () {
}
void Update () {
switch(a){
case COLOR.RED:
Debug.Log("this is Red");
break;
case COLOR.YELLOW:
Debug.Log ("this is Yellow");
break;
case COLOR.GREEN:
Debug.Log ("this is Green");
break;
case COLOR.WHITE:
Debug.Log ("this is White");
break;
case COLOR.BLACK:
Debug.Log ("this is Black");
break;
}
}
}
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
enum COLOR{RED,YELLOW,BLACK,WHITE,GREEN,BLUE};
COLOR a=COLOR.RED;
void Start () {
}
void Update () {
switch(a){
case COLOR.RED:
Debug.Log("this is Red");
break;
case COLOR.YELLOW:
Debug.Log ("this is Yellow");
break;
case COLOR.GREEN:
Debug.Log ("this is Green");
break;
case COLOR.WHITE:
Debug.Log ("this is White");
break;
case COLOR.BLACK:
Debug.Log ("this is Black");
break;
}
}
}