Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • CT

Hierarchy

  • default

Index

Constructors

constructor

Properties

Private _error

_error: null | Error

Private _id

_id: string

Private _state

Private _world

_world: default<CT>

Accessors

components

  • Get all components that have been added to an entity, via a ComponentCollection. Does the same thing as entityInstance.getAll().

    Returns default<CT>

id

  • get id(): string

state

tags

  • get tags(): Set<Tag>
  • Retrieves all the tags that have been added to this entity.

    Returns Set<Tag>

world

Methods

add

  • add<T>(component: T): default<CT>
  • Add a component to an Entity, doh.

    Type parameters

    • T

    Parameters

    • component: T

    Returns default<CT>

addTag

clear

clearTags

destroy

  • destroy(): void
  • Destroy an entity. Actual destruction is deferred until after the next pass of systems. This gives the systems a chance to do any cleanup that might be needed.

    Returns void

destroyImmediately

  • destroyImmediately(): void

finishCreation

  • finishCreation(): void
  • Sets the state of the entity to 'created'. that's it.

    Returns void

get

getAll

  • Get all components that have been added to an entity, via a ComponentCollection

    Returns default<CT>

has

  • Determines if an entity has a component related to it.

    Type parameters

    • T

    Parameters

    Returns boolean

hasTag

  • hasTag(tag: Tag): boolean
  • Check to see if an entity tagged with a given tag.

    Parameters

    Returns boolean

onComponentAdd

onComponentRemove

onCreate

  • onCreate(world: default<CT>): void

onDestroy

  • onDestroy(world: default<CT>): void

onTrackedComponentUpdate

remove

removeTag

toDevEntity

  • Convert Entity to a DevEntity. Very helpful in for debugging.

    Returns default<CT>

Generated using TypeDoc