import { TriggerCallbackType } from './types'; /** * The list of internal */ export declare const TOPICS: { System: { beforeRun: string; afterRun: string; beforeDraw: string; afterDraw: string; beforeUpdate: string; afterUpdate: string; beforeUpdateEntities: string; afterUpdateEntities: string; beforeEntitiesCollisions: string; afterEntitiesCollisions: string; }; Entity: { /** * Parameters: {Entity} */ beforeDraw: string; /** * Parameters: {Entity} */ afterDraw: string; }; Tileset: { created: string; }; }; /** * A simple *synchronized* triggering class. * Use it to plug your own methods directly inside the engine, * or for your own code communication needs. */ export declare class Signal { /** * Sends a `data` object to all `topic` listeners. * The callback provided by the subscriber is then called with `topic` and `data` as parameters * * @param {string} topic The Messenger topic constant * @param {...any[]} [data] Any data object */ static send(topic: string, ...data: any): void; /** * Listens for a `topic`, that will call `cb()` upon triggering. * This method creates a persistent subscription, and should NOT be call within a loop (like `update()`) * * @param {string} topic The topic you listen to * @param {TriggerCallbackType} cb The callback executed once the topic is triggered * @returns {number} An unique reference id to this subscription */ static listen(topic: string, cb: TriggerCallbackType): number; /** * Cancels a listening subscription * * @param {number} id The unique reference id given upon subscription */ static remove(id: number): void; private static id; private static subscribers; }