mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 19:34:47 +00:00
39 lines
912 B
TypeScript
39 lines
912 B
TypeScript
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;
|
|
}
|
|
|
|
onJNLoadAnimEnd(): void {
|
|
this.onUpdateView();
|
|
}
|
|
|
|
onUpdateView(){
|
|
|
|
//逐个出现
|
|
this.data.forEach((item,index) => {
|
|
this.scheduleOnce(() => {
|
|
this.views.addData(item);
|
|
},.1 * index);
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|