E
- The object type used.public abstract class HandlerObjectGame<E extends ObjectGame> extends Object
Constructor and Description |
---|
HandlerObjectGame()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(E object)
Add an object to the handler list.
|
protected boolean |
canBeAdded(E object)
Check if object can be added.
|
E |
get(Integer key)
Get the object from its key.
|
Collection<E> |
list()
Get the list reference of handled objects.
|
void |
remove(E object)
Add an object to the remove list.
|
void |
removeAll()
Remove all objects from the list.
|
void |
render(Graphic g)
Render the objects.
|
protected abstract void |
render(Graphic g,
E object)
Render the object; called by
render(Graphic) for each object handled. |
int |
size()
Get the number of objects handled.
|
void |
update(double extrp)
Update the objects.
|
protected abstract void |
update(double extrp,
E object)
Update the object; called by
update(double) for each object handled. |
protected abstract void update(double extrp, E object)
update(double)
for each object handled.extrp
- The extrapolation value.object
- The object to update.protected abstract void render(Graphic g, E object)
render(Graphic)
for each object handled.g
- The graphics output.object
- The object to update.public void update(double extrp)
extrp
- The extrapolation value.public void render(Graphic g)
g
- The graphics output.public void add(E object)
updateAdd()
at the begin of the update to add
them properly.object
- The object to add.public E get(Integer key)
key
- The object key.public void remove(E object)
object
- The object to remove.public void removeAll()
public int size()
public Collection<E> list()
protected boolean canBeAdded(E object)
object
- The object to check.true
if can be added, false
else.Copyright © 2014 Byron 3D Games Studio. All rights reserved.