LoginWaitWin.ts 517 B

12345678910111213141516171819202122232425
  1. import { _decorator, Component, Node } from 'cc';
  2. import { Window } from '../core/ui/window/Window';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('LoginWaitWin')
  5. export class LoginWaitWin extends Component {
  6. start() {
  7. // [3]
  8. }
  9. private isClose = false;
  10. //关闭加载等待窗口
  11. public close() {
  12. this.isClose = true;
  13. }
  14. update() {
  15. if (this.isClose) {
  16. let _window = this.getComponent(Window);
  17. _window.forceClose();
  18. }
  19. }
  20. }