Exemple #1
0
    public void GetEnemyList()
    {
        string[] s = enemyDatabase.GetNames();
        enemyListUI.ClearOptions();

        if (s == null)
        {
            PopupWindow.instance.Active("Database is empty", Color.white);
            return;
        }

        for (int i = 0; i < s.Length; ++i)
        {
            enemyListUI.options.Add(new Dropdown.OptionData(s[i]));
        }

        enemyListUI.captionText.text = enemyListUI.options[0].text;
        enemyListUI.value            = 0;
    }