LongJumpEnd.js 643 B

123456789101112131415161718192021222324252627282930
  1. cc.Class({
  2. extends: cc.Component,
  3. properties: {
  4. },
  5. start () {
  6. },
  7. onCollisionEnter: function (other)
  8. {
  9. if(other.node.name === 'PlayerCollisionLine')
  10. {
  11. var Level = this.node.parent.parent;
  12. var Canvas = Level.getComponent('LevelControl').Canvas;
  13. var GameStates = Canvas.getComponent('GameStates');
  14. other.node.parent.parent.getComponent('HeroControl').ResetSpeed();
  15. }
  16. },
  17. onCollisionStay: function (other) {
  18. // console.log('on collision stay');
  19. },
  20. onCollisionExit: function (other) {
  21. }
  22. // update (dt) {},
  23. });