Пример #1
0
        [HideInInspector] public Ability ability;       //the actual ability, only assigned in runtime

        //fire alternate mode
        public void FireAlt()
        {
            //if there's no ability, return
            if (ability == null || abilityID < 0)
            {
                return;
            }

            //check if the ability is ready to be activated
            string status = ability.IsReady();

            if (status != "")
            {
                //if cannot fire, fire event explaining why (for UI)
                TDS.FireAltFail(status);
                return;
            }

            //launch the ability
            AbilityManager.LaunchAbility(ability);
        }