# Conflicts:
#	JisolGameCocos/assets/script/App.ts
This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2024-01-23 02:54:23 +08:00
13 changed files with 81 additions and 15 deletions

View File

@@ -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);