public abstract class GameFuture
extends java.lang.Object
| Constructor and Description |
|---|
GameFuture()
Constructor using
GameScriptingEngine.MOST_RECENT_INSTANCE |
GameFuture(GameScriptingEngine gameScriptingEngine)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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 |
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()
public void skipFuture()
public void waitForCompletion()
throws ScriptSkippedException
GameFuture to completeScriptSkippedException - Thrown when the script is skippedpublic 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