알 수 없는 사용자 2014. 4. 7. 13:36

using UnityEngine;

using System.Collections;


public class ExSwitch2 : MonoBehaviour {


// Use this for initialization

void Start () {

string[] Country = new string[]{"KOREA", "JAPAN", "USA", "MEXICO", "FRANCE", "ENGLAND", "GABONG"} ;

//string country = "USA";

for(int i = 0; i < Country.Length; i++){

string text = Country[i] + " = " + " ";

string text1;

switch(Country[i]){

case "KOREA":

//print(text + "Asia");

case "JAPAN":

text1 = "ASIA";

print(text + text1);

break;

case "USA":

//print(text + "America");

case "MEXICO":

text1 = "ASIA";

print(text + text1);

break;

case "FRANCE":

text1 = "Europe";

print( text + text1);

break;

default:

text1 = "Unknown";

print (text + text1);

break;

}

//print (Country[i] + " - " + Country);

}

}

// Update is called once per frame

void Update () {

}

}