mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -16,11 +16,21 @@ export class RewardClaimView extends JNGLayerBase {
|
||||
onJNLoad(data?: TbGEntity.TReward[]): void {
|
||||
super.onJNLoad(data);
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
onJNLoadAnimEnd(): void {
|
||||
this.onUpdateView();
|
||||
}
|
||||
|
||||
onUpdateView(){
|
||||
this.views.refreshData(this.data);
|
||||
|
||||
//逐个出现
|
||||
this.data.forEach((item,index) => {
|
||||
this.scheduleOnce(() => {
|
||||
this.views.addData(item);
|
||||
},.1 * index);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,30 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { RewardIcon } from './RewardIcon';
|
||||
import { TbGEntity } from '../../../config/data/schema';
|
||||
import JNScrollViewItem from '../../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollViewItem';
|
||||
import { tween } from 'cc';
|
||||
import { v3 } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('RewardIconScrollScaleAnim')
|
||||
export class RewardIconScrollScaleAnim extends JNScrollViewItem<TbGEntity.TReward> {
|
||||
|
||||
@property(RewardIcon)
|
||||
icon:RewardIcon;
|
||||
|
||||
onLoad(){
|
||||
//播放缩放动画
|
||||
this.node.scale = v3(0,0,0);
|
||||
tween(this.node)
|
||||
.to(.2,{scale:v3(1,1,1)})
|
||||
.start();
|
||||
}
|
||||
|
||||
onInit(data:TbGEntity.TReward){
|
||||
|
||||
this.icon.set(data);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "fccbd792-47da-4c8d-a8f9-6ecb5daaea4e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user