You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.5 KiB
56 lines
1.5 KiB
|
|
//*********************
|
|
// create by 流云
|
|
// time: Thu Dec 04 2025
|
|
// desc:
|
|
//*********************
|
|
import { _decorator, Component, Node , find} from 'cc';
|
|
import { Auto_jumpGameLevel } from './Auto_jumpGameLevel';
|
|
import List from 'db://assets/mx/components/list/List';
|
|
import { ChapterDataManager } from '../../manager/ChapterDataManager';
|
|
import { ui_tiaozhuanItem } from './ui_tiaozhuanItem';
|
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('UIjumpGameLevel')
|
|
export class UIjumpGameLevel extends Auto_jumpGameLevel {
|
|
@property(List)
|
|
listV: List = null;
|
|
curentRankData = [];
|
|
maxChapterId = 0;
|
|
|
|
onLoad(): void {
|
|
super.onLoad();
|
|
let max = ChapterDataManager.getAllChapterAccount()
|
|
this.maxChapterId = gg.data.doc.chapter > max ? max : gg.data.doc.chapter
|
|
}
|
|
|
|
onEnable(): void {
|
|
super.onEnable();
|
|
}
|
|
|
|
onDisable(): void {
|
|
super.onDisable();
|
|
}
|
|
|
|
onInit(): void {
|
|
this.showOpenCenterEff()
|
|
this.showOpenMaskEff(2);
|
|
let max = ChapterDataManager.getAllChapterAccount()
|
|
this.listV.numItems = this.maxChapterId
|
|
}
|
|
|
|
onListRender(item: Node, index: number) {
|
|
|
|
//负数转正
|
|
index = Math.abs(index);
|
|
//console.log('onListRender==item,index=',index)
|
|
let tiaozhuanItem = item.getComponent(ui_tiaozhuanItem);
|
|
tiaozhuanItem.setData((this.maxChapterId-1)-index);
|
|
}
|
|
click_bgMask() {
|
|
this.close(2);
|
|
}
|
|
|
|
}
|
|
|