More cleanup
This commit is contained in:
@@ -9,21 +9,21 @@ import io.anuke.mindustry.entities.traits.*;
|
|||||||
|
|
||||||
import static io.anuke.mindustry.Vars.collisions;
|
import static io.anuke.mindustry.Vars.collisions;
|
||||||
|
|
||||||
|
/** Represents a group of a certain type of entity.*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class EntityGroup<T extends Entity>{
|
public class EntityGroup<T extends Entity>{
|
||||||
private final boolean useTree;
|
private final boolean useTree;
|
||||||
private final int id;
|
private final int id;
|
||||||
private final Class<T> type;
|
private final Class<T> type;
|
||||||
private final Array<T> entityArray = new Array<>(false, 16);
|
private final Array<T> entityArray = new Array<>(false, 32);
|
||||||
private final Array<T> entitiesToRemove = new Array<>(false, 16);
|
private final Array<T> entitiesToRemove = new Array<>(false, 32);
|
||||||
private final Array<T> entitiesToAdd = new Array<>(false, 16);
|
private final Array<T> entitiesToAdd = new Array<>(false, 32);
|
||||||
private IntMap<T> map;
|
private IntMap<T> map;
|
||||||
private QuadTree tree;
|
private QuadTree tree;
|
||||||
private Consumer<T> removeListener;
|
private Consumer<T> removeListener;
|
||||||
private Consumer<T> addListener;
|
private Consumer<T> addListener;
|
||||||
|
|
||||||
private final Rectangle viewport = new Rectangle();
|
private final Rectangle viewport = new Rectangle();
|
||||||
private final boolean clip = true;
|
|
||||||
private int count = 0;
|
private int count = 0;
|
||||||
|
|
||||||
public EntityGroup(int id, Class<T> type, boolean useTree){
|
public EntityGroup(int id, Class<T> type, boolean useTree){
|
||||||
|
|||||||
Reference in New Issue
Block a user