やまめも

【 ゲーム開発・日々のことについて 】

【C#】public static int

int型を返すメソッド

public static void SaveLanguage(GameController.GameLanguage language){
	string key = _activeLanguage;
	Debug.Log ("save language " + language);
	if(language == GameController.GameLanguage.ENGLISH)
	    PlayerPrefs.SetInt (key, 0);
	else
		PlayerPrefs.SetInt (key, 1);

}	
//int型を返すメソッド
public static int LoadLanguage(){
	string key = _activeLanguage;

	int nlang = PlayerPrefs.GetInt(key);
	Debug.Log ("load language " + nlang);
	return nlang;
}