AbstractThe type of the configuration passed to the constructor.
Creates the component.
The type of the configuration passed to the constructor.
Optionalconfig: C
The component's configuration. Fields marked with DefineField take their values from
config, or its decorated fields keep their initial values.
OptionalactorThe actor that has this component. It is undefined until the component is
added to an actor.
StaticcomponentThe name the configuration uses for the component. It must be unique among the components of the game.
DefineComponent sets it, so a game usually does not assign it.
Base class for all components.
A component stores data for an actor. Extend this class to write your own component, and name it with DefineComponent. The engine uses the name to find the class for a component in the configuration. A class without the decorator can set a static
componentNameinstead.Example
See
Components