public abstract class GameFuture
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static long |
WAIT_TIMEOUT_MILLIS
Set a value if you want waitForCompletion to wake up and check status
|
| Constructor and Description |
|---|
GameFuture()
Constructor using
GameScriptingEngine.MOST_RECENT_INSTANCE |
GameFuture(GameScriptingEngine gameScriptingEngine)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
complete() |
int |
getFutureId()
Returns this unique id of this
GameFuture instance |
boolean |
isCompleted()
Returns if this
GameFuture is complete |
boolean |
isFutureSkipped()
Returns if this
GameFuture was skipped |
boolean |
isReadyForGC()
Returns if the
GameFuture is ready for cleanup |
boolean |
isScriptSkipped()
Returns if the script was skipped
|
protected abstract void |
onFutureSkipped()
Called when the
GameFuture is skipped |
protected abstract void |
onScriptSkipped()
Called when the entire script is skipped
|
void |
skipFuture() |
protected abstract boolean |
update(float delta)
Update the
GameFuture |
void |
waitForCompletion()
Can be called in a script to wait for this
GameFuture to complete |
void |
wfc()
Alias to
waitForCompletion() |
public static long WAIT_TIMEOUT_MILLIS
public GameFuture()
GameScriptingEngine.MOST_RECENT_INSTANCEpublic GameFuture(GameScriptingEngine gameScriptingEngine)
gameScriptingEngine - The GameScriptingEngine this future belongs toprotected abstract boolean update(float delta)
GameFuturedelta - The amount of time (in seconds) since the last frameGameFuture has completedprotected abstract void onFutureSkipped()
GameFuture is skippedprotected abstract void onScriptSkipped()
protected void complete()
public void skipFuture()
public void waitForCompletion()
throws ScriptSkippedException
GameFuture to completeScriptSkippedException - Thrown when the script is skippedpublic void wfc()
throws ScriptSkippedException
waitForCompletion()ScriptSkippedExceptionpublic boolean isCompleted()
GameFuture is completepublic boolean isFutureSkipped()
GameFuture was skippedGameFuture was skippedpublic boolean isScriptSkipped()
GameFuture was waiting for completion when
the script was skippedpublic boolean isReadyForGC()
GameFuture is ready for cleanuppublic int getFutureId()
GameFuture instance