用cc.moveTo做下落时x位置复位

var jumpDown = cc.moveTo(this.jumpDuration,this.node.x,this.game.groundY).easing(cc.easeCubicActionIn());
this.node.x是变化的,但是下落时总是复位到0;
完整代码如下:
cc.Class({
extends: cc.Component,

properties: {
    // 主角跳跃高度
    jumpHeight: 0,
    // 主角跳跃持续时间
    jumpDuration: 0,
    // 最大移动速度
    maxMoveSpeed: 0,
    // 加速度
    accel: 0,
    jumpAudio: {
        default: null,
        type: cc.AudioClip
    },
    // 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 () {
    // 跳跃上升
    var jumpUp = cc.moveBy(this.jumpDuration, cc.v2(0, this.jumpHeight)).easing(cc.easeCubicActionOut());
    // 下落
    //cc.log('this.game.groundY='+this.game.groundY);
    //cc.p(this.node.x, this.game.groundY)
    var jumpDown = cc.moveTo(this.jumpDuration,this.node.x,this.game.groundY).easing(cc.easeCubicActionIn());
    // 添加一个回调函数,用于在动作结束时调用我们定义的其他方法
    var callback = cc.callFunc(this.playJumpSound, this);
    // 不断重复,而且每次完成落地动作后调用回调来播放声音
    return cc.sequence(jumpUp, jumpDown,callback);
    //return cc.repeatForever(cc.sequence(jumpUp, jumpDown,callback));
},
playJumpSound: function () {
    // 调用声音引擎播放声音
    cc.audioEngine.playEffect(this.jumpAudio, false);
},
onKeyDown (event) {
    // set a flag when key pressed
    switch(event.keyCode) {
        case cc.macro.KEY.a:
           // this.accLeft = true;
           this.xSpeed=-300;
            break;
        case cc.macro.KEY.d:
            // this.accRight = true;
            this.xSpeed=300;
            break;
        case cc.macro.KEY.space:
            cc.log('this.node.x='+this.node.x);
            cc.log('this.node.getPosition()='+this.node.getPosition());
           // xx=this.node.x;
            this.node.runAction(this.jumpAction);
           // cc.log('this.game.groundY='+this.game.groundY);
           
            break;
        case cc.macro.KEY.q:
            this.node.runAction(this.jumpDown);
    }
},
onKeyUp (event) {
    // unset a flag when key released
    switch(event.keyCode) {
        case cc.macro.KEY.a:
            //this.accLeft = false;
            this.xSpeed=0;
            break;
        case cc.macro.KEY.d:
            //this.accRight = false;
            this.xSpeed=0;
            break;
    }
},
// LIFE-CYCLE CALLBACKS:

// onLoad () {},
// Player.js
onLoad: function () {
    // 初始化跳跃动作
    //var xx=0;
    this.jumpAction = this.setJumpAction();
    //this.node.runAction(this.jumpAction);
    // 加速度方向开关
    this.accLeft = false;
    this.accRight = false;
    // 主角当前水平方向速度
    this.xSpeed = 0;

    // 初始化键盘输入监听
    cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this);
    cc.systemEvent.on(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
      
},
onDestroy () {
    // 取消键盘输入监听
    cc.systemEvent.off(cc.SystemEvent.EventType.KEY_DOWN, this.onKeyDown, this);
    cc.systemEvent.off(cc.SystemEvent.EventType.KEY_UP, this.onKeyUp, this);
},
start () {

},

// update (dt) {},
update: function (dt) {
    // 根据当前加速度方向每帧更新速度
    if (this.accLeft) {
        this.xSpeed -= this.accel * dt;
    } else if (this.accRight) {
        this.xSpeed += this.accel * dt;
    }
    // 限制主角的速度不能超过最大值
    if ( Math.abs(this.xSpeed) > this.maxMoveSpeed ) {
        // if speed reach limit, use max speed with current direction
        this.xSpeed = this.maxMoveSpeed * this.xSpeed / Math.abs(this.xSpeed);
    }

    // 根据当前速度更新主角的位置
    this.node.x += this.xSpeed * dt;
},

});

不明白你为什么要用moveTo,moveBy做跳跃。你既然有
// 根据当前速度更新主角的位置
this.node.x += this.xSpeed * dt;
这行代码,根据速度更新主角位置,那你为什么不在按下向上键的时候,把玩家的速度设置为向上的一个速度呢?
你这代码,一边又走cocosCreator的动作系统,一边又自己在upadate里面更新他的位置。

代码写错了,this.node.x改为this.node.y