示例#1
0
    private void Start()
    {
        lang  = PlayerPrefs.GetString("keyLang");
        title = GameObject.Find("modeName").GetComponent <Text>();

        if (lang.Equals("Ukrainian"))
        {
            uaRules uatxt = (uaRules)FindObjectOfType(typeof(uaRules));
            for (int i = 0; i < uatxt.UkrTittles.Length; i++)
            {
                arrayText.Add(uatxt.UkrTittles[i]);
            }
        }

        if (lang.Equals("Russian"))
        {
            ruRules rutxt = (ruRules)FindObjectOfType(typeof(ruRules));
            for (int i = 0; i < rutxt.RusTittles.Length; i++)
            {
                arrayText.Add(rutxt.RusTittles[i]);
            }
        }

        if (lang.Equals("English"))
        {
            enRules entxt = (enRules)FindObjectOfType(typeof(enRules));
            for (int i = 0; i < entxt.EngTittles.Length; i++)
            {
                arrayText.Add(entxt.EngTittles[i]);
            }
        }

        title.text = arrayText[15];
    }
    void Start()
    {
        lang = PlayerPrefs.GetString("keyLang");

        if (lang.Equals("Ukrainian"))
        {
            uaRules uatxt = (uaRules)FindObjectOfType(typeof(uaRules));
            very_easy.text = uatxt.UkrTittles[7];
            easy.text      = uatxt.UkrTittles[8];
            medium.text    = uatxt.UkrTittles[9];
            hard.text      = uatxt.UkrTittles[10];
            very_hard.text = uatxt.UkrTittles[11];
        }
        if (lang.Equals("Russian"))
        {
            ruRules rutxt = (ruRules)FindObjectOfType(typeof(ruRules));
            very_easy.text = rutxt.RusTittles[7];
            easy.text      = rutxt.RusTittles[8];
            medium.text    = rutxt.RusTittles[9];
            hard.text      = rutxt.RusTittles[10];
            very_hard.text = rutxt.RusTittles[11];
        }
        if (lang.Equals("English"))
        {
            enRules entxt = (enRules)FindObjectOfType(typeof(enRules));
            very_easy.text = entxt.EngTittles[7];
            easy.text      = entxt.EngTittles[8];
            medium.text    = entxt.EngTittles[9];
            hard.text      = entxt.EngTittles[10];
            very_hard.text = entxt.EngTittles[11];
        }
    }
示例#3
0
    private void Start()
    {
        lang    = PlayerPrefs.GetString("keyLang");
        title   = GameObject.Find("gameName").GetComponent <Text>();
        single  = GameObject.Find("menuAI").GetComponent <Text>();
        multi   = GameObject.Find("menuPVP").GetComponent <Text>();
        setting = GameObject.Find("menuOpt").GetComponent <Text>();
        quit    = GameObject.Find("menuExit").GetComponent <Text>();

        if (lang.Equals("Ukrainian"))
        {
            uaRules uatxt = (uaRules)FindObjectOfType(typeof(uaRules));
            for (int i = 0; i < uatxt.UkrTittles.Length - 1; i++)
            {
                arrayText.Add(uatxt.UkrTittles[i]);
            }
        }

        if (lang.Equals("Russian"))
        {
            ruRules rutxt = (ruRules)FindObjectOfType(typeof(ruRules));
            for (int i = 0; i < rutxt.RusTittles.Length - 1; i++)
            {
                arrayText.Add(rutxt.RusTittles[i]);
            }
        }

        if (lang.Equals("English"))
        {
            enRules entxt = (enRules)FindObjectOfType(typeof(enRules));
            for (int i = 0; i < entxt.EngTittles.Length - 1; i++)
            {
                arrayText.Add(entxt.EngTittles[i]);
            }
        }

        title.text   = arrayText[0];
        single.text  = arrayText[1];
        multi.text   = arrayText[2];
        setting.text = arrayText[3];
        quit.text    = arrayText[4];
    }