The identifier of the entity type.
Optional
components: string[]The default components of the entity type.
Readonly
componentsThe default components of the entity type.
Readonly
identifierThe identifier of the entity type.
Readonly
networkThe network id of the entity type.
Readonly
propertiesReadonly
traitsThe traits that are bound to the entity type. These traits are used to define custom behavior for the entity type.
Static
networkThe network identifier counter for entity types.
Static
Readonly
typesA collective registry of all entity types.
Create a new boolean property for the entity type.
The identifier of the property.
Optional
defaultValue: booleanThe default value of the property, if not specified, false will be used.
The created boolean property.
Create a new enum property for the entity type.
The identifier of the property.
The possible values of the property.
Optional
defaultValue: stringThe default value of the property, if not specified, the first value will be used.
The created enum property.
Create a new float property for the entity type.
The identifier of the property.
The value range of the property. (min to max)
Optional
defaultValue: numberThe default value of the property, if not specified, minimum value will be used.
The created float property.
Create a new integer property for the entity type.
The identifier of the property.
The value range of the property. (min to max)
Optional
defaultValue: numberThe default value of the property, if not specified, minimum value will be used.
The created integer property.
Register a trait to the entity type.
The trait to register.
The entity type instance.
Unregister a trait from the entity type.
The trait to unregister, or the identifier of the trait.
The entity type instance.
Static
getGet the entity type from the registry.
The identifier of the entity type.
The entity type, if found; otherwise, null.
Static
getStatic
toStatic
to
Create a new entity type.