private void ValidateArguments(ITexture texture, string dataFilePath, TexturePackerParser parser) { if (texture == null) { throw new ArgumentNullException(nameof(texture)); } if (texture.IsDisposed) { throw new ObjectDisposedException(texture.GetType().FullName); } if (!File.Exists(dataFilePath)) { throw new FileNotFoundException(nameof(dataFilePath)); } }
internal SpriteSheet(ITexture texture, string dataFilePath, TexturePackerParser parser) { ValidateArguments(texture, dataFilePath, parser); this.Texture = texture; this.textureAtlas = parser.Parse(dataFilePath); }
public void SetUp() { parser = new TexturePackerParser(); }