Пример #1
0
        public void _SetupAbility(List <int> abIDlist, bool enableAll)
        {
            abilityList = new List <Ability>();

            //cloen the ability from DB list (so they dont get modified in runtime)
            if (enableAll)
            {
                abilityList = Ability_DB.LoadClone();
            }
            else
            {
                for (int i = 0; i < abIDlist.Count; i++)
                {
                    abilityList.Add(Ability_DB.CloneItem(abIDlist[i]));
                    abilityList[i].Init();
                }
            }

            //select an ability, if there's any
            Select((abilityList.Count == 0) ? -1 : 0);
        }