Loader

Resource loader. Loads resources, fonts and more and keeps it in memory.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

add
void add(Resource res)

Will add a resource that was not loaded through the manager. Please note that it must have a path and a name.

free
void free(T obj)

Frees the resource from memory by calling the free construct on the resource if it has unreleased pointers and so on, and later removes the resource from the array, letting the garbage collector destroy this object.

free
void free(string path)

Frees the resource from memory by calling the free construct on the resource if it has unreleased pointers and so on, and later removes the resource from the array, letting the garbage collector destroy this object.

get
T get(string name)

Returns a resource by name or path.

load
T load(string path, string name)

Will load the resource, having only its path as input. The entire loading implementation lies with the resource itself. The manager will simply keep this resource in memory.

load
void load(string[string] paths)

Loads multiple resources in one fell swoop using an associated array.

Meta