|
Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
|
A component is a grouping of data and utility functions that exist on an entity. It is typically operated on by Systems. All components of an entity are shown in the Grindstone Editor's Inspector panel when that entity is selected.
If components have some specific static functions, those will be used by the ECS system.
Here is an example of how an entity can be defined. The MeshRendererComponent allows for rendering of Meshes.
As you can see, it contains a vector of Materials by which to render the submeshes of a MeshComponent. A typical pattern is to have multiple components work together when used in a System.
Furthermore, you can see the static functions Construct and Destroy, which provide the ECS logic referenced above.