HurdleBandCharactor.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. const PlayerStateStatic = require('PlayerState');
  2. //栏杆动作
  3. cc.Class({
  4. extends: cc.Component,
  5. properties: {
  6. Hurdle: {
  7. default: null,
  8. type: cc.Node
  9. },
  10. },
  11. onLoad : function() {
  12. // var spine = this.spine = this.node.getComponent("baozha");
  13. // this.spine = this.getComponent(cc.Animation);
  14. // cc.log("要 波动华",this.spine,this.Hurdle);
  15. // var spine = this.spine = this.getComponent('sp.Skeleton');
  16. this._hasStop = true;
  17. this.init();
  18. },
  19. start : function () {
  20. this.spine = this.getComponent(cc.Animation);
  21. cc.log("要 波动华",this.spine,this.Hurdle);
  22. },
  23. init : function () {
  24. // this.spine.setAnimation(0, "idle", false);
  25. // this.spine.timeScale = 0.0;
  26. },
  27. collode : function () {
  28. cc.log("跨栏 不加速区域跳起来");
  29. //
  30. // this.getComponent("HurdleBandCharactor_gif").collode();
  31. // this.spine.setAnimation(0, "idle2", false);
  32. // this.spine.timeScale = 1.0;
  33. // this.spine.play("zhendonghua");
  34. // this.spine = this.Hurdle.getComponent(cc.Animation);
  35. }
  36. });