碰撞以后播放音效,但是为什么总有一种延迟的感觉,不是马上播放,而是等了2-3秒才播放。??为什么,求大神。。
// 开始进行碰撞检测
onCollisionStay: function (other, self) {
if (other.node.group == ‘border’) {
this.node.runAction(cc.scaleTo(0.01, 0.3));
console.log(‘on collision enter’);
var id = cc.audioEngine.play(this.audioPlayer, false, 1);//碰撞以后播放音效
return;
}
},