public abstract class QuickEntity extends Object implements Entity, EngineHolder<CoreEngine>
Entity easily.
Implements all methods in order to override only "needed" methods and handels the following:
- Storing the parent node
- Storing the coreengine
- Storing a name (and setting it)| Modifier and Type | Field and Description |
|---|---|
protected CoreEngine |
engine |
protected String |
name |
static String |
NAME_UNTITLED_ENTITY |
protected Node |
parent |
| Constructor and Description |
|---|
QuickEntity()
Create an "Untitled Entity"
|
QuickEntity(String name)
Create a entity with a specifc name
|
| Modifier and Type | Method and Description |
|---|---|
void |
attached()
Called when an Entity gets attached to an scenegraph
|
Node |
boxed()
Returns a Node containing this Entity.
|
Transform |
getTransform()
Should return the current transform of the Entity
|
void |
removed()
Sets the parent to null.
|
void |
render(RenderEngine renderEngine)
Called on render, draw stuff here
|
void |
update(float delta)
Trigger an update.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, setEngine, setParentgetEngine, setEnginepublic static final String NAME_UNTITLED_ENTITY
protected Node parent
protected CoreEngine engine
protected String name
public QuickEntity()
public QuickEntity(String name)
name - The namepublic void update(float delta)
Updatableupdate in interface Updatabledelta - The delta timeUpdatable.update(float)public void render(RenderEngine renderEngine)
Entityrender in interface EntityrenderEngine - The active renderEngine (caller)Entity.render(org.achtern.AchternEngine.core.rendering.RenderEngine)public void removed()
removed in interface EntityEntity.removed()public void attached()
Entitypublic Node boxed()
public Transform getTransform()
EntitygetTransform in interface EntityEntity.getTransform()Copyright © 2014. All rights reserved.