sim-ecs - v0.6.5
    Preparing search index...

    Interface IRuntimeWorld

    interface IRuntimeWorld {
        awaiter?: Promise<void>;
        config: Readonly<IRuntimeWorldInitConfig>;
        currentState: undefined | Readonly<IState>;
        data: Readonly<IRuntimeWorldData>;
        eventBus: Readonly<IEventBus>;
        isRunning: boolean;
        name: string;
        systemActions: Readonly<ISystemActions>;
        transitionActions: Readonly<ITransitionActions>;
        getEntities(query?: Readonly<IEntitiesQuery>): IterableIterator<IEntity>;
        getGroupEntities(groupHandle: number): IterableIterator<IEntity>;
        getResource<T extends object>(type: TTypeProto<T>): T;
        getResources(
            types?: readonly TExistenceQueryParameter<any>[],
        ): IterableIterator<object>;
        hasEntity(entity: Readonly<IEntity>): boolean;
        hasResource<T extends object>(type: T | TTypeProto<T>): boolean;
        hmrReplaceSystem(newSystem: ISystem): void;
        refreshEntityQueryRegistration(entity: Readonly<IEntity>): void;
        replaceResource<T extends object>(
            obj: T | TTypeProto<T>,
            ...args: readonly unknown[],
        ): Promise<void>;
        save(options?: Readonly<ISerDeOptions<TSerializer>>): ISerialFormat;
        start(): Promise<void>;
        step(): Promise<void>;
        stop(): void;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    awaiter?: Promise<void>

    This promise resolves when the execution terminates

    config: Readonly<IRuntimeWorldInitConfig>

    Initial config

    currentState: undefined | Readonly<IState>

    Advertises the current state

    data: Readonly<IRuntimeWorldData>

    Data to operate on. This data may mutate at any time

    eventBus: Readonly<IEventBus>

    Architecture to send messages between systems

    isRunning: boolean

    Boolean indicator if the world is currently executing

    name: string

    World's name

    systemActions: Readonly<ISystemActions>

    Object containing all actions available inside a system

    transitionActions: Readonly<ITransitionActions>

    Object containing all actions available on step-to-step transitions, as well as to states

    Methods

    • Replace a resource from this world with a new value

      Type Parameters

      • T extends object

      Parameters

      • obj: T | TTypeProto<T>
      • ...args: readonly unknown[]

      Returns Promise<void>