Loading...
// 只在两个碰撞体开始接触时被调用一次 onBeginContact (contact, selfCollider, otherCollider) { console.log('有人碰到了玩家',selfCollider.node.name,otherCollider.node.name); if(otherCollider.node.name==&q...
cocos creator子弹朝坦克指向的方向发射,代码如下:let pos:cc.Vec3 = cc.v3(this.node.position.x,this.node.position.y); let rad:number =Math.PI * (90 + this.node.angle) / 180; var dir = cc.v2(Math.cos(rad),Math.sin(rad...