Exemplo n.º 1
0
 /// <summary>
 /// Load a DragonBones instance from the JSON file at the given path.
 /// </summary>
 /// <param name="path">Relative or absolute path to the json DragonBones file.</param>
 /// <param name="texturer">The supplier that has all textures for the DragonBones file at the given path.</param>
 /// <param name="graphics">A GraphicsDevice used to initialize meshes for FFD if necessary.</param>
 /// <returns></returns>
 public static DragonBones FromJson(string path, ITextureSupplier texturer, GraphicsDevice graphics)
 {
     if (!File.Exists(path))
     {
         throw new FileNotFoundException("Could not resolve the given path", path);
     }
     return(new DragonBones(texturer, graphics, DbData.FromJson(path)));
 }