// Prefills the pool with the given number of elements
 protected override void FillReserve(int fillSize)
 {
     for (int i = fillSize; i > 0; i--)
     {
         AnimationUnitFlip newNode = new AnimationUnitFlip();
         this.reservedList.PushFront(newNode);
     }
 }
        /// <summary>
        ///		Adds a boolean flag pair for flipping the sprite
        ///		in the X dimension and Y dimension
        /// </summary>
        /// <param name="shouldXFlip"></param>
        /// <param name="shouldYFlip"></param>
        /// <returns></returns>
        public AnimationUnitFlip Attach(bool shouldXFlip, bool shouldYFlip)
        {
            AnimationUnitFlip newUnit = this.BaseAttach(0u) as AnimationUnitFlip;

            newUnit.SetFlipping(shouldXFlip, shouldYFlip);
            this.PointToStartingAnimationUnit();
            return(newUnit);
        }
        //
        // Contracts
        //

        /// <summary>
        ///		Implements what the animation will actually perform
        /// </summary>
        protected override void Animate()
        {
            // Flip the sprite
            AnimationUnitFlip currUnit = this.currentUnit as AnimationUnitFlip;

            Debug.Assert(currUnit != null);
            this.spriteTarget.ScaleX *= currUnit.XFlipFactor;
            this.spriteTarget.ScaleY *= currUnit.YFlipFactor;
        }