/** * Get entity editor for entity. * @return a fast albeit verbose editor to perform batch changes to entities. * @param entityId entity to fetch editor for. */ public EntityEdit edit(int entityId) { if (!em.isActive(entityId)) throw new RuntimeException("Issued edit on deleted " + entityId); return batchProcessor.obtainEditor(entityId); }
/** * Get entity editor for entity. * @return a fast albeit verbose editor to perform batch changes to entities. * @param entityId entity to fetch editor for. */ public EntityEdit edit(int entityId) { if (!em.isActive(entityId)) throw new RuntimeException("Issued edit on deleted " + entityId); return batchProcessor.obtainEditor(entityId); }
/** * Checks if the entity has been added to the world and has not been * deleted from it. * <p> * If the entity has been disabled this will still return true. * </p> * @return {@code true} if it's active */ public boolean isActive() { return world.getEntityManager().isActive(id); }
/** * Checks if the entity has been added to the world and has not been * deleted from it. * <p> * If the entity has been disabled this will still return true. * </p> * @return {@code true} if it's active */ public boolean isActive() { return world.getEntityManager().isActive(id); }
private boolean isValid(int entityId) { if (!em.isActive(entityId)) throw new RuntimeException("Issued transmute on deleted " + entityId); if (batchProcessor.isDeleted(entityId)) return false; batchProcessor.changed.unsafeSet(entityId); return true; }
private boolean isValid(int entityId) { if (!em.isActive(entityId)) throw new RuntimeException("Issued transmute on deleted " + entityId); if (batchProcessor.isDeleted(entityId)) return false; batchProcessor.changed.unsafeSet(entityId); return true; }