解决 预制体刚生成还没移到出生点就发生碰撞问题
This commit is contained in:
@@ -193,11 +193,12 @@ export class SkillCom extends CCComp {
|
||||
}
|
||||
|
||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||
// //console.log(this.scale+"碰撞开始 ",seCol,oCol);
|
||||
console.log(this.scale+"碰撞开始 ",seCol,oCol);
|
||||
if(seCol.node.position.x-oCol.node.position.x > 100 ) return
|
||||
let target = oCol.getComponent(HeroViewComp)
|
||||
if(oCol.group!=this.group){
|
||||
if(target == null) return;
|
||||
console.log("[SkillCom]:onBeginContact oCol||seCol",oCol.node.position,seCol.node.position)
|
||||
// console.log("[SkillCom]:onBeginContact oCol||seCol",oCol.node.position,seCol.node.position)
|
||||
this.single_damage(target)
|
||||
// this.ent.destroy()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user