import { Cell, ICellConfig } from '@armathai/grid-core'; import { IContent, IPhaser2Child, IPhaser2Grid } from './Types'; export declare abstract class Phaser2Grid extends Phaser.Group implements IPhaser2Grid { abstract getGridConfig(): ICellConfig; protected grid: Cell; private _debug; constructor(game: Phaser.Game); protected getCellByName(name: string): Cell | undefined; protected getCellByContent(content: IContent): Cell | undefined; /** * @description Rebuilds Grid. Destroys existing grid and creates new one based on given or existing configuration * @param config Input configuration object. Can be empty, to build with existing configuration * @returns {void} */ rebuild(config?: ICellConfig): void; /** * @description Creates Grid object based on input configuration object * @param config Input configuration object. * @returns {void} */ protected build(config: ICellConfig): void; /** * @description Adds the given Game Object, to this Container. * @param cellName Cell name which will hold given child as content * @param child The Game Object, to add to the Container. * @param config Configuration object, which will be merged with cell configuration * @returns {this} */ protected setChild(cellName: string, child: IPhaser2Child): this; protected rebuildChild(child: IPhaser2Child, cellName?: string): this; _patchChildDestroy(child: IPhaser2Child, cellName: string): void; private _internalBuild; private _rebuildContent; protected _addContent(child: IPhaser2Child, cell: Cell): void; protected _removeContent(child: IPhaser2Child): void; private _adjustContent; private _adjustGridChild; private _adjustChild; private _scaleContent; private _positionContent; private _resetContent; }