예제 #1
0
        public Effect Add(Effect add)
        {
            this.Effects.Add(add);

            add.Finished += EffectFinished;

            return add;
        }
예제 #2
0
        public bool Remove(Effect add)
        {
            if (this.Effects.Contains(add))
            {
                this.Effects.Remove(add);

                add.Finished -= EffectFinished;

                return true;
            }

            return false;
        }
예제 #3
0
        public Effect AddEndEffect(Effect add, int stack = 0)
        {
            while (this.EndEffects.Count <= stack)
            {
                this.EndEffects.Add(new EffectStack());

                this.EndEffects.Last().Finished += EndEffectFinished;
            }

            this.EndEffects[stack].Add(add);

            return add;
        }