public abstract class ScriptComponent extends java.lang.Object implements IComponent
GameObject.SerializableField annotation.| Constructor and Description |
|---|
ScriptComponent() |
| Modifier and Type | Method and Description |
|---|---|
<T extends IService> |
getService(java.lang.Class<T> clazz) |
void |
init()
Called when the script is initialized
|
void |
init(GameObject gameObject)
internal - don't call
|
void |
onActivate()
Called when the
GameObject is activated |
void |
onDeactivate()
Called when the
GameObject is deactivated |
void |
onDestroy()
Called when the
GameObject is destroyed. |
void |
processInputs(IInput input)
Called to process input events
|
void |
start()
Called when the script is starten
|
void |
update(long timePassedMs)
Called to do usual update, based on framerate / delta time
|
void |
updateEnd(long timePassedMs)
Called after
update(long) of all GameObject |
void |
updateStep(long timeStepMs)
Called at each physic simulation steps
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGameObjectpublic final <T extends IService> T getService(java.lang.Class<T> clazz)
public final void init(GameObject gameObject)
init in interface IComponentpublic void onActivate()
GameObject is activatedonActivate in interface IComponentpublic void onDeactivate()
GameObject is deactivatedonDeactivate in interface IComponentpublic void onDestroy()
GameObject is destroyed.super.onDestroy()
at the end of the overrided method.onDestroy in interface IComponentpublic void init()
GameScreenpublic void start()
start in interface IComponentGameScreenpublic void updateStep(long timeStepMs)
GameScreenpublic void processInputs(IInput input)
public void update(long timePassedMs)
public void updateEnd(long timePassedMs)
update(long) of all GameObjectBonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com