Create a pathRequest component for spreading into spawn() / addComponent().
pathRequest
spawn()
addComponent()
ecs.spawn({ ...createTransform(0, 0), ...createMoveSpeed(100), ...createPathRequest({ x: 200, y: 300 }),}); Copy
ecs.spawn({ ...createTransform(0, 0), ...createMoveSpeed(100), ...createPathRequest({ x: 200, y: 300 }),});
Create a
pathRequestcomponent for spreading intospawn()/addComponent().