Interface ScriptInstance
- All Known Implementing Classes:
AbstractScript, CreatureScript, EntityScript, EnvironmentScript, GameScript
public interface ScriptInstance
One configured runtime instance of a script.
Instances are created by a CompiledScript and owned by ScriptManager. Implementations should
acquire host-specific resources in attach(ScriptContext) and release them in detach().
-
Method Summary
Modifier and TypeMethodDescriptionvoidattach(ScriptContext<?> context) Attaches this instance to a host context.voiddetach()Releases resources acquired by this attachment.default voidrender(Graphics2D g) Renders script-owned content.default voidupdate()Processes one game-loop update.
-
Method Details