const {ccclass, property} = cc.decorator @ccclass export default class NewClass extends cc.Compont{ @property(cc.Animation) animation:cc.Animation = null onLoad(){ let animation = this.animation animation.on("play",this.onPlay,this) //stop lastframe finished pause resume //off 在onDestroy 关闭监听 } }