Module flower.Resources

A resource management system that caches loaded resources to maximize performance.

Info:

  • Release: V3.0.0
  • Author: Makoto

Functions

addResourceDirectory (path) Add the resource directory path.
getResourceFilePath (fileName) Returns the filePath from fileName.
getTexture (path, filter) Loads (or obtains from its cache) a texture and returns it.
getFont (path, charcodes, points, dpi) Loads (or obtains from its cache) a font and returns it.
readFile (fileName) Returns the file data.
dofile (fileName) Returns the result of executing the dofile.
destroyModule (m) Destroys the reference when the module.


Functions

addResourceDirectory (path)
Add the resource directory path. You can omit the file path by adding. It is assumed that the file is switched by the resolution and the environment.

Parameters:

  • path resource directory path
getResourceFilePath (fileName)
Returns the filePath from fileName.

Parameters:

  • fileName

Returns:

    file path
getTexture (path, filter)
Loads (or obtains from its cache) a texture and returns it. Textures are cached.

Parameters:

  • path The path of the texture
  • filter Texture filter.

Returns:

    Texture instance
getFont (path, charcodes, points, dpi)
Loads (or obtains from its cache) a font and returns it.

Parameters:

  • path The path of the font.
  • charcodes (option)Charcodes of the font
  • points (option)Points of the font
  • dpi (option)Dpi of the font

Returns:

    Font instance
readFile (fileName)
Returns the file data.

Parameters:

  • fileName file name

Returns:

    file data
dofile (fileName)
Returns the result of executing the dofile. Browse to the directory of the resource.

Parameters:

  • fileName lua file name

Returns:

    results of running the dofile
destroyModule (m)
Destroys the reference when the module.

Parameters:

  • m module
generated by LDoc 1.3