Modifier and Type | Field and Description |
---|---|
int |
count
The number of Entity objects currently in this list.
|
private java.util.ArrayList<Entity> |
list
The collection underlying this list.
|
Constructor and Description |
---|
Group()
Initialize this object.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
act(double deltaTime)
Runs act method of all objects in this collection.
|
void |
addEntity(Entity e)
Add an
Entity to this collection. |
(package private) void |
draw(javafx.scene.canvas.GraphicsContext context)
Render all Entity objects in this collection to a canvas.
|
Entity |
get(int index)
Retrieve a single Entity instance from this collection.
|
java.util.ArrayList<Entity> |
list()
Retrieve a (shallow) copy of this list.
|
void |
removeEntity(Entity e)
Remove an
Entity from this collection. |
private java.util.ArrayList<Entity> list
public int count
public void addEntity(Entity e)
Entity
to this collection.e
- The Entity being added to this collection.public void removeEntity(Entity e)
Entity
from this collection.e
- The Entity being removed from this collection.public java.util.ArrayList<Entity> list()
public Entity get(int index)
index
- The index of the entity in this collection.void draw(javafx.scene.canvas.GraphicsContext context)