cc.Class({
    extends: cc.Component,

    properties: {
        // foo: {
        //    default: null,      // The default value will be used only when the component attaching
        //                           to a node for the first time
        //    url: cc.Texture2D,  // optional, default is typeof default
        //    serializable: true, // optional, default is true
        //    visible: true,      // optional, default is true
        //    displayName: 'Foo', // optional
        //    readonly: false,    // optional, default is false
        // },
        // ...
        main:cc.Node,
    },

    // use this for initialization
    onLoad: function () {
        let self = this;
        self.node.on('touchmove', function ( touch ) {
            let x = touch.getPreviousLocation().x - touch.getLocationX();
            let y = touch.getPreviousLocation().y - touch.getLocationY();
            this.parent.x += -x;
        });
    },


    update: function (dt) {
      
    },
});
