public class InteractiveScriptListener extends java.lang.Object implements ScriptInvocationListener
| Modifier and Type | Field and Description |
|---|---|
static boolean |
NOTIFY_THEN_ALLOW_INTERACTION
When true sends notifications then allows next interaction script.
|
static boolean |
WAIT_FOR_GAME_THREAD_NOTIFICATIONS
When true waits for game thread notifications to be processed before proceeding
|
| Constructor and Description |
|---|
InteractiveScriptListener(GameScriptingEngine scriptingEngine,
ScriptInvocationQueue invocationQueue) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
callOnGameThread()
Returns if this
ScriptInvocationListener should be notified on
the game thread |
ScriptInvocationListener |
getInvocationListener() |
void |
onScriptBegin(int scriptId)
Called just before a script begins execution.
|
void |
onScriptException(int scriptId,
java.lang.Exception e)
Called when an exception occurs during script execution
|
void |
onScriptSkipped(int scriptId)
Called when a script is skipped during execution
|
void |
onScriptSuccess(int scriptId,
ScriptExecutionResult executionResult)
Called when a script successfully completes
|
void |
track(int scriptId,
ScriptInvocationListener invocationListener) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonScriptCancelledpublic static boolean NOTIFY_THEN_ALLOW_INTERACTION
public static boolean WAIT_FOR_GAME_THREAD_NOTIFICATIONS
public InteractiveScriptListener(GameScriptingEngine scriptingEngine, ScriptInvocationQueue invocationQueue)
public void track(int scriptId,
ScriptInvocationListener invocationListener)
public void onScriptBegin(int scriptId)
ScriptInvocationListeneronScriptBegin in interface ScriptInvocationListenerscriptId - The script idpublic void onScriptSuccess(int scriptId,
ScriptExecutionResult executionResult)
ScriptInvocationListeneronScriptSuccess in interface ScriptInvocationListenerscriptId - The script idexecutionResult - The variable bindings after executionpublic void onScriptSkipped(int scriptId)
ScriptInvocationListeneronScriptSkipped in interface ScriptInvocationListenerscriptId - The script idpublic void onScriptException(int scriptId,
java.lang.Exception e)
ScriptInvocationListeneronScriptException in interface ScriptInvocationListenerscriptId - The script ide - The exception that occurredpublic ScriptInvocationListener getInvocationListener()
public boolean callOnGameThread()
ScriptInvocationListenerScriptInvocationListener should be notified on
the game threadcallOnGameThread in interface ScriptInvocationListenerGameScriptingEngine thread pool