/** * Retrieves component from this entity. * <p> * Minimize usage of this. Use {@link ComponentMapper} instead. * </p> * @param type * in order to retrieve the component fast you must provide a * ComponentType instance for the expected component * @return component that matches, or {@code null} if none is found */ public Component getComponent(ComponentType type) { return world.getComponentManager().getComponent(id, type); }
/** * Retrieves component from this entity. * <p> * Minimize usage of this. Use {@link ComponentMapper} instead. * </p> * @param type * in order to retrieve the component fast you must provide a * ComponentType instance for the expected component * @return component that matches, or {@code null} if none is found */ public Component getComponent(ComponentType type) { return world.getComponentManager().getComponent(id, type); }