Пример #1
0
        public static void AddAbility(string key, SpecialAbility ability)
        {
            ability.key = key;
            Abilities.Add(key, ability);
            ability.Load();

            if (!Main.dedServ)
            {
                ability.ShaderLoad();
            }
        }
Пример #2
0
        /* Activate ability function */
        public static bool Activate(string key)
        {
            SpecialAbility ability = Abilities[key];

            if (ability.CanBeUsed)
            {
                ability.SetUp();
                ability.Start();
                Active.Add(ability);

                return(true);
            }

            return(false);
        } /* End of 'Activate' function */