GetTenfold.ts 623 B

123456789101112131415161718192021222324252627
  1. import { _decorator, Component, Node, Label, EventHandler } from 'cc';
  2. import { Window } from '../core/ui/window/Window';
  3. const { ccclass, property } = _decorator;
  4. @ccclass('GetTenfold')
  5. export class GetTenfold extends Component {
  6. public closeBackFun: EventHandler;
  7. start() {
  8. }
  9. /**
  10. * @param data 0:奖励倍数
  11. * 1:关闭窗口回调方法
  12. */
  13. public setData(data: any[]) {
  14. if (data[1]) {
  15. this.closeBackFun = data[1];
  16. }
  17. }
  18. public close(closeWindow: () => void) {
  19. this.closeBackFun && this.closeBackFun.emit([]);
  20. closeWindow();
  21. }
  22. }