unity switch state once done code example
Example: unity switch
public float number;
switch(number)
{
case 1:
Debug.Log("1");
break;
case 2:
Debug.Log("1");
break;
default: //case that happens if no case matches
Debug.Log("I dont know");
break;
}