/// <summary> /// Initializes a new instance of the <see cref="Animation2D" /> class. /// </summary> /// <param name="path">Content-relative path to sprite sheet data.</param> /// <param name="loader"><see cref="ISpriteSheetLoader"/> strategy</param> private Animation2D(string path, ISpriteSheetLoader loader) : this() { if (string.IsNullOrEmpty(path)) { throw new ArgumentException("Path cannot be null.", "path"); } if (loader == null) { throw new ArgumentException("Sprite sheet loader cannot be null.", "loader"); } this.spriteSheetLoader = loader; this.frames = this.spriteSheetLoader.Parse(path); }
/// <summary> /// c'tor /// </summary> /// <param name="loader"></param> public SpriteSheetMapBuilder(ISpriteSheetLoader loader) { Loader = loader; }
/// <summary> /// c'tor /// </summary> /// <param name="source"></param> /// <param name="destLoader"></param> public SpriteSheetNameChanger(SpriteSheetMap source, ISpriteSheetLoader destLoader) { TargetLoader = destLoader; Source = source; }