mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交代码
This commit is contained in:
@@ -2,6 +2,9 @@ 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';
|
||||
import GBattleModeManager, { BattleMode } from '../../battle/GBattleModeManager';
|
||||
import { app, TD } from '../../App';
|
||||
import { GUI } from '../UIConfig';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('DungeonShowItem')
|
||||
@@ -23,6 +26,14 @@ export class DungeonShowItem extends JNScrollViewItem<TB.TbGSysDungeon> {
|
||||
|
||||
}
|
||||
|
||||
//点击副本
|
||||
onClickDungeon(){
|
||||
|
||||
GBattleModeManager.getIns().Open(BattleMode[`${this.data.type}`],true,TD[`${this.data.tigs}`].getDataList()[0].data);
|
||||
app.layer.Close(GUI.DungeonView);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import JNLayerBase from '../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase';
|
||||
import { Prefab } from 'cc';
|
||||
import PlayerPetData from '../../data/PlayerPetData';
|
||||
import PlayerPetData, { PlayerPetEvent } from '../../data/PlayerPetData';
|
||||
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
||||
import { NodeEventType } from 'cc';
|
||||
import { sp } from 'cc';
|
||||
@@ -50,9 +50,23 @@ export class IntoBattleView extends JNLayerBase {
|
||||
|
||||
console.log("你选择的是",this.tIndex);
|
||||
|
||||
app.event.on(PlayerPetEvent.UPDATE_MINUS,this.onPetMinus,this); //减少宠物
|
||||
|
||||
this.onUpdateView();
|
||||
|
||||
}
|
||||
|
||||
onJNClose(): void {
|
||||
//取消监听
|
||||
app.event.off(PlayerPetEvent.UPDATE_INFO,this.onPetMinus,this); //减少宠物
|
||||
}
|
||||
|
||||
onPetMinus(pet:PlayerPetOV){
|
||||
this.views.getItems<PetIconSelectScroll>().forEach(item => {
|
||||
if(item.data.petId == pet.petId)
|
||||
this.views.delData(item.data);
|
||||
});
|
||||
}
|
||||
|
||||
//刷新页面
|
||||
onUpdateView(){
|
||||
|
Reference in New Issue
Block a user