Entity.contains

Contains a component

You call this function by passing the component's id Every time you create a component, it'll generate an unique id If you don't know which id you should pass, use the other variant of this function, which is the recomended one, as it will get the correct id for you

  1. bool contains(string id)
    class Entity
    @safe pure const
    bool
    contains
    (
    in string id
    )
  2. bool contains()

Return Value

Type: bool

True if the entity contains the component False otherwise

Examples

e.contains(world.component.idOf!Foo);

See Also

contains(C : IComponent)()

Meta