limits.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //吸引范围
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. // foo: {
  6. // // ATTRIBUTES:
  7. // default: null, // The default value will be used only when the component attaching
  8. // // to a node for the first time
  9. // type: cc.SpriteFrame, // optional, default is typeof default
  10. // serializable: true, // optional, default is true
  11. // },
  12. // bar: {
  13. // get () {
  14. // return this._bar;
  15. // },
  16. // set (value) {
  17. // this._bar = value;
  18. // }
  19. // },
  20. },
  21. // LIFE-CYCLE CALLBACKS:
  22. onLoad () {
  23. cc.director.getCollisionManager().enabled=true;
  24. cc.director.getCollisionManager().enabledDebugDraw = false;
  25. },
  26. start () {
  27. },
  28. onCollisionEnter:function(other,self){
  29. if (!Module.isCollision || other.tag == -1) return;
  30. // if (other.node.group == 'fishing'){
  31. // var leve = other.tag; //获取鱼的种类 (根据鱼的品级判断多少钱)
  32. // this.addFishing(leve);
  33. // Module.fishingNum += window.Utils.getFishingWeight(leve);
  34. // Module.gameObj.setFishingLabel();
  35. // other.node.removeFromParent();
  36. // Module.nonceFishingArr.push(leve);
  37. // cc.log("fishing----: ", other.node.y);
  38. // cc.log("self----: ", self.node.y);
  39. // return ;
  40. // }
  41. },
  42. // update (dt) {},
  43. });