消消方块阵换皮表情
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

66 lines
1.8 KiB

//*********************
// create by 流云
// time: Thu Dec 11 2025
// desc:
//*********************
import { _decorator, Component, Node , find, Sprite} from 'cc';
import { Auto_WeaponSuiPian } from './Auto_WeaponSuiPian';
import { GEvent } from 'db://assets/mx/module/event/GEvent';
import { BattleType, ChapterDifficulty } from '../../manager/ChapterDataManager';
import { UIID } from '../../game/ConfigRes';
const { ccclass, property } = _decorator;
@ccclass('UIWeaponSuiPian')
export class UIWeaponSuiPian extends Auto_WeaponSuiPian {
onLoad(): void {
super.onLoad();
}
onEnable(): void {
super.onEnable();
}
//解锁困难模式
onDisable(): void {
super.onDisable();
}
onInit(): void {
this.showOpenCenterEff();
this.showOpenMaskEff(2);
if(gg.data.doc.chapter<=9){
this.qianwang2.getComponent(Sprite).grayscale = true
}
}
click_bgMask() {
this.close();
}
click_qianwang1() {
//shop
gg.game.gotoPageById(UIID.Shop);
this.close(2);
}
click_qianwang2() {
if(gg.data.doc.chapter<=9){
gg.ui.showToast(gg.lang.get('通关第{1}章解锁困难模式', [9]),false)
return
}
gg.game.gotoPageById(UIID.Home);
GEvent.Ins.emit(GEvent.SelectDifficult, ChapterDifficulty.Hard)
//当前挑战困难的关卡
let chapter = gg.data.project.getCurentLevelChapterId(ChapterDifficulty.Hard);
GEvent.Ins.emit(GEvent.SelectChapter,chapter, ChapterDifficulty.Hard)
//GEvent.Ins.emit(GEvent.TiaoZhuanShop2,2,gg.data.doc.chapter-1, ChapterDifficulty.Normal );
//GEvent.Ins.emit(GEvent.SelectChapter, gg.data.doc.chapter-1, BattleMode.Easy)
this.close(2);
}
}