hasEntityComponent

Script::hasEntityComponent

Checks if an Entity has a certain Component.

Declaration

template <typename T>
bool hasEntityComponent(Entity entity);

Parameters

Name

Type

Description

entity

Entity

The Entity to check the possession of the Component on.

Returns

true if the Entity has a Component of the same type as the one passed in template, else, returns false.

Notes

The type of the Component to check must be passed as a template.