import { Signal } from '../core/signal.js'; import { DisplayObject } from './display_object.js'; import type { Game } from '../core/game.js'; export declare const SORT_ASCENDING = -1; export declare const SORT_DESCENDING = 1; export declare class Group extends DisplayObject { z: number; ignoreDestroy: boolean; pendingDestroy: boolean; classType: new (game: Game, ...args: never[]) => DisplayObject; cursor: DisplayObject | null; inputEnableChildren: boolean; onChildInputDown: Signal; onChildInputUp: Signal; onChildInputOver: Signal; onChildInputOut: Signal; onDestroy: Signal; cursorIndex: number; _sortProperty: string; filters: object[] | null; /** * Creates a new Group object. * @param {Game} game - The game instance this group belongs to. * @param {DisplayObject} parent - The parent display object. * @param {string} name - The name of this group. * @param {boolean} addToStage - Whether to add this group to the stage. */ constructor(game: Game, parent?: DisplayObject | null, name?: string | null, addToStage?: boolean); /** * Destroys this group and cleans up resources. * @param {boolean} destroyChildren - Whether to destroy children as well. * @param {boolean} soft - Whether to perform a soft destroy (leaving the group in the parent's children list). */ destroy(destroyChildren?: boolean, soft?: boolean): void; /** * Adds a child to this group. * @template T * @param {T} child - The child to add. * @param {boolean} silent - Whether to dispatch events. * @param {number} index - The index to add the child at. * @returns {T} The added child. */ add(child: T, silent?: boolean, index?: number): T; /** * Adds a child to this group at a specific index. * @param {DisplayObject} child - The child to add. * @param {number} index - The index to add the child at. * @param {boolean} silent - Whether to dispatch events. */ addAt(child: DisplayObject, index: number, silent: boolean): void; /** * Gets a child at the specified index. * @param {number} index - The index of the child to get. * @returns {DisplayObject} The child at the specified index, or -1 if not found. */ getAt(index: number): -1 | DisplayObject | undefined; /** * Updates the Z indices of all children in this group. */ updateZ(): void; /** * Gets the next child in this group (with circular wrapping). * @returns {DisplayObject} The next child, or null if no children exist. */ next(): DisplayObject | null; /** * Gets the previous child in this group (with circular wrapping). * @returns {DisplayObject} The previous child, or null if no children exist. */ previous(): DisplayObject | null; /** * Swaps the positions of two children in this group. * @param {DisplayObject} child1 - The first child to swap. * @param {DisplayObject} child2 - The second child to swap. */ swap(child1: DisplayObject, child2: DisplayObject): void; /** * Brings a child to the top of this group. * @param {DisplayObject} child - The child to bring to the top. * @returns {DisplayObject} The child that was brought to the top. */ bringToTop(child: DisplayObject): DisplayObject; /** * Sends a child to the back of this group. * @param {DisplayObject} child - The child to send to the back. * @returns {DisplayObject} The child that was sent to the back. */ sendToBack(child: DisplayObject): DisplayObject; /** * Reverses the order of children in this group. */ reverse(): void; /** * Gets the index of a child in this group. * @param {DisplayObject} child - The child to get the index of. * @returns {number} The index of the child, or -1 if not found. */ getIndex(child: DisplayObject): number; /** * Updates the Z indices of all children in this group before the update cycle. */ preUpdate(): void; /** * Updates all children in this group during the update cycle. */ update(): void; /** * Updates all children in this group after the update cycle. */ postUpdate(): void; /** * Removes a child from this group. * @param {DisplayObject} child - The child to remove. * @param {boolean} destroy - Whether to destroy the child after removing it. * @param {boolean} silent - Whether to dispatch events. * @returns {boolean} True if the child was removed, false otherwise. */ remove(child: DisplayObject, destroy?: boolean, silent?: boolean): boolean; /** * Removes all children from this group. * @param {boolean} destroy - Whether to destroy children as well. * @param {boolean} silent - Whether to dispatch events. * @param {boolean} destroyTexture - Whether to destroy textures as well. */ removeAll(destroy?: boolean, silent?: boolean, destroyTexture?: boolean): void; } //# sourceMappingURL=group.d.ts.map