我智商爆棚
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.1 KiB

4 weeks ago
import { ryw_Event } from "../Event/EventEnum";
import EventMgr from "../Event/EventMgr";
import VibrateMgr from "./VibrateMgr";
const { ccclass, property } = cc._decorator;
@ccclass
export default class daskPhysics extends cc.Component {
// onLoad () {}
onBeginContact(contact: cc.PhysicsContact, selfCollider: cc.PhysicsBoxCollider, otherCollider: cc.PhysicsBoxCollider) {
if (selfCollider.tag == 4 || selfCollider.tag == 5 || selfCollider.tag == 6 || selfCollider.tag == 7) {
// otherCollider.node.removeComponent(cc.RigidBody);
}
}
// onEndContact(contact: cc.PhysicsContact, selfCollider: cc.PhysicsBoxCollider, otherCollider: cc.PhysicsBoxCollider) {
// if (selfCollider.tag == 4 || selfCollider.tag == 5 || selfCollider.tag == 6 || selfCollider.tag == 7) {
// if(otherCollider.node.group == "wolf"){
// EventMgr.emitEvent_custom(ryw_Event.sheepHoled, otherCollider.node, selfCollider.offset);
// }
// // otherCollider.node.removeComponent(cc.RigidBody);
// }
// }
start() {
}
// update (dt) {}
}