import { _decorator, Component, Node, sp } from 'cc'; const { ccclass, property ,} = _decorator; @ccclass('once') export class once extends Component { private spine!: sp.Skeleton; start() { this.spine.setAnimation(0, "animation", true); } protected onLoad(): void { this.spine = this.node.getChildByName("skill").getComponent(sp.Skeleton)!; this.spine.setCompleteListener(trackEntry => { if(this.node.isValid) this.node.active = false; }); } update(deltaTime: number) { } }