Entity.component

Get a component pointer of the entity.

  1. C* component()
    struct Entity
    @property
    C*
    component
    (
    C
    )
    ()
  2. void component(C c)

Parameters

C

Component for the entity.

Return Value

Type: C*

A pointer on the component for this entity.

Throws

EntityException if the entity is invalid. ComponentException if the component is not registered.

Meta