JisolGame/JisolGameCocos/assets/script/ui/Consts/Reward/RewardIconScrollScaleAnim.ts
PC-20230316NUNE\Administrator c6710e7dfa 提交
2024-01-20 19:01:45 +08:00

31 lines
788 B
TypeScript

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);
}
}