import { _decorator, Component, Node, Label, tween, Vec3 } from 'cc'; const { ccclass, property } = _decorator; @ccclass('fnt_count') export class fnt_count extends Component { _num:number = 0; start() { } show(num:number){ if(num<0||this._num===num){ }else{ this.node.getComponent(Label).string = num.toString() this._num = num; this.node.scale = new Vec3(1.5, 1.5, 1) tween() .target(this.node) .to(0.5,{ scale: new Vec3(1, 1, 1) }) .start(); } } update(deltaTime: number) { } }