Example #1
0
    private void Start()
    {
        if (cashText != null)
        {
            cashText.text = PersistentDataManager.GetCurrency(DataManager.DATA_CURRENCY_TYPE_CASH).ToString();
        }
        if (gemsText != null)
        {
            gemsText.text = PersistentDataManager.GetCurrency(DataManager.DATA_CURRENCY_TYPE_GEMS).ToString();
        }
        if (nameInput != null)
        {
            nameInput.text = PersistentDataManager.GetName();
        }
        string curWeaponId = PersistentDataManager.GetCurrentWeaponId();

        LoadDropDown <WeaponData>(weaponDropDown, curWeaponId);
        string curEnemyId = PersistentDataManager.GetFavoredEnemyId();

        LoadDropDown <EnemyData>(enemyDropDown, curEnemyId);
        if (languageDropDown != null)
        {
            languageDropDown.ClearOptions();
            List <string> langNames = new List <string>();
            langNames.Add(DataManager.LOC_KEY_HEADER_LANGUAGE_ENGLISH);
            langNames.Add(DataManager.LOC_KEY_HEADER_LANGUAGE_FRENCH);
            langNames.Add(DataManager.LOC_KEY_HEADER_LANGUAGE_GERMAN);
            languageDropDown.AddOptions(langNames);
            languageDropDown.value = 0;
        }
    }