Class ObjectManager<ObjectType, EventsType>Abstract

Type Parameters

  • ObjectType extends StringableObject & {
        addReferenceId(): void;
    }

  • EventsType

Hierarchy

Implements

Constructors

  • Type Parameters

    • ObjectType extends object & {
          toString(): string;
      } & {
          addReferenceId(): void;
      }

    • EventsType

    Parameters

    • island: default
    • objects: SaferArray<ObjectType> = []

    Returns ObjectManager<ObjectType, EventsType>

Properties

event: IEventEmitter<ObjectManager<ObjectType, EventsType>, EventsType> = ...
island: default
objects: SaferArray<ObjectType>

Accessors

  • get game(): Game
  • Returns Game

  • get length(): number
  • Returns number

Methods

  • Returns IterableIterator<undefined | ObjectType>

  • Called when this object manager is not used anymore (after it was saved!)

    Returns void

  • Returns number

  • Parameters

    • id: number

    Returns undefined | ObjectType

  • Returns SaferArray<ObjectType>

  • Parameters

    • object: SaferArray<ObjectType>

    Returns void

  • Returns void

  • Parameters

    • id: number
    • value: undefined | ObjectType

    Returns void

Generated using TypeDoc