24 lines
451 B
TypeScript
24 lines
451 B
TypeScript
import { _decorator, Component, Node, sp } from 'cc';
|
|
const { ccclass, property ,} = _decorator;
|
|
|
|
@ccclass('once')
|
|
export class once extends Component {
|
|
private spine!: sp.Skeleton;
|
|
|
|
start() {
|
|
|
|
}
|
|
protected onLoad(): void {
|
|
this.spine = this.getComponent(sp.Skeleton)!;
|
|
this.spine.setCompleteListener(trackEntry => {
|
|
this.node.destroy()
|
|
});
|
|
|
|
}
|
|
update(deltaTime: number) {
|
|
|
|
}
|
|
}
|
|
|
|
|