Пример #1
0
    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();
    }
Пример #2
0
    // Use this for initialization
    void Awake()
    {
        //Read the xml file using the dll MyXmlReader
        MyXmlReader xmlreader = gameObject.AddComponent <MyXmlReader> ();

        languages = xmlreader.ReadXml(dictonary);
    }
Пример #3
0
    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> ();
    }