Ejemplo n.º 1
0
 /// <summary>
 /// Loads a texture's bitmap from file.
 /// </summary>
 /// <param name="filename">The name of the file to use.</param>
 /// <param name="twidth">The texture width, if any.</param>
 /// <returns>The loaded texture bitmap, or null if it does not exist.</returns>
 public Bitmap LoadBitmapForTexture(string filename, int twidth)
 {
     try
     {
         filename = FileEngine.CleanFileName(filename);
         if (!Files.TryReadFileData($"textures/{filename}.png", out byte[] textureFile))
Ejemplo n.º 2
0
 /// <summary>
 /// Process a single asset streaming goal.
 /// </summary>
 public void ProcessGoal(StreamGoal goal)
 {
     try
     {
         if (!Files.TryReadFileData(goal.FileName, out byte[] data))