123456789101112131415161718192021222324252627282930313233343536 |
- export default class UIbase extends cc.Component
- {
-
- public showUI(data?:any)
- {
- if(this.node.parent!=null)
- {
- this.node.parent=null;
- }
- let s = cc.director.getScene();
- s.addChild(this.node);
- this.onShow()
- }
- public hideUI()
- {
- this.onHide()
- this.node.removeFromParent(false);
- }
- protected onShow(){
- }
- protected onHide(){
- }
-
- }
|