Documentation ¶
Overview ¶
Package entity represents functionality that is core to the base entity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity interface { // ID retrieves the id of this entity. ID() string // AddComponent adds a component to the entity. Returns an error if the component type has already been added. AddComponent(components.Component) error // RemoveComponent removes a component from the entity. If the component type is not already attached an error will be returned. RemoveComponent(string) error // ReplaceComponent replaces an existing component with a new one of the same type. ReplaceComponent(c components.Component) error // Component retrieves a component based on its component type. Component(string) components.Component // Retrieves a list of component types that have been attached to this entity. ComponentTypes() []string }
Entity represents the basic behaviors all engine entities possess.
Click to show internal directories.
Click to hide internal directories.