SadConsole.Effects.EffectsChain.Clone C# (CSharp) Method

Clone() public method

public Clone ( ) : ICellEffect
return ICellEffect
        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;
        }