addComponent<T extends Component> method

void addComponent<T extends Component>(
  1. int entity,
  2. T component
)

Add a component to an entity.

Implementation

void addComponent<T extends Component>(int entity, T component) =>
    world.addComponent(entity, component);