mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-11-08 07:16:08 +00:00
提交开宝箱
This commit is contained in:
@@ -2,6 +2,10 @@ import { _decorator, Component, Node } from 'cc';
|
||||
import JNLayerBase from '../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase';
|
||||
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
||||
import PetEquipData from '../../data/PetEquipData';
|
||||
import { NodeEventType } from 'cc';
|
||||
import { app } from '../../App';
|
||||
import { GUI } from '../UIConfig';
|
||||
import { PetEquip } from '../../consts/API';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('PetEquipView')
|
||||
@@ -13,6 +17,9 @@ export class PetEquipView extends JNLayerBase {
|
||||
|
||||
onJNLoad(data?: any): void {
|
||||
super.onJNLoad(data);
|
||||
|
||||
//添加子节点事件
|
||||
this.list.addItemEvent(NodeEventType.TOUCH_END,this.onClickItem.bind(this));
|
||||
}
|
||||
|
||||
onJNLoadAnimEnd(): void {
|
||||
@@ -21,6 +28,12 @@ export class PetEquipView extends JNLayerBase {
|
||||
this.onUpdateView();
|
||||
}
|
||||
|
||||
onClickItem(index:number){
|
||||
|
||||
app.layer.Open(GUI.PetEquipForgingPopupView,this.list.getData<PetEquip>()[index])
|
||||
|
||||
}
|
||||
|
||||
onUpdateView(){
|
||||
|
||||
this.list.refreshData(PetEquipData.getIns().equips);
|
||||
|
||||
Reference in New Issue
Block a user