| 12345678910111213141516171819202122232425262728293031323334353637 |
- cc.Class({
- extends: cc.Component,
- properties: {
- Hero: {
- default: null,
- type: cc.Node
- },
- },
- onCollisionEnter: function (other,self) {
- // cc.log(other.node.name+'我碰到了',self);
- // cc.log(other.node.name+'Enter');
- } ,
- onCollisionStay: function (other,self) {
- // console.log('on collision stay');
- },
- onCollisionExit: function (other,self) {
- // cc.log(other.node.name+'Exit');
- },
- // update (dt) {},
- // use this for initialization
- onLoad: function () {
- // cc.director.getCollisionManager().enabled = true;
- // cc.director.getCollisionManager().enabledDebugDraw = true;
- // cc.director.getCollisionManager().enabledDrawBoundingBox = true;
- // this.touchingNumber = 0;
- },
- });
|