mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -7,6 +7,7 @@ import { app, TD } from '../../App';
|
||||
import { GUI } from '../UIConfig';
|
||||
import { PlayerResourceShow } from '../Consts/Resource/PlayerResourceShow';
|
||||
import ResourceData from '../../data/ResourceData';
|
||||
import DungeonData from '../../data/DungeonData';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('DungeonShowItem')
|
||||
@@ -20,28 +21,28 @@ export class DungeonShowItem extends JNScrollViewItem<TB.TbGSysDungeon> {
|
||||
@property(PlayerResourceShow)
|
||||
resource:PlayerResourceShow;
|
||||
|
||||
onInit(){
|
||||
async onInit(){
|
||||
|
||||
this.resource.type = this.data.consume.id;
|
||||
this.resource.onUpdateView();
|
||||
this.onUpdateView();
|
||||
await this.onUpdateView();
|
||||
|
||||
}
|
||||
|
||||
onUpdateView(){
|
||||
async onUpdateView(){
|
||||
|
||||
this.title.string = this.data.name;
|
||||
this.title.string = `${this.data.name} (${await DungeonData.getIns().getInfoProcess(this.data.id)} / ${DungeonData.getIns().getMaxProcess(this.data.id)})`;
|
||||
|
||||
}
|
||||
|
||||
//点击副本
|
||||
onClickDungeon(){
|
||||
async onClickDungeon(){
|
||||
|
||||
if(ResourceData.getIns().getValue(this.data.consume.id) >= this.data.consume.value){
|
||||
//打开副本
|
||||
GBattleModeManager.getIns().Open(BattleMode[`${this.data.type}`],true,{
|
||||
dungeonId:this.data.id,
|
||||
dungeonItemId:TD[`${this.data.tigs}`].getDataList()[0].id,
|
||||
dungeonItemId:await DungeonData.getIns().getInfoProcess(this.data.id),
|
||||
data:TD[`${this.data.tigs}`].getDataList()[0].data
|
||||
});
|
||||
app.layer.Close(GUI.DungeonView);
|
||||
|
Reference in New Issue
Block a user