Skip to content
Brandon Dyer edited this page Dec 21, 2018 · 3 revisions

An entity is an object that exists within the game world. It can be a player, sword, bus, wheel, star, planet, tree, or anything in-between. Each entity is given its own integer id. This allows for every game object to act as a separate item.

Engine/Artemis/Entity.h

C++ API

AddComponent(Component *c)

RemoveComponent<Component>()

GetComponent<Component>(): Component

Lua API

AddComponent(component: Component)

RemoveComponent(componentType: String)

GetComponent(componentType: String): Component

What is a component?