| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /*
- * @Author: mojunshou 1637302775@qq.com
- * @Date: 2025-04-18 19:35:48
- * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-04-19 10:20:50
- * @Description: 解锁功能
- */
- import { _decorator, Component, Node } from 'cc';
- import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
- import { UIID } from '../../common/config/GameUIConfig';
- import { oops } from 'db://oops-framework/core/Oops';
- import { GameEvent } from '../../common/config/GameEvent';
- import { ServerHandler } from '../../common/manager/ServerHandler';
- import { smc } from '../../common/SingletonModuleComp';
- const { ccclass, property } = _decorator;
- @ccclass('UnlockFunction')
- export class UnlockFunction extends GameComponent {
- start() {
- this.setButton();
- this.updateState();
- }
- btn_confirm() {
- oops.gui.remove(UIID.UnlockFunction);
- //发送开始自动玩游戏
- oops.message.dispatchEvent(GameEvent.StartAutoGame);
- }
- //更新状态
- updateState() {
- ServerHandler.inst.updatePopupState({
- level: smc.account.AccountModel.curLevel,
- type: smc.game.GameModel.popupType
- })
- }
- }
|