import { IModule } from '../IModule'; import { GameObject } from "../../world/GameObject"; import { WorldQuery, IQueryResult, GameObjectQuery } from './WorldQuery'; export type QueryFn = (query: TQuery) => IQueryResult; /** * The game world, containing all the current {@link GameObject}s * and everything loaded in the game. */ export declare class WorldModule implements IModule { /** All {@link GameObject}s currently in the world. */ readonly gameObjects: GameObject[]; constructor(); /** * Called once per frame. * @param deltaTime Time (in seconds) since the last frame. */ onUpdate(deltaTime: number): void; /** * Destroy the world and everything in it. */ addObject(gameObject: GameObject): void; /** * Destroys a {@link GameObject}, removing it from the world. * @param gameObject The {@link GameObject} to remove. */ destroyObject(gameObject: GameObject): void; query(queryFn: QueryFn): TResult; query(relativeTo: GameObject, queryFn: QueryFn): TResult; } /** * The game world, containing all the current {@link GameObject}s * and everything loaded in the game. */ export declare const World: WorldModule;