|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.triangularpixels.rebirth.resources.ResourceHandle<T>
T - the Resource subtype of this handle.public class ResourceHandle<T extends Resource>
A handle to a specific Resource object. Game code should hold onto handles rather than references to resources directly, calling get() to retrieve the underlying resource object just before each use. Since the resource system may reparse and update resources on the fly, the object returned from get() should only be considered valid for the rest of the frame.
| Nested Class Summary | |
|---|---|
static class |
ResourceHandle.State
|
| Method Summary | |
|---|---|
void |
forceCreate()
Forces the resource into a fully created state by doing all remaining loading in the main thread. |
T |
get()
Fetches the underlying resource object |
ResourceHandle.State |
getState()
Returns the current state of this resource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public ResourceHandle.State getState()
public T get()
public void forceCreate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||