// use this for initialization
onLoad: function() {
let animUp = this.upNode.getComponent(cc.Animation);
animUp.wrapMode = cc.WrapMode.Reverse;
animUp.playAdditive(‘moveUp_anim’);
let animDpwn = this.downNode.getComponent(cc.Animation);
animUp.wrapMode = cc.WrapMode.Reverse;
animDpwn.playAdditive('moveDown_anim');
},
onCloseBtnClick: function() {
AudioNode.playButton(0);
// this.node.destroy();
let animUp = this.upNode.getComponent(cc.Animation);
animUp.wrapMode = cc.WrapMode.Normal;
animUp.playAdditive('moveUp_anim');
let animDpwn = this.downNode.getComponent(cc.Animation);
animDpwn.wrapMode = cc.WrapMode.Normal;
animDpwn.playAdditive('moveDown_anim');
var self = this;
animDpwn.on('stop', function() {
self.node.destroy();
}, this);
}
起步将动画设为反向模式,点击设为正常模式,不管用??同一个动画,使用脚本处理就不行?按官网的API 用的,就是没反应,求指教?
谢谢各位大神!!!!!