CollideHurdleBand.js 839 B

12345678910111213141516171819202122232425262728293031
  1. const PlayerStateStatic = require('PlayerState');
  2. cc.Class({
  3. extends: cc.Component,
  4. properties: {
  5. },
  6. start: function () {
  7. },
  8. onCollisionEnter: function (other,self) {
  9. // cc.log("装了吗",other.tag,self.tag);
  10. if(other.node.name === 'PlayerCollisionLine')
  11. {
  12. var PlayerCollisionLine = other.getComponent("PlayerCollisionLine");
  13. var PlayerStateScript = PlayerCollisionLine.Hero.getComponent("PlayerState");
  14. PlayerStateScript.CurrentInZoneType = PlayerStateStatic.ZoneType.PerfectLongJumpBand;
  15. // cc.log(PlayerStateScript.CurrentInZoneType );
  16. }
  17. // this.node.getComponent("HurdleBandCharactor").collode();
  18. },
  19. onCollisionStay: function (other,self) {
  20. },
  21. onCollisionExit: function (other,self)
  22. {
  23. }
  24. });