Skip to content

Instantly share code, notes, and snippets.

@kazuooooo
Created January 6, 2015 15:08
Show Gist options
  • Save kazuooooo/2a3f5257c60484c8f1eb to your computer and use it in GitHub Desktop.
Save kazuooooo/2a3f5257c60484c8f1eb to your computer and use it in GitHub Desktop.
using UnityEngine;
using System.Collections;
public class Array : MonoBehaviour {
enum Helo{Hello,Welcome,Chao}//ここはそのまま書くかつスタートの外で宣言
void Start(){
Helo h = Helo.Chao;
switch (h) {
case Helo.Hello:
guiText.text = "ハロー";
break;
case Helo.Welcome:
guiText.text = "ようこそ";
break;
case Helo.Chao:
guiText.text = "チャオ";
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment