Mallet Engine  2
Entity-Component based game engine, written in Java.
 All Classes Namespaces Files Functions Variables
Public Member Functions | Protected Member Functions | Protected Attributes
com.linxonline.mallet.resources.AbstractManager Class Reference
Inheritance diagram for com.linxonline.mallet.resources.AbstractManager:
Inheritance graph
[legend]
Collaboration diagram for com.linxonline.mallet.resources.AbstractManager:
Collaboration graph
[legend]

List of all members.

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, Resourceresources = new HashMap<String, Resource>()

Constructor & Destructor Documentation


Member Function Documentation

boolean com.linxonline.mallet.resources.AbstractManager.add ( final String  _key,
final Resource  _value 
)

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.

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]

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.


Member Data Documentation

final HashMap<String, Resource> com.linxonline.mallet.resources.AbstractManager.resources = new HashMap<String, Resource>() [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables