UnlockFunction.ts 836 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * @Author: mojunshou 1637302775@qq.com
  3. * @Date: 2025-04-18 19:35:48
  4. * @LastEditors: mojunshou 1637302775@qq.com
  5. * @LastEditTime: 2025-04-19 10:20:50
  6. * @Description: 解锁功能
  7. */
  8. import { _decorator, Component, Node } from 'cc';
  9. import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
  10. import { UIID } from '../../common/config/GameUIConfig';
  11. import { oops } from 'db://oops-framework/core/Oops';
  12. import { GameEvent } from '../../common/config/GameEvent';
  13. const { ccclass, property } = _decorator;
  14. @ccclass('UnlockFunction')
  15. export class UnlockFunction extends GameComponent {
  16. start() {
  17. this.setButton();
  18. }
  19. btn_confirm() {
  20. oops.gui.remove(UIID.UnlockFunction);
  21. //发送开始自动玩游戏
  22. oops.message.dispatchEvent(GameEvent.StartAutoGame);
  23. }
  24. }