Mallet Engine
2
Entity-Component based game engine, written in Java.
|
Public Member Functions | |
AbstractManager () | |
boolean | add (final String _key, final Resource _value) |
Resource | get (final String _file) |
void | clean () |
void | clear () |
void | shutdown () |
void | printContents () |
Protected Member Functions | |
Resource | createResource (final String _file) |
String | redirectResourceLocation (final String _file) |
boolean | exists (final String _file) |
Protected Attributes | |
final HashMap< String, Resource > | resources = new HashMap<String, Resource>() |
boolean com.linxonline.mallet.resources.AbstractManager.add | ( | final String | _key, |
final Resource | _value | ||
) |
Implements com.linxonline.mallet.resources.ManagerInterface.
Removes resources that are not used.
Implements com.linxonline.mallet.resources.ManagerInterface.
Iterates over all Resource and destroying them. Then clearing the HashMap
Implements com.linxonline.mallet.resources.ManagerInterface.
Resource com.linxonline.mallet.resources.AbstractManager.createResource | ( | final String | _file | ) | [protected] |
Should be overriden by all classes that extend this class. Called when a resource needs to be created.
Reimplemented in com.linxonline.mallet.resources.SoundManager, com.linxonline.mallet.resources.SpriteManager, and com.linxonline.mallet.resources.TextureManager.
boolean com.linxonline.mallet.resources.AbstractManager.exists | ( | final String | _file | ) | [protected] |
Resource com.linxonline.mallet.resources.AbstractManager.get | ( | final String | _file | ) |
Implements com.linxonline.mallet.resources.ManagerInterface.
String com.linxonline.mallet.resources.AbstractManager.redirectResourceLocation | ( | final String | _file | ) | [protected] |
This allow the developer to redirect what resource should be loaded up.
For example this would allow the request to be redirected to a lower quality or higher quality version of the requested resource. Override to make use of.
Reimplemented in com.linxonline.mallet.resources.TextureManager.
Implements com.linxonline.mallet.resources.ManagerInterface.
Reimplemented in com.linxonline.mallet.resources.SoundManager.
final HashMap<String, Resource> com.linxonline.mallet.resources.AbstractManager.resources = new HashMap<String, Resource>() [protected] |