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) {}
}