# Class: Component

Base class for all components. A Component is intended as a data holder and provides data to be processed in an EntitySystem.

# Table of contents

# Constructors

# Methods

# Constructors

# constructor

new Component()

# Methods

# getComponentBit

getComponentBit(): any

# Returns

any

The bit of this component.

# Defined in

src/core/Component.ts:44 (opens new window)


# getComponentClass

getComponentClass(): any

# Returns

any

The class of this component.

# Defined in

src/core/Component.ts:37 (opens new window)


# is

is(clazz): boolean

Check if this component matches the specified class.

# Parameters

Name Type Description
clazz ComponentConstructor<Component> The class to compare with.

# Returns

boolean

True if it matches.

# Defined in

src/core/Component.ts:68 (opens new window)


# getComponentBit

Static getComponentBit(): number

throws When called on Component itself rather than on a subclass.

# Returns

number

The bit of this component class.

# Defined in

src/core/Component.ts:52 (opens new window)