xecs.Commands#

class xecs.Commands[source]#

Bases: object

Make changes to the World.

Methods

spawn

Spawn new entities into the World.

spawn(components, num)[source]#

Spawn new entities into the World.

Parameters:
Returns:

For each component type in components, the indices of the new components in each component pool.

Return type:

list[ArrayViewIndices]

See also

  • World.get_view(): The return indices can be used with this method to access the newly spawned entities.