remove actors
This commit is contained in:
parent
98c09014ad
commit
3a6b5379dc
1 changed files with 0 additions and 16 deletions
|
@ -13,14 +13,10 @@ import com.monjaro.gamejam.segment.KinSegment;
|
||||||
import com.monjaro.gamejam.segment.Segment;
|
import com.monjaro.gamejam.segment.Segment;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public class Game extends ApplicationAdapter {
|
public class Game extends ApplicationAdapter {
|
||||||
|
|
||||||
private final Set<Actor> actors = new HashSet<>();
|
|
||||||
|
|
||||||
private final List<Die> dice = new ArrayList<>();
|
private final List<Die> dice = new ArrayList<>();
|
||||||
private final List<Segment> segments = new ArrayList<>();
|
private final List<Segment> segments = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -57,8 +53,6 @@ public class Game extends ApplicationAdapter {
|
||||||
|
|
||||||
public void tick() {
|
public void tick() {
|
||||||
processInput();
|
processInput();
|
||||||
|
|
||||||
actors.forEach(Actor::tick);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void processInput() {
|
public void processInput() {
|
||||||
|
@ -94,8 +88,6 @@ public class Game extends ApplicationAdapter {
|
||||||
ScreenUtils.clear(0, 0, 0, 1);
|
ScreenUtils.clear(0, 0, 0, 1);
|
||||||
batch.begin();
|
batch.begin();
|
||||||
|
|
||||||
actors.forEach(a -> a.render(batch));
|
|
||||||
|
|
||||||
//TODO debug
|
//TODO debug
|
||||||
for (Die die : dice) {
|
for (Die die : dice) {
|
||||||
die.render(batch);
|
die.render(batch);
|
||||||
|
@ -120,12 +112,4 @@ public class Game extends ApplicationAdapter {
|
||||||
img.dispose();
|
img.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addActor(Actor actor) {
|
|
||||||
actors.add(actor);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void removeActor(Actor actor) {
|
|
||||||
actors.remove(actor);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue