protected IAbility GetSecondSpecialAbility()
        {
            if (SecondSpecialAbility == null)
            {
                Debug.LogError(ErrorMessages.SecondSpecialAbilityNotSet);
                SecondSpecialAbility = new DefaultAbility();
            }

            return(SecondSpecialAbility);
        }
        protected IAbility GetThirdSpecialAbility()
        {
            if (ThirdSpecialAbility == null)
            {
                Debug.LogError(ErrorMessages.ThirdSpecialAbilityNotSet);
                ThirdSpecialAbility = new DefaultAbility();
            }

            return(ThirdSpecialAbility);
        }
        protected IAbility GetFirstSpecialAbility()
        {
            if (FirstSpecialAbility == null)
            {
                Debug.LogError(ErrorMessages.FirstSpecialAbilityNotSet);
                FirstSpecialAbility = new DefaultAbility();
            }

            return(FirstSpecialAbility);
        }
Exemplo n.º 4
0
        public void AddNewAbility(DefaultAbility ability)
        {
            if (abilities.Any(x => x.Handle == ability.Handle))
            {
                return;
            }

            abilities.Add(ability);

            if (ability is IActiveAbility)
            {
                menu.AbilitiesMenu.AddAbility(ability.Name);
            }
        }