> For the complete documentation index, see [llms.txt](https://vypxl.gitbook.io/scar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vypxl.gitbook.io/scar/application-structure/entities.md).

# Entities

An entity itself is not that special, it is just a container for [components](/scar/application-structure/components.md). It also has `position`, `scale`, `rotation`, and `z` attributes which can be used by e.g. rendering. Components can be inserted upon instantiation or via the `<<` method.

The `Entity` class defines some convenience functions such as the `has` method to check wether it contains one ore more kinds of components and the `[]` and `[]?` methods for component access via type. One can also get the id or get and set the array of components.&#x20;

Any entity can be flagged as dead by calling `Entity#suicide`. The flag state can be checked via the `Entity#alive?` getter.

You can find an example in the [components](/scar/application-structure/components.md) section.
