public static Entity create(World world, int entityId) { return new Entity(world, entityId); } }
@Override protected Entity newObject() { return new Entity(world); }
public static Entity create(World world, int entityId) { return new Entity(world, entityId); } }
/** * Instantiates an Entity without registering it into the world. * @param id The ID to be set on the Entity */ private Entity createEntity(int id) { Entity e = new Entity(world, id); if (e.id >= entities.getCapacity()) { growEntityStores(); } // can't use unsafe set, as we need to track highest id // for faster iteration when syncing up new subscriptions // in ComponentManager#synchronize entities.set(e.id, e); return e; }
/** * Instantiates an Entity without registering it into the world. * @param id The ID to be set on the Entity */ private Entity createEntity(int id) { Entity e = new Entity(world, id); if (e.id >= entities.getCapacity()) { growEntityStores(); } // can't use unsafe set, as we need to track highest id // for faster iteration when syncing up new subscriptions // in ComponentManager#synchronize entities.set(e.id, e); return e; }