BBGamelib.CCAnimate.reverseImpl C# (CSharp) Method

reverseImpl() protected method

protected reverseImpl ( ) : CCAction
return CCAction
		protected override CCAction reverseImpl ()
		{
			List<CCAnimationFrame> oldArray = _animation.frames;
			List<CCAnimationFrame> newArray = new List<CCAnimationFrame> (oldArray.Count);
			
			var enumerator = oldArray.GetEnumerator();
			while (enumerator.MoveNext()) {
				var frame = enumerator.Current;
				newArray.Add(frame.copy());			
			}
			newArray.Reverse ();
			
			
			CCAnimation newAnim = new CCAnimation (newArray, _animation.delayPerUnit, _animation.loops);
			newAnim.restoreOriginalFrame = _animation.restoreOriginalFrame;
			CCAnimate animate = new CCAnimate(animation);
			return animate;
		}
	}