/// <summary> /// Disposes of the data stored by this TextureAtlas /// </summary> public void Dispose() { // Clear the lists FrameList.Clear(); BoundsList.Clear(); OriginsList.Clear(); ReuseCount.Clear(); }
/// <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); }