public E basic() { mappers.mBasic.create(entityId); return this; }
public E flag() { mappers.mFlag.create(entityId); return this; }
public E paraGetter() { mappers.mParaGetter.create(entityId); return this; }
public E rename2() { mappers.mRename2.create(entityId); return this; }
/** * Create component for this entity. * Will avoid creation if component preexists. * * @param entityId the entity that should possess the component * @return the instance of the component. */ public A create(int entityId) { return mapper.create(entityId); }
/** * Create a component of given type by class. * @param owner entity id * @param componentClass class of component to instance. * @return Newly created packed, pooled or basic component. */ protected <T extends Component> T create(int owner, Class<T> componentClass) { return getMapper(componentClass).create(owner); }
/** * Create a component of given type by class. * @param owner entity id * @param componentClass class of component to instance. * @return Newly created packed, pooled or basic component. */ protected <T extends Component> T create(int owner, Class<T> componentClass) { return getMapper(componentClass).create(owner); }
/** * Create new instance of component. * <p/> * if exists, replaces and retires old component! * * @param componentKlazz Class to create. * @return Newly instanced component. */ public <T extends Component> T create(Class<T> componentKlazz) { return cm.getMapper(componentKlazz).create(entityId); }
/** * Create a component of given type by class. * @param owner entity id * @param componentClass class of component to instance. * @return Newly created packed, pooled or basic component. */ protected <T extends Component> T create(int owner, Class<T> componentClass) { return getMapper(componentClass).create(owner); }
public E basic(int p0, Basic p1) { mappers.mBasic.create(entityId).set(p0, p1); return this; }
public E paraGetterCustom(String p0) { mappers.mParaGetter.create(entityId).custom(p0); return this; }
/** * Create component for this entity. * Will avoid creation if component preexists. * * @param entity the entity that should possess the component * @return the instance of the component. */ public A create(Entity entity) { return mapper.create(entity.getId()); }
public A get(Entity e, boolean forceNewInstance) throws ArrayIndexOutOfBoundsException { A component = mapper.get(e); if(component == null && forceNewInstance) { component = mapper.create(e); } return component; }
public E basic(int p0) { mappers.mBasic.create(entityId).set(p0); return this; }
public A get(int entityId, boolean forceNewInstance) throws ArrayIndexOutOfBoundsException { A component = mapper.get(entityId); if(component == null && forceNewInstance) { component = mapper.create(entityId); } return component; }
/** * Create component for this entity. * Will avoid creation if component preexists. * * @param entity the entity that should possess the component * @return the instance of the component. */ public A create(Entity entity) { return mapper.create(entity.getId()); }
/** * Create new instance of component. * <p/> * if exists, replaces and retires old component! * * @param componentKlazz Class to create. * @return Newly instanced component. */ public <T extends Component> T create(Class<T> componentKlazz) { return cm.getMapper(componentKlazz).create(entityId); }
public A get(int entityId, boolean forceNewInstance) throws ArrayIndexOutOfBoundsException { A component = mapper.get(entityId); if(component == null && forceNewInstance) { component = mapper.create(entityId); } return component; }
private JsonValue readKeyTag(JsonValue jsonData, Entity e) { if ("key".equals(jsonData.name)) { String key = jsonData.asString(); keyTracker.register(key, e); saveTagMapper.create(e).tag = key; jsonData = jsonData.next; } return jsonData; } }
private JsonValue readKeyTag(JsonValue jsonData, Entity e) { if ("key".equals(jsonData.name)) { String key = jsonData.asString(); keyTracker.register(key, e); saveTagMapper.create(e).tag = key; jsonData = jsonData.next; } return jsonData; } }