Example #1
0
        public HitEffectList CopyWithHitTime()
        {
            HitEffectList newlist = new HitEffectList();

            base.ForEach(delegate(HitEffect effect)
            {
                effect.hitTime = Time.time;
                newlist.Add(effect);
            });
            return(newlist);
        }
        /// <summary>
        /// Get a copy of this list with effects hitTime set to 'now'.
        /// </summary>
        /// <returns>HitEffectList</returns>
        public HitEffectList CopyWithHitTime()
        {
            var       newlist = new HitEffectList();
            HitEffect effect;
            IEnumerator <HitEffect> enumerator = base.GetEnumerator();

            while (enumerator.MoveNext())
            {
                effect         = enumerator.Current;
                effect.hitTime = Time.time;
                newlist.Add(effect);
            }

            return(newlist);
        }