import { _decorator, Component, Node } from 'cc'; import { uiManager } from '../manager/uiManager'; const { ccclass, property } = _decorator; @ccclass('base_ui') export class base_ui extends Component { @property(Node) btn_close:Node = null protected start(): void { this.onButtonListen(this.btn_close, ()=>{ this.close() }) this.init() } protected onButtonListen(btn:Node,call_back){ uiManager.Instance().onButtonListen(btn,call_back) } protected close(){ this.node.removeFromParent() } protected init() {} }