text: (function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/scripts/Player.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
  cc._RF.push(module, 'a4a02T36ZRGBq3v8i/qFtuo', 'Player', __filename);
  // scripts/Player.js
  
  "use strict";
  
  // Learn cc.Class:
  //  - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/class.html
  //  - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/class.html
  // Learn Attribute:
  //  - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
  //  - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/reference/attributes.html
  // Learn life-cycle callbacks:
  //  - [Chinese] http://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
  //  - [English] http://www.cocos2d-x.org/docs/creator/en/scripting/life-cycle-callbacks.html
  
  cc.Class({
      extends: cc.Component,
  
      properties: {
          //主角跳跃高度
          jumpHeight: 0,
          //主角跳跃的持续时间
          jumpDuration: 0,
          //最大移动速度
          maxMoveSpeed: 0,
          //加速度
          accel: 0
          // foo: {
          //     // ATTRIBUTES:
          //     default: null,        // The default value will be used only when the component attaching
          //                           // to a node for the first time
          //     type: cc.SpriteFrame, // optional, default is typeof default
          //     serializable: true,   // optional, default is true
          // },
          // bar: {
          //     get () {
          //         return this._bar;
          //     },
          //     set (value) {
          //         this._bar = value;
          //     }
          // },
      },
      setJumpAction: function setJumpAction() {
          //跳跃上升
          var jumpUp = cc.moveBy(this.jumpDuration, cc.v2(0, this.jumpHeight).easing(cc.easeCubicActionOut()));
          //下落
          var jumpDown = cc.moveBy(this.jumpDuration, cc.v2(0, -this.jumpHeight).easing(cc.easeCubicActionIn()));
          //不断重复
          return cc.repeatForever(cc.sequence(jumpUp, jumpDown));
      },
  
      // LIFE-CYCLE CALLBACKS:
  
      onLoad: function onLoad() {
          // 初始化跳跃动作
          this.jumpAction = this.setJumpAction();
          this.node.runAction(this.jumpAction);
      },
      start: function start() {}
  }
  
  // update (dt) {},
  );
  
  cc._RF.pop();
          }
          if (CC_EDITOR) {
              __define(__module.exports, __require, __module);
          }
          else {
              cc.registerModuleFunc(__filename, function () {
                  __define(__module.exports, __require, __module);
              });
          }
          })();
          //# sourceMappingURL=Player.js.map
          