Пример #1
0
        public void AddBuffGameScript(string buffNamespace, string buffClass, ISpell ownerSpell, float removeAfter = -1f, bool isUnique = false)
        {
            if (isUnique)
            {
                RemoveBuffGameScriptsWithName(buffNamespace, buffClass);
            }

            var buffController =
                new BuffGameScriptController(_game, this, buffNamespace, buffClass, (Spell)ownerSpell, removeAfter);

            BuffGameScriptControllers.Add(buffController);
            buffController.ActivateBuff();

            // TODO: should handle the controllers in the class, and don't pass them outside
        }
Пример #2
0
        public BuffGameScriptController AddBuffGameScript(String buffNamespace, String buffClass, Spell ownerSpell, float removeAfter = -1f, bool isUnique = false)
        {
            if (isUnique)
            {
                RemoveBuffGameScriptsWithName(buffNamespace, buffClass);
            }

            BuffGameScriptController buffController =
                new BuffGameScriptController(this, buffNamespace, buffClass, ownerSpell, duration: removeAfter);

            BuffGameScriptControllers.Add(buffController);
            buffController.ActivateBuff();

            return(buffController);
        }