Inheritance: CellEffectBase
Example #1
0
        public override ICellEffect Clone()
        {
            EffectsChain chain = new EffectsChain()
            {
                _enabled            = _enabled,
                _activeIndex        = _activeIndex,
                DelayBetweenEffects = DelayBetweenEffects,
                Repeat = Repeat,

                IsFinished       = IsFinished,
                StartDelay       = StartDelay,
                CloneOnApply     = CloneOnApply,
                RemoveOnFinished = RemoveOnFinished,
                DiscardCellState = DiscardCellState,
                Permanent        = Permanent,
                _timeElapsed     = _timeElapsed,
            };

            foreach (ICellEffect item in Effects)
            {
                chain.Effects.Add(item.CloneOnApply ? item.Clone() : item);
            }

            chain._activeEffect = chain.Effects[chain._activeIndex];
            return(chain);
        }
        /// <inheritdoc />
        public override ICellEffect Clone()
        {
            EffectsChain chain = new EffectsChain()
            {
                _enabled            = _enabled,
                _activeIndex        = _activeIndex,
                DelayBetweenEffects = DelayBetweenEffects,
                Repeat = Repeat,

                IsFinished           = IsFinished,
                StartDelay           = StartDelay,
                CloneOnAdd           = CloneOnAdd,
                RemoveOnFinished     = RemoveOnFinished,
                RestoreCellOnRemoved = RestoreCellOnRemoved,
                _timeElapsed         = _timeElapsed,
            };

            foreach (ICellEffect item in Effects)
            {
                chain.Effects.Add(item.CloneOnAdd ? item.Clone() : item);
            }

            chain._activeEffect = chain.Effects[chain._activeIndex];
            return(chain);
        }
Example #3
0
        public override ICellEffect Clone()
        {
            EffectsChain chain = new EffectsChain()
            {
                _enabled = this._enabled,
                _activeIndex = this._activeIndex,
                RemoveOnFinished = this.RemoveOnFinished,
                StartDelay = this.StartDelay,
                DelayBetweenEffects = this.DelayBetweenEffects,
                CloneOnApply = this.CloneOnApply,
                Repeat = this.Repeat
            };

            foreach (var item in Effects)
                chain.Effects.Add(item.Clone());

            chain._activeEffect = chain.Effects[chain._activeIndex];
            return chain;
        }
Example #4
0
        public override ICellEffect Clone()
        {
            EffectsChain chain = new EffectsChain()
            {
                _enabled            = this._enabled,
                _activeIndex        = this._activeIndex,
                RemoveOnFinished    = this.RemoveOnFinished,
                StartDelay          = this.StartDelay,
                DelayBetweenEffects = this.DelayBetweenEffects,
                CloneOnApply        = this.CloneOnApply,
                Repeat = this.Repeat
            };

            foreach (var item in Effects)
            {
                chain.Effects.Add(item.Clone());
            }

            chain._activeEffect = chain.Effects[chain._activeIndex];
            return(chain);
        }