# Class: Engine

The heart of the Entity framework. It is responsible for keeping track of entities and systems. The engine should be updated every tick via the update method.

# Table of contents

# Constructors

# Properties

# Methods

# Constructors

# constructor

new Engine(allocator?)

Creates a new Engine.

# Parameters

Name Type Description
allocator Allocator The optional allocator to use for creating entities & components.

# Defined in

src/core/Engine.ts:28 (opens new window)

# Properties

# entities

Readonly entities: EntityManager

# Defined in

src/core/Engine.ts:19 (opens new window)


# systems

Readonly systems: EntitySystemManager

# Defined in

src/core/Engine.ts:17 (opens new window)

# Methods

# getContainer

getContainer(): ContainerInstance

# Returns

ContainerInstance

The IOC Container (currently using typedi).

# Defined in

src/core/Engine.ts:67 (opens new window)


# isUpdating

isUpdating(): boolean

# Returns

boolean

True if this engine is currently updating systems.

# Defined in

src/core/Engine.ts:38 (opens new window)


# update

update(deltaTime): void

Updates all the systems in this Engine.

# Parameters

Name Type Description
deltaTime number The time passed since the last frame.

# Returns

void

# Defined in

src/core/Engine.ts:47 (opens new window)