GUIMediator.ts 485 B

1234567891011121314151617181920212223242526272829
  1. import { _decorator, Component, Node } from 'cc';
  2. import { GUIManager } from './GUIManager';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('GUIMediator')
  5. export class GUIMediator extends Component {
  6. uiKey:number;
  7. data:any;
  8. OnShow(data?:any):void{
  9. this.data=data;
  10. }
  11. OnHide():void{
  12. }
  13. /**
  14. * 关闭自己
  15. */
  16. HideSelf():void{
  17. GUIManager.single.Hide(this.uiKey);
  18. }
  19. get LayerIndex(){
  20. return 3;
  21. }
  22. }