Beispiel #1
0
        /// <summary>
        /// Adds the texture key frame.
        /// </summary>
        /// <param name="textureId">The texture identifier.</param>
        /// <param name="type">The type.</param>
        /// <param name="frame">The frame.</param>
        public void AddTextureKeyFrame(int textureId, int type, TextureKeyFrame frame)
        {
            if (!_offsets.ContainsKey(type))
            {
                _offsets[type] = new Dictionary <int, List <TextureKeyFrame> >();
            }

            var offsets = _offsets[type];

            if (!offsets.ContainsKey(textureId))
            {
                offsets[textureId] = new List <TextureKeyFrame>();
            }

            offsets[textureId].Add(frame);
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TextureKeyFrame"/> struct.
 /// </summary>
 /// <param name="tkf">The TKF.</param>
 public TextureKeyFrame(TextureKeyFrame tkf)
 {
     Frame  = tkf.Frame;
     Offset = tkf.Offset;
 }