Example #1
0
        /// <summary>
        /// Inserts a frame into this TextureAtlas
        /// </summary>
        /// <param name="frame">The frame to pack</param>
        public void InsertFrame(IFrame frame)
        {
            if (FrameList.ContainsReference(frame))
            {
                return;
            }

            if (frame.Animation != null && !_animationList.Contains(frame.Animation))
            {
                _animationList.Add(frame.Animation);
            }

            FrameList.Add(frame);
            BoundsList.Add(new Rectangle());
            OriginsList.Add(new Rectangle(0, 0, frame.Width, frame.Height));
            ReuseCount.Add(0);
        }