CollideHurdleBand.js 825 B

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