Blueprints for fast construction of Entitys.

This can be constructed by using the Archetype.build macro, or by calling the constructor with the composition and component defaults.

Constructor

inline new (cid:BitVector)

Create a new Archetype instance based on its composition bits.

Parameters:

cid

The composition. A set of bits corresponding to components.

Methods

inline add (type:ComponentType):Void

Register a component type from this archetype.

Parameters:

type

The component type to set.

Static methods

staticbuild (types:Dynamic):Archetype

Create an Archetype from a list of component classes it will be made with.

Parameters:

types

The component classes.

Returns:

The created Archetype instance.