PlayerCollisionLine_ai.js 839 B

12345678910111213141516171819202122232425262728293031323334353637
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. Hero: {
  5. default: null,
  6. type: cc.Node
  7. },
  8. },
  9. onCollisionEnter: function (other,self) {
  10. // cc.log(other.node.name+'我碰到了',self);
  11. // cc.log(other.node.name+'Enter');
  12. } ,
  13. onCollisionStay: function (other,self) {
  14. // console.log('on collision stay');
  15. },
  16. onCollisionExit: function (other,self) {
  17. // cc.log(other.node.name+'Exit');
  18. },
  19. // update (dt) {},
  20. // use this for initialization
  21. onLoad: function () {
  22. // cc.director.getCollisionManager().enabled = true;
  23. // cc.director.getCollisionManager().enabledDebugDraw = true;
  24. // cc.director.getCollisionManager().enabledDrawBoundingBox = true;
  25. // this.touchingNumber = 0;
  26. },
  27. });