// public static string[] GetTextXML(string category, string subCategory, string name) { string[] textToReturn; XmlDocument xml_d; XmlNode objectToUse; XmlNodeList xmlDescription; GameManagerSingleton gameManagerSingleton = GameManagerSingleton.instance; string language = gameManagerSingleton.GetLanguage(); TextAsset textasset = (TextAsset)Resources.Load(language, typeof(TextAsset)); xml_d = new XmlDocument(); xml_d.LoadXml(textasset.text); //Search if it is the correct ID or name string route = "MAIN/" + category + "/" + subCategory + "[@name='" + name + "']"; objectToUse = xml_d.SelectSingleNode(route); if (objectToUse != null) { xmlDescription = ((XmlElement)objectToUse).GetElementsByTagName("texto"); textToReturn = new string[xmlDescription.Count]; int j = 0; foreach (XmlNode node in xmlDescription) { textToReturn [j] = node.InnerText; j++; } return(textToReturn); } return(null); }
// Use this for initialization void Start() { //Assign keep values gameManagerSingleton = GameManagerSingleton.instance; switch (gameManagerSingleton.GetLanguage()) { case "English": language.value = 0; MenuEnglish(); break; case "Español": language.value = 1; MenuSpanish(); break; case "Français": language.value = 2; break; } sound.isOn = gameManagerSingleton.Music; volumeValue.value = gameManagerSingleton.Volume; //Restore the time scale from the previous pause Time.timeScale = 1.0f; }
void Language() { switch (gameManagerSingleton.GetLanguage()) { case "English": buttonMainMenu.text = "Main Menu"; scoreText = "Final Score"; break; case "Español": buttonMainMenu.text = "Menú Principal"; scoreText = "Puntuacion final"; break; case "Français": buttonMainMenu.text = "Menu Principal"; scoreText = "Final score"; break; } }
private void MenuPauseLanguage() { switch (gameManagerSingleton.GetLanguage()) { case "English": pause.text = "Pause"; pauseTitle.text = "PAUSE"; resume.text = "Resume"; mainMenu.text = "Main Menu"; exit.text = "Exit Game"; mainMenuLose.text = "Main Menu"; mainMenuWin.text = "Main Menu"; nextLevel.text = "Next Level"; retry.text = "Retry"; break; case "Español": pause.text = "Pausa"; pauseTitle.text = "PAUSA"; resume.text = "Reanudar"; mainMenu.text = "Menú Principal"; exit.text = "Salir del juego"; mainMenuLose.text = "Menú Principal"; mainMenuWin.text = "Menú Principal"; nextLevel.text = "Siguiente nivel"; retry.text = "Reintentar"; break; case "Français": pause.text = "Pause"; pauseTitle.text = "PAUSE"; resume.text = "Reprendre"; mainMenu.text = "Menu Principal"; exit.text = "Jeu de Sortie"; mainMenuLose.text = "Menu Principal"; mainMenuWin.text = "Menu Principal"; nextLevel.text = "Next Level"; retry.text = "Retry"; break; } }
void Language() { switch (gmSingScript.GetLanguage()) { case "English": scoreText = "Your Score"; finalScoreText = "Total Score"; levelText = "Level"; break; case "Español": scoreText = "Puntuacion"; finalScoreText = "Total"; levelText = "Nivel"; break; case "Français": scoreText = "Final score"; finalScoreText = "Menu Principal"; levelText = "Level"; break; } }