40 lines
956 B
TypeScript
Raw Normal View History

2024-01-17 00:05:44 +08:00
import { _decorator, Component, Node } from 'cc';
import JNScrollViewItem from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollViewItem';
import { TB } from '../../config/data/schema';
import { Label } from 'cc';
2024-01-17 18:36:59 +08:00
import GBattleModeManager, { BattleMode } from '../../battle/GBattleModeManager';
import { app, TD } from '../../App';
import { GUI } from '../UIConfig';
2024-01-17 00:05:44 +08:00
const { ccclass, property } = _decorator;
@ccclass('DungeonShowItem')
export class DungeonShowItem extends JNScrollViewItem<TB.TbGSysDungeon> {
//副本名称
@property(Label)
title:Label;
onInit(){
this.onUpdateView();
}
onUpdateView(){
this.title.string = this.data.name;
}
2024-01-17 18:36:59 +08:00
//点击副本
onClickDungeon(){
GBattleModeManager.getIns().Open(BattleMode[`${this.data.type}`],true,TD[`${this.data.tigs}`].getDataList()[0].data);
app.layer.Close(GUI.DungeonView);
}
2024-01-17 00:05:44 +08:00
}