import { _decorator, Component, Director, director, Node } from 'cc';
import { SelectNumberNode } from './DialogNode/SelectNumberNode';
const { ccclass, property } = _decorator;

@ccclass('DialogRoot')
export class DialogRoot extends Component {
    start() {

    }

    update(deltaTime: number) {
        
    }


    //* 初始化并显示顺序选择node
    initSelectNumberNode(){
        const selectNode = new SelectNumberNode();
        selectNode.name = 'SelectNumberNode';
        this.node.addChild(selectNode);
    }

    //* 销毁顺序选择node
    destroySelectNumberNode(){
        /// 一帧结束之后销毁
        director.once(Director.EVENT_END_FRAME,()=>{
            // 销毁
            this.node.getChildByName('SelectNumberNode').destroy();
        });
    }
    



}


