moveComponent<T extends Component> method

void moveComponent<T extends Component>(
  1. int srcEntity,
  2. int dstEntity
)

Moves a Component of type T from the srcEntity to the dstEntity. if the srcEntity does not have the Component of type T nothing will happen.

Implementation

void moveComponent<T extends Component>(int srcEntity, int dstEntity) =>
    componentManager._moveComponent(
      srcEntity,
      dstEntity,
      ComponentType.getTypeFor(T),
    );