Exemple #1
0
 private void WriteConfig(IContent writable, AnimatedCursorConfig config)
 {
     using (var stream = writable.GetOutputStream(ConfigFileName))
     {
         xmlSerializer.Serialize(stream, config);
     }
 }
Exemple #2
0
        /// <summary>
        /// 从资源合集读取到动画光标;
        /// </summary>
        public AnimatedCursor Read(IReadOnlyContent content)
        {
            if (content == null)
            {
                throw new ArgumentNullException(nameof(content));
            }

            AnimatedCursorConfig    config   = ReadConfig(content);
            IEnumerable <Texture2D> textures = ReadTextures(content);

            return(new AnimatedCursor(config, textures));
        }
Exemple #3
0
 public AnimatedCursor(AnimatedCursorConfig config, IEnumerable <Texture2D> textures)
 {
     this.textures = textures.ToArray();
     this.config   = config;
 }