void Awake() { #region Make the object persistent if (setupLanguage == null) { DontDestroyOnLoad(gameObject); setupLanguage = this; } else if (setupLanguage != this) { Destroy(gameObject); } #endregion FindGameSetupLangue(); // Set initial language userLanguage = Application.systemLanguage.ToString(); // Gets the language from the user's system //Read the xml file using the dll MyXmlReader MyXmlReader xmlreader = gameObject.AddComponent <MyXmlReader> (); languages = xmlreader.ReadXml(dictonary); // Set initial language SetUserLanguage(); }
// Use this for initialization void Awake() { //Read the xml file using the dll MyXmlReader MyXmlReader xmlreader = gameObject.AddComponent <MyXmlReader> (); languages = xmlreader.ReadXml(dictonary); }
void Awake() { //Read the xml file using the dll MyXmlReader MyXmlReader xmlreader = gameObject.AddComponent <MyXmlReader> (); languages = xmlreader.ReadXml(dictonary); int hint = Random.Range(0, 9); infoText.text = Hints(hint); time = Time.time; waitMinTime = 3f; nextScreen.gameObject.SetActive(false); loadingImag.gameObject.SetActive(true); loadingImag.fillAmount = 0f; source = nextScreen.gameObject.GetComponent <AudioSource> (); }