Actual updating and rendering
This commit is contained in:
@@ -13,6 +13,8 @@ import static mindustry.Vars.collisions;
|
||||
/** Represents a group of a certain type of entity.*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class EntityGroup<T extends Entityc> implements Iterable<T>{
|
||||
private static int lastId = 0;
|
||||
|
||||
private final Array<T> array;
|
||||
private final Array<T> intersectArray = new Array<>();
|
||||
private final Rect viewport = new Rect();
|
||||
@@ -23,6 +25,10 @@ public class EntityGroup<T extends Entityc> implements Iterable<T>{
|
||||
|
||||
private int index;
|
||||
|
||||
public static int nextId(){
|
||||
return lastId++;
|
||||
}
|
||||
|
||||
public EntityGroup(Class<T> type, boolean spatial, boolean mapping){
|
||||
array = new Array<>(false, 32, type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user