Exemplo n.º 1
0
    // Use this for initialization
    private void Start()
    {
        IniPos = transform.position;
        Hide();

        //var Terra_Size_Btn = GetGrandChildCalled("Terra_Size_Btn");
        //_sizeTxt = Terra_Size_Btn.GetComponentInChildren<Text>();

        Terra_Name_Btn = GetGrandChildCalled("Terra_Name_Btn");
        _terraNameTxt  = Terra_Name_Btn.GetComponentInChildren <Text>();

        Diff_Btn  = GetGrandChildCalled("Diff_Btn");
        _diffLang = Diff_Btn.GetComponentInChildren <LangUpdateScript>();

        var t_Btn = GetGrandChildCalled("Type_Btn");

        _typeLang = t_Btn.GetComponentInChildren <LangUpdateScript>();
        _typeLang.SetKey("Freewill");

        _inputTownName = GetChildCalled("Input_Name").GetComponent <InputField>();

        _pirateToggle = GetChildCalled("Pirate_Toggle").GetComponent <Toggle>();
        _foodToggle   = GetChildCalled("Food_Toggle").GetComponent <Toggle>();

        LoadDefaultForNewGame();
        AddressDevVer();
    }
Exemplo n.º 2
0
 /// <summary>
 /// And is called from GUI also
 /// </summary>
 /// <param name="pass"></param>
 public void ClickOnTypeOfGame(string pass)
 {
     if (pass == "Traditional")
     {
         _typeLang.SetKey("Traditional");
     }
     else if (pass == "Freewill")
     {
         _typeLang.SetKey("Freewill");
     }
     if (TownLoader.IsTemplate)
     {
         Program.TypeOfGame = H.None;
         _typeLang.SetKey("None");
     }
 }
Exemplo n.º 3
0
    private void Display()
    {
        _inputTownName.text = _townName;

        //_sizeTxt.text = _size;
        _terraNameTxt.text = _terraName;
        _diffLang.SetKey(_difficulty);
    }
Exemplo n.º 4
0
    public void RefreshAllDropDowns()
    {
        _autoSaveBtnTxt.text = (Settings.AutoSaveFrec / 60) + " min";
        _unitBtnLang.SetKey("Imperial");
        if (Unit.Units == 'm')
        {
            _unitBtnLang.SetKey("Metric");
        }
        _resBtnTxt.text  = CurrentResolution();
        _langBtnTxt.text = Languages.CurrentLang();

        var names = QualitySettings.names;
        var curr  = QualitySettings.GetQualityLevel();

        for (int i = 0; i < names.Length; i++)
        {
            if (i == curr)
            {
                _qualityBtnLang.SetKey(names[i]);
            }
        }
    }