Class EnvironmentScript
java.lang.Object
de.gurkenlabs.litiengine.scripting.AbstractScript<Environment>
de.gurkenlabs.litiengine.scripting.EnvironmentScript
- All Implemented Interfaces:
ScriptInstance
Base class for scripts attached to one loaded environment.
-
Field Summary
Fields inherited from class AbstractScript
globals -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidattached()Called after the context is installed and the script becomes active.protected final voiddetached()Called before context-owned resources are released.protected voidCalled when the attached environment is cleared while it remains active.protected voidonEntityAdded(IEntity entity) Called when an entity is added to the attached environment.protected voidonEntityRemoved(IEntity entity) Called when an entity is removed from the attached environment.protected voidonLoaded()Called after the environment has loaded and is the current world environment.protected voidCalled when the environment binding is detached during unload.Methods inherited from class AbstractScript
attach, camera, context, detach, environment, globals, host, input, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheel, onRender, render, spawn, spawn, spawn, spawn, spawnCreature, spawnCreature, spawner, spawnProp, spawnProp, uiMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ScriptInstance
update
-
Constructor Details
-
EnvironmentScript
public EnvironmentScript()
-
-
Method Details
-
attached
Description copied from class:AbstractScriptCalled after the context is installed and the script becomes active.- Overrides:
attachedin classAbstractScript<Environment>- Throws:
Exception- if initialization fails.
-
detached
Description copied from class:AbstractScriptCalled before context-owned resources are released.- Overrides:
detachedin classAbstractScript<Environment>- Throws:
Exception- if cleanup fails.
-
onLoaded
-
onUnloaded
-
onCleared
-
onEntityAdded
-
onEntityRemoved
-