

const { ccclass, property } = cc._decorator;

@ccclass
export default class TheController extends cc.Component {

    private _spine: sp.Skeleton = null;

    protected onLoad(): void {
        this._spine = this.node.getComponent(sp.Skeleton);
        this._spine.setCompleteListener((trackEntry) => {
            if (trackEntry.animation.name == 'Open') {
                this._spine.setAnimation(0, 'Idle', true);
                console.log('Idle', )
            }
        })
    }
    protected onEnable(): void {
        this._spine.setAnimation(0, 'Open', false);
    }
}
