UNPKG

@senspark/ee

Version:

utility library for cocos creator

53 lines (52 loc) 1.59 kB
/// <reference types="cocos-api" /> import { Dialog } from "./Dialog"; import { DialogManager } from './DialogManager'; export declare class DefaultDialogManager implements DialogManager { private root; private lockingDialog; private dialogStack; private commandQueue; constructor(root: cc.Node); pushDialog(dialog: Dialog): void; popDialog(dialog: Dialog): void; /** Checks whether there is a locking dialog. */ private isLocked; /** Locks all dialog behaviors with the specified dialog. */ private lock; /** Unlocks all dialog behaviors. */ private unlock; /** Gets the current (top) dialog. */ private getCurrentDialog; /** Gets the current (top) root node. */ private getCurrentRoot; /** Attempts to process the current command queue. */ private processCommandQueue; private processCommand; private processPushCommand; private processPopCommand; private pushCommand; /** * Immediately pushes the specified dialog: * - Lock dialog. * - Will-hide events. * - Add dialog's container. * - Push dialog. * - Did-hide events. * - Set active = true. * - Unlock dialog. * - Process next commands. */ private pushDialogImmediately; /** * Immediately pops the specified dialog: * - Lock dialog. * - Set active = false. * - Will-hide events. * - Pop dialog. * - Remove dialog's container. * - Did-hide events. * - Unlock dialog. * - Process next commands. */ private popDialogImmediately; }