Persistent unit IDs

This commit is contained in:
Anuken
2021-11-29 10:02:03 -05:00
parent 117fd3769e
commit e2576f1538
16 changed files with 74 additions and 34 deletions
@@ -30,6 +30,11 @@ public class EntityGroup<T extends Entityc> implements Iterable<T>{
return lastId++;
}
/** Makes sure the next ID counter is higher than this number, so future entities cannot possibly use this ID. */
public static void checkNextId(int id){
lastId = id + 1;
}
public EntityGroup(Class<T> type, boolean spatial, boolean mapping){
array = new Seq<>(false, 32, type);