2024-01-19 19:03:44 +08:00
|
|
|
import { _decorator, Component, Node } from 'cc';
|
|
|
|
import { JNGLayerBase } from '../../../components/JNComponent';
|
|
|
|
import { TbGEntity } from '../../../config/data/schema';
|
|
|
|
import JNScrollView from '../../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
|
|
@ccclass('RewardClaimView')
|
|
|
|
export class RewardClaimView extends JNGLayerBase {
|
|
|
|
|
|
|
|
//奖励页面
|
|
|
|
@property(JNScrollView)
|
|
|
|
views:JNScrollView;
|
|
|
|
|
|
|
|
data:TbGEntity.TReward[] = [];
|
|
|
|
|
|
|
|
onJNLoad(data?: TbGEntity.TReward[]): void {
|
|
|
|
super.onJNLoad(data);
|
|
|
|
this.data = data;
|
2024-01-20 19:01:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
onJNLoadAnimEnd(): void {
|
2024-01-19 19:03:44 +08:00
|
|
|
this.onUpdateView();
|
|
|
|
}
|
|
|
|
|
|
|
|
onUpdateView(){
|
2024-01-20 19:01:45 +08:00
|
|
|
|
|
|
|
//逐个出现
|
|
|
|
this.data.forEach((item,index) => {
|
|
|
|
this.scheduleOnce(() => {
|
|
|
|
this.views.addData(item);
|
|
|
|
},.1 * index);
|
|
|
|
})
|
|
|
|
|
2024-01-19 19:03:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|