Mallet Engine
2
Entity-Component based game engine, written in Java.
|
Public Member Functions | |
synchronized final long | getLivingTime () |
synchronized final long | getCreationTime () |
synchronized final int | getReferenceCount () |
synchronized final void | register () |
synchronized final void | unregister () |
void | destroy () |
String | type () |
Protected Member Functions | |
Resource () |
Resource is the root class that all resource types should extends from.
It uses a simple Reference Counting system to determine how many objects are using the Resource currently.
com.linxonline.mallet.resources.Resource.Resource | ( | ) | [protected] |
If a Resource is hooked to an underlying system, for example the buffer in an ALSASound, then use destroy to unhook it.
Or if the resource stores other resources, call their respective, unregister().
Reimplemented in com.linxonline.mallet.resources.sound.Sound.
synchronized final long com.linxonline.mallet.resources.Resource.getCreationTime | ( | ) |
When was the Resource created.
synchronized final long com.linxonline.mallet.resources.Resource.getLivingTime | ( | ) |
How long has the Resource existed
synchronized final int com.linxonline.mallet.resources.Resource.getReferenceCount | ( | ) |
How many are using this resource
synchronized final void com.linxonline.mallet.resources.Resource.register | ( | ) |
Returns a String that denotes the type of resource ie: SOUND, TEXTURE, MODEL.
Reimplemented in com.linxonline.mallet.resources.sound.Sound, com.linxonline.mallet.resources.texture.Texture, com.linxonline.mallet.resources.texture.Sprite, and com.linxonline.mallet.resources.model.Model.
synchronized final void com.linxonline.mallet.resources.Resource.unregister | ( | ) |